[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Patch #402

"force bitvector" attribute

Added by Stefan Wallentowitz 7 months ago. Updated 6 months ago.

Status:Closed Start date:10/25/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Invoking/Options
Target version:-

Description

Hi,

I recently verilated our own Network-on-Chip implementation. For interaction between the system and the uut pins I created a transactor for SystemC TLM. The problem, that came up, is that the interface has valid and ready signals. Their width is determined by the number of virtual channels which is a parameter to the module. Apparently I now have different module interfaces, namely a Mesh_v1 and Mesh_v2 version for one and two channels respectively. The interface ports are then of type bool and vluint32_t. As the transactor should be used with each version, I came up with the idea to force certain ports to be of type sc_bv<V>. This also makes life easier in the transactor itself. As the command line switches did not provide the required behavior (I want to keep other signals as vluint64_t), I created a simple patch, that you can please find attached.

Please comment on the patch, whether it makes sense in your opinion and how it may be improved.

Thanks in advance!

Bye, Stefan

0001-Introduce-the-new-force-bitvector-attribute-for-port.patch (6.4 kB) Stefan Wallentowitz, 10/25/2011 12:31 pm

0001-Introduce-the-new-force-bitvector-attribute-for-port.patch (16 kB) Stefan Wallentowitz, 10/26/2011 09:01 am

History

Updated by Wilson Snyder 7 months ago

  • Status changed from New to AskedReporter

Nice work.

First, can you call it "verilator sc_bv", as it is similar to sc_clock?

Also, please update the bin/verilator file to document it (similar to sc_clock). You might note that sc_bv's are much slower than integers, so you're hurting performance every time you use this.

Finally, use it in a test, for example add a line using it to test_regress/t_var_pinsizes.v and test_regress/t_var_pinsizes.cpp. (Run it with test_regress/t_var_pinsizes.pl)

If these are acceptable can you post a new post and I'll apply it?

Updated by Stefan Wallentowitz 7 months ago

Thanks for the feedback. Of course I changed the name, added documentation to bin/verilator and updated the respective regression files.

Hope I did everything right.

Bye, Stefan

Updated by Wilson Snyder 7 months ago

  • Category set to Invoking/Options
  • Status changed from AskedReporter to Resolved

Looks good, thanks for patching! Moved a few lines to keep things sorted, but that's it.

In git towards 3.825.

Updated by Wilson Snyder 6 months ago

  • Status changed from Resolved to Closed

In 3.830.

Also available in: Atom