Fix tracing SystemC signals with structures, bug858. Remove SC tracing of wrapper.

This commit is contained in:
Wilson Snyder 2014-12-10 22:33:28 -05:00
parent e755c7fdcc
commit 2b5017e610
4 changed files with 53 additions and 1 deletions

View File

@ -17,6 +17,10 @@ indicates the contributor was also the author of the fix; Thanks!
*** Inline C functions that are used only once, msg1525. [Jie Xu]
*** Fix tracing SystemC signals with structures, bug858. [Eivind Liland]
Note that SystemC traces will no longer show the signals
in the wrapper, they can be seen one level further down.
**** Fix bare generates in interfaces, bug789. [Bob Newgard]

View File

@ -130,7 +130,12 @@ void V3LinkLevel::wrapTopCell(AstNetlist* netlistp) {
oldvarp->primaryIO(true);
varp->primaryIO(true);
}
if (varp->isIO() && v3Global.opt.systemC()) varp->sc(true);
if (varp->isIO() && v3Global.opt.systemC()) {
varp->sc(true);
// User can see trace one level down from the wrapper
// Avoids packing & unpacking SC signals a second time
varp->trace(false);
}
AstPin* pinp = new AstPin(oldvarp->fileline(),0,oldvarp->name(),
new AstVarRef(varp->fileline(),

View File

@ -0,0 +1,17 @@
#!/usr/bin/perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2003-2009 by Wilson Snyder. This program is free software; you can
# redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
compile (
verilator_flags2 => ['--sc --trace --trace-structs --pins-bv 2'],
);
#execute (); # didn't bother with top shell
ok(1);
1;

View File

@ -0,0 +1,26 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2014 by Wilson Snyder.
// verilator lint_off UNUSED
// verilator lint_off UNDRIVEN
//bug858
typedef struct packed {
logic m_1;
logic m_2;
} struct_t;
typedef struct packed {
logic [94:0] m_1;
logic m_2;
} struct96_t;
module t
(
input struct_t test_input,
input struct96_t t96
);
endmodule