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
Adding user modifiable waveform output interface for real-time waveform output. #890
Comments
Original Redmine Comment Good work. I don't want to make all of verilated_vcd_h's members protected as that will mean your code and others will certainly break when I change any internals. It looks like if you simply make VerilatedVcdFile a class with those three members that doesn't inherit from VerilatedVcd you'll still get what you need. Can you try that and confirm? Also a minor thing please lower case the first letter of the function names, and I'd suggest fd for file descriptor - "fdWrite" not "OnWrite", likewise "fdOpen", "fdClose". |
Original Redmine Comment Wilson Snyder wrote:
I've understand your intension. Thanks. |
Original Redmine Comment HyungKi Jeong wrote:
Sorry, it must be fixed in source verilated_vcd_c.h line 425. Simply... fix as below.
|
Original Redmine Comment Please change class VerilatedVcdFile : public VerilatedVcd to class VerilatedVcdFile Then you can make a class VerilatedVcdDiskFile : public VerilatedVcdFile which implements the default actions (calls OS routines) when you pass NULL to VerilatedVcdC. |
Original Redmine Comment (That is, the relationship should be a VerilatedVcdC has-a file, not a file is-a VerilatedVcdC.) |
Original Redmine Comment Actually I think you can skip the abstract class and just change
to
Then make the default methods to call OS routines. |
Original Redmine Comment Then constructor of 'VerilatedVcdC' must change to this.
and user can make override class of 'VerilatedVcdFile' on your way. |
Original Redmine Comment Pushed to git towards 3.871. Thanks for the patches. I made a few renames, also note if you pass in your own class you need to destruct it yourself. (Honoring the usual rule that a library only frees what it allocs itself) |
Original Redmine Comment I've one more question, how can i override 'VerilatedVcdFile' on now. In manual's example...
This example shows the using of 'VerilatedVcdC' class not a 'VerilatedVcd'. |
Original Redmine Comment I updated git again to fix that. |
Original Redmine Comment Thanks~ |
Original Redmine Comment In 3.872. |
Author Name: HyungKi Jeong
Original Redmine Issue: 890 from https://www.veripool.org
Original Date: 2015-02-27
Original Assignee: HyungKi Jeong
I use the GTKWave as waveform tool and I was needed to check verilator's wave-out in real-time for my project (http://sourceforge.net/projects/test-drive/).
Some years ago, I patching the verilated_vcd_c.h and verilated_vcd_c.cpp in every release for my source.
But I hope to add user modifiable file's output interface in verilator's 'VerilatedVcdC' class (in C++ include sources).
So I send the fixed some sources(verilated_vcd_c.h, verilated_vcd_c.cpp of verilator-3.870.tgz) on here. Please check this.
on youtube : https://www.youtube.com/watch?v=vYs_kJNy_pc&feature=player_detailpage (from 3:40~ it shows real-time waveform output capability with verilator.)
Thanks.
The text was updated successfully, but these errors were encountered: