Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace option is not working anymore #198

Closed
veripoolbot opened this issue Dec 25, 2009 · 7 comments
Closed

Trace option is not working anymore #198

veripoolbot opened this issue Dec 25, 2009 · 7 comments
Assignees
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Michael S
Original Redmine Issue: 198 from https://www.veripool.org
Original Date: 2009-12-25
Original Assignee: Wilson Snyder (@wsnyder)


"$TESTDIR/../../rtl_systemc/obj_dir/Design__Trace.cpp", line 5931: error:
           too few arguments in function call
         vcdp->chgArray(c+3317,(VL_SC_BV_DATAP(vlTOPp->o_Slave8_SEL.read())));

                                                                         ^

I have verilator-3.720 and SystemPerl-1.332

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-12-25T01:17:51Z


What does the declaration of o_Slave8_SEL look like, in Verilog and in the C++ code?

Did this used to work? (given the bug title...)

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Michael S
Original Date: 2009-12-25T01:21:48Z


My mistake. I assumed it has been tested and broken just lately.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Michael S
Original Date: 2009-12-25T01:23:47Z


Wilson Snyder wrote:

What does the declaration of o_Slave8_SEL look like, in Verilog and in the C++ code?

It is one bit signal:
sc_out<sc_bv<1> > o_Slave8_SEL;

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-12-25T01:42:37Z


Normally a one bit signal would be a bool, that's probably related to the problem. What flags are you using?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Michael S
Original Date: 2009-12-25T01:57:15Z


Wilson Snyder wrote:

Normally a one bit signal would be a bool, that's probably related to the problem. What flags are you using?

I think "--pins-bv 1" created this problem.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-12-25T15:04:03Z


Yup, the --pins-bv test didn't have tracing turned on. I added tracing and it failed.

BTW using sc_bv<1> is probably 2x slower than using bools in the SystemC code, if you do that everywhere.

Fixed in git for next release; patch below because it'll be several weeks at least.

diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp
index c137c34..9597931 100644
--- a/src/V3EmitC.cpp
+++ b/src/V3EmitC.cpp
@@ -1989,7 +1989,7 @@ class EmitCTrace : EmitCStmts {
                             + ((arrayindex<0) ? 0 : (arrayindex*nodep->declp()->widthWords()))));
         puts(",");
         emitTraceValue(nodep, arrayindex);
-       if (nodep->declp()->msbEndianed() || nodep->declp()->lsbEndianed()) {
+       if (nodep->declp()->msbEndianed() || nodep->declp()->lsbEndianed() || emitTraceIsScBv(nodep)) {
             puts(","+cvtToStr(nodep->declp()->widthMin()));
         }
         puts(");\n");

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-02-07T12:41:53Z


In 3.800.

@veripoolbot veripoolbot added area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants