Patch #402
"force bitvector" attribute
| 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
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.
Also available in: Atom
![[logo]](/img/veripool_small.png)