Remove duplicate error prefixes

This commit is contained in:
Wilson Snyder 2010-01-24 18:17:27 -05:00
parent 898c08c8e0
commit 3e6e6ec0a5
2 changed files with 6 additions and 13 deletions

View File

@ -366,7 +366,7 @@ void _vl_vsformat(string& output, const char* formatp, va_list ap) {
(QData)(ld/VL_TIME_MULTIPLIER), (QData)(ld/VL_TIME_MULTIPLIER),
(QData)(ld%VL_TIME_MULTIPLIER)); (QData)(ld%VL_TIME_MULTIPLIER));
} else { } else {
vl_fatal(__FILE__,__LINE__,"","%%Error: Unsupported VL_TIME_MULTIPLIER"); vl_fatal(__FILE__,__LINE__,"","Unsupported VL_TIME_MULTIPLIER");
} }
int needmore = width-digits; int needmore = width-digits;
if (needmore>0) output.append(needmore,' '); // Pre-pad spaces if (needmore>0) output.append(needmore,' '); // Pre-pad spaces
@ -398,7 +398,7 @@ void _vl_vsformat(string& output, const char* formatp, va_list ap) {
} }
break; break;
default: default:
string msg = string("%%Error: Unknown _vl_vsformat code: ")+pos[0]+"\n"; string msg = string("Unknown _vl_vsformat code: ")+pos[0];
vl_fatal(__FILE__,__LINE__,"",msg.c_str()); vl_fatal(__FILE__,__LINE__,"",msg.c_str());
break; break;
} // switch } // switch
@ -589,7 +589,7 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
break; break;
} }
default: default:
string msg = string("%%Error: Unknown _vl_vsscanf code: ")+pos[0]+"\n"; string msg = string("Unknown _vl_vsscanf code: ")+pos[0];
vl_fatal(__FILE__,__LINE__,"",msg.c_str()); vl_fatal(__FILE__,__LINE__,"",msg.c_str());
break; break;
} // switch } // switch
@ -1027,7 +1027,7 @@ void VerilatedScope::exportInsert(bool finalize, const char* namep, void* cb) {
void* VerilatedScope::exportFindNullError(int funcnum) const { void* VerilatedScope::exportFindNullError(int funcnum) const {
// Slowpath - Called only when find has failed // Slowpath - Called only when find has failed
string msg = (string("%Error: Testbench C called '") string msg = (string("Testbench C called '")
+VerilatedImp::exportName(funcnum) +VerilatedImp::exportName(funcnum)
+"' but scope wasn't set, perhaps due to dpi import call without 'context'"); +"' but scope wasn't set, perhaps due to dpi import call without 'context'");
vl_fatal("unknown",0,"", msg.c_str()); vl_fatal("unknown",0,"", msg.c_str());
@ -1036,7 +1036,7 @@ void* VerilatedScope::exportFindNullError(int funcnum) const {
void* VerilatedScope::exportFindError(int funcnum) const { void* VerilatedScope::exportFindError(int funcnum) const {
// Slowpath - Called only when find has failed // Slowpath - Called only when find has failed
string msg = (string("%Error: Testbench C called '") string msg = (string("Testbench C called '")
+VerilatedImp::exportName(funcnum) +VerilatedImp::exportName(funcnum)
+"' but this DPI export function exists only in other scopes, not scope '" +"' but this DPI export function exists only in other scopes, not scope '"
+name()+"'"); +name()+"'");

View File

@ -18,10 +18,7 @@ include Vvgen.mk
####################################################################### #######################################################################
# Use sp_log.cpp, so we can get output in sim.log # Use sp_log.cpp, so we can get output in sim.log
CPPFLAGS += -DUTIL_PRINTF=sp_log_printf
# Needed by tracing routines # Needed by tracing routines
CPPFLAGS += -DWAVES=1
CPPFLAGS += -DVL_DEBUG=1 CPPFLAGS += -DVL_DEBUG=1
CPPFLAGS += $(CPPFLAGS_ADD) CPPFLAGS += $(CPPFLAGS_ADD)
@ -32,11 +29,7 @@ CPPFLAGS += -Wno-div-by-zero
####################################################################### #######################################################################
# Linking final exe -- presumes have a sim_main.cpp # Linking final exe -- presumes have a sim_main.cpp
SP_SRCS = verilated.o simx: sim_main.o $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a
# If you are using the older version of SystemPerl, you may want instead:
#SP_SRCS = sp_log.o SpTraceVcd.o
simx: sim_main.o $(SP_SRCS) $(VM_PREFIX)__ALL.a
$(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt
sim_main.o: sim_main.cpp $(VM_PREFIX).h sim_main.o: sim_main.cpp $(VM_PREFIX).h