Fix backward widths in function output warning

This commit is contained in:
Wilson Snyder 2012-03-03 12:09:01 -05:00
parent 764399256c
commit 4637e06ad2
3 changed files with 8 additions and 4 deletions

View File

@ -1246,9 +1246,9 @@ private:
if ((portp->isOutput() || portp->isInout())
&& pinp->width() != portp->width()) {
pinp->v3error("Unsupported: Function output argument '"<<portp->prettyName()<<"'"
<<" requires "<<pinp->width()
<<" requires "<<portp->width()
<<" bits, but connection's "<<pinp->prettyTypeName()
<<" generates "<<portp->width()<<" bits.");
<<" generates "<<pinp->width()<<" bits.");
// otherwise would need some mess to force both sides to proper size
// (get an ASSIGN with EXTEND on the lhs instead of rhs)
}

View File

@ -42,7 +42,11 @@ ifeq ($(VM_SP_OR_SC),1)
LIBS += $(SC_LIBS)
endif
#Default compile, using normal make rules
#Default compile, pick up OBJCACHE
%.o: %.cpp
$(OBJCACHE) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
#Default link, using normal make rules
#$(VM_PREFIX): $(VK_GLOBAL_OBJS) $(VK_OBJS)
# $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt

View File

@ -11,7 +11,7 @@ compile (
v_flags2 => ["--lint-only"],
fails=>1,
expect=>
q{%Error: t/t_func_wide_out_bad.v:\d+: Unsupported: Function output argument 'data' requires 4350 bits, but connection's VARREF 'msg' generates 4352 bits.
q{%Error: t/t_func_wide_out_bad.v:\d+: Unsupported: Function output argument 'data' requires 4352 bits, but connection's VARREF 'msg' generates 4350 bits.
%Error: Exiting due to.*},
);