Merge from master
This commit is contained in:
commit
3d49136e27
2
Changes
2
Changes
|
|
@ -14,6 +14,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
|
|
||||||
**** Report interface ports connected to wrong interface, bug1294. [Todd Strader]
|
**** Report interface ports connected to wrong interface, bug1294. [Todd Strader]
|
||||||
|
|
||||||
|
**** When tracing, use scalars on single bit arrays to appease vcddiff.
|
||||||
|
|
||||||
**** Fix parsing "output signed" in V2K port list, msg2540. [James Jung]
|
**** Fix parsing "output signed" in V2K port list, msg2540. [James Jung]
|
||||||
|
|
||||||
**** Fix parsing error on bad missing #, bug1308. [Dan Kirkham]
|
**** Fix parsing error on bad missing #, bug1308. [Dan Kirkham]
|
||||||
|
|
|
||||||
|
|
@ -186,9 +186,7 @@ public:
|
||||||
// METHODS
|
// METHODS
|
||||||
/// Check that the current thread ID is the same as the construction thread ID
|
/// Check that the current thread ID is the same as the construction thread ID
|
||||||
void check() VL_MT_UNSAFE_ONE {
|
void check() VL_MT_UNSAFE_ONE {
|
||||||
// Memoize results in local thread, to prevent slow get_id() call
|
if (!VL_LIKELY(m_threadid == VL_THREAD_ID())) {
|
||||||
VL_THREAD_LOCAL bool t_okThread = (m_threadid == VL_THREAD_ID());
|
|
||||||
if (!VL_LIKELY(t_okThread)) {
|
|
||||||
fatal_different();
|
fatal_different();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ void VerilatedVcd::bufferResize(vluint64_t minsize) {
|
||||||
memcpy(m_wrBufp, oldbufp, m_writep - oldbufp);
|
memcpy(m_wrBufp, oldbufp, m_writep - oldbufp);
|
||||||
m_writep = m_wrBufp + (m_writep - oldbufp);
|
m_writep = m_wrBufp + (m_writep - oldbufp);
|
||||||
m_wrFlushp = m_wrBufp + m_wrChunkSize * 6;
|
m_wrFlushp = m_wrBufp + m_wrChunkSize * 6;
|
||||||
delete oldbufp; oldbufp=NULL;
|
delete [] oldbufp; oldbufp=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2405,14 +2405,20 @@ class EmitCTrace : EmitCStmts {
|
||||||
string full = ((m_funcp->funcType() == AstCFuncType::TRACE_FULL
|
string full = ((m_funcp->funcType() == AstCFuncType::TRACE_FULL
|
||||||
|| m_funcp->funcType() == AstCFuncType::TRACE_FULL_SUB)
|
|| m_funcp->funcType() == AstCFuncType::TRACE_FULL_SUB)
|
||||||
? "full":"chg");
|
? "full":"chg");
|
||||||
|
bool emitWidth = false;
|
||||||
if (nodep->dtypep()->basicp()->isDouble()) {
|
if (nodep->dtypep()->basicp()->isDouble()) {
|
||||||
puts("vcdp->"+full+"Double");
|
puts("vcdp->"+full+"Double");
|
||||||
} else if (nodep->isWide() || emitTraceIsScBv(nodep) || emitTraceIsScBigUint(nodep)) {
|
} else if (nodep->isWide() || emitTraceIsScBv(nodep) || emitTraceIsScBigUint(nodep)) {
|
||||||
puts("vcdp->"+full+"Array");
|
puts("vcdp->"+full+"Array");
|
||||||
|
emitWidth = true;
|
||||||
} else if (nodep->isQuad()) {
|
} else if (nodep->isQuad()) {
|
||||||
puts("vcdp->"+full+"Quad ");
|
puts("vcdp->"+full+"Quad ");
|
||||||
} else if (nodep->declp()->bitRange().ranged()) {
|
emitWidth = true;
|
||||||
|
} else if (nodep->declp()->bitRange().ranged()
|
||||||
|
// 1 element smaller to use Bit dump
|
||||||
|
&& nodep->declp()->bitRange().elements() != 1) {
|
||||||
puts("vcdp->"+full+"Bus ");
|
puts("vcdp->"+full+"Bus ");
|
||||||
|
emitWidth = true;
|
||||||
} else {
|
} else {
|
||||||
puts("vcdp->"+full+"Bit ");
|
puts("vcdp->"+full+"Bit ");
|
||||||
}
|
}
|
||||||
|
|
@ -2420,8 +2426,7 @@ class EmitCTrace : EmitCStmts {
|
||||||
+ ((arrayindex<0) ? 0 : (arrayindex*nodep->declp()->widthWords()))));
|
+ ((arrayindex<0) ? 0 : (arrayindex*nodep->declp()->widthWords()))));
|
||||||
puts(",");
|
puts(",");
|
||||||
emitTraceValue(nodep, arrayindex);
|
emitTraceValue(nodep, arrayindex);
|
||||||
if (!nodep->dtypep()->basicp()->isDouble() // When float/double no longer have widths this can go
|
if (emitWidth) {
|
||||||
&& (nodep->declp()->bitRange().ranged() || emitTraceIsScBv(nodep) || emitTraceIsScBigUint(nodep))) {
|
|
||||||
puts(","+cvtToStr(nodep->declp()->widthMin()));
|
puts(","+cvtToStr(nodep->declp()->widthMin()));
|
||||||
}
|
}
|
||||||
puts(");\n");
|
puts(");\n");
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ run(cmd => ["../bin/verilator_coverage",
|
||||||
|
|
||||||
# Older clib's didn't properly sort maps, but the coverage data doesn't
|
# Older clib's didn't properly sort maps, but the coverage data doesn't
|
||||||
# really care about ordering. So avoid false failures by sorting.
|
# really care about ordering. So avoid false failures by sorting.
|
||||||
|
# Set LC_ALL as suggested in the sort manpage to avoid sort order
|
||||||
|
# changes from the locale.
|
||||||
|
$ENV{LC_ALL} = "C";
|
||||||
run(cmd => ["sort",
|
run(cmd => ["sort",
|
||||||
"$Self->{obj_dir}/coverage.dat",
|
"$Self->{obj_dir}/coverage.dat",
|
||||||
"> $Self->{obj_dir}/coverage-sort.dat",
|
"> $Self->{obj_dir}/coverage-sort.dat",
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,16 @@ struct params {
|
||||||
unsigned int scalar;
|
unsigned int scalar;
|
||||||
int type;
|
int type;
|
||||||
} attributes, children;
|
} attributes, children;
|
||||||
} values[] = {
|
};
|
||||||
|
|
||||||
|
int mon_check_props() {
|
||||||
|
// This table needs to be function-static.
|
||||||
|
// This avoids calling is_verilator() below at global-static init time.
|
||||||
|
// When global-static led to a race between the is_verilator call below, and
|
||||||
|
// the code that sets up the VerilatedAssertOneThread() check in
|
||||||
|
// verilated_vpi.cc, it was causing the check to falsely fail
|
||||||
|
// (due to m_threadid within the check not being initted yet.)
|
||||||
|
static struct params values[] = {
|
||||||
{"onebit", {1, vpiNoDirection, 1, vpiReg}, {0, 0, 0, 0}},
|
{"onebit", {1, vpiNoDirection, 1, vpiReg}, {0, 0, 0, 0}},
|
||||||
{"twoone", {2, vpiNoDirection, 0, vpiReg}, {0, 0, 0, 0}},
|
{"twoone", {2, vpiNoDirection, 0, vpiReg}, {0, 0, 0, 0}},
|
||||||
{"onetwo", {2, vpiNoDirection, 0, TestSimulator::is_verilator() ? vpiReg : vpiMemory}, {0, 0, 0, 0}},
|
{"onetwo", {2, vpiNoDirection, 0, TestSimulator::is_verilator() ? vpiReg : vpiMemory}, {0, 0, 0, 0}},
|
||||||
|
|
@ -167,9 +176,7 @@ struct params {
|
||||||
{"sub.subin", {1, vpiInput, 1, vpiPort}, {0, 0, 0, 0}},
|
{"sub.subin", {1, vpiInput, 1, vpiPort}, {0, 0, 0, 0}},
|
||||||
{"sub.subout", {1, vpiOutput, 1, vpiPort}, {0, 0, 0, 0}},
|
{"sub.subout", {1, vpiOutput, 1, vpiPort}, {0, 0, 0, 0}},
|
||||||
{NULL, {0, 0, 0, 0}, {0, 0, 0, 0}}
|
{NULL, {0, 0, 0, 0}, {0, 0, 0, 0}}
|
||||||
};
|
};
|
||||||
|
|
||||||
int mon_check_props() {
|
|
||||||
struct params* value = values;
|
struct params* value = values;
|
||||||
while (value->signal) {
|
while (value->signal) {
|
||||||
TestVpiHandle h = VPI_HANDLE(value->signal);
|
TestVpiHandle h = VPI_HANDLE(value->signal);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue