-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added get_dumps and get_sorted_sig_dump functions #8
base: master
Are you sure you want to change the base?
Conversation
You can use print_dumps tag as before to print automatically to the console OR you can return the results of a print_dump using get_dumps and get_sorted_sig_dump. These are separate since the user might want just one or the other.
Thanks for this pull request. I thought a bit more about this, and felt that it would be better to not store the VCD data multiple times in the object by default. Sorry if this is not what we had discussed previously. So I updated the API to expose a streaming/callback version of things, which should allow you to achieve what you want. Can you double check the examples at PrintDeltasStreamParserCallbacks and PrintDumpsStreamParserCallbacks? Line 270 in 1373529
You can then just create your own class based on them to achieve your goals. Let me know if this solves your use case. |
I am not a great python coder, so I implemented what was the simplest
possible solution with my given skillset. I'm trying to make a simple GUI
to simulate SIMPLE VHDL code graphically. I'm not writing a simulator
because they already exist. I just want to make it graphically display
outputs on LEDs given a set of inputs the user clicks on as the inputs.
This can be used for folks without access to hardware due to quarantine.
Users generate a VCD for waveform generation already, but the graphical GUI
will make understanding what's going on in the code more intuitive. When I
say your original print_dumps result, I visualized what I thought the best
way to do it would be. My thought was to take the results given by my
implementation of vcdvcd's dumps. I returned them as a list of signal names
(sorted and numbered) then a list of the list of data. I planned to get the
index of the signal name from the first list, then use that to seek out
what the corresponding outputs would have been in the list of lists of the
signals. With the new implementation, I don't know how to visualize a
solution. Does that make sense? Do you have a any suggestions?
EDIT: Thinking further, I could make a dict with all the inputs as keys to quickly return the output values, then use those to set/clear LEDs on the GUI.
|
I understand, learning new technologies is hard for everyone. Note that the new setup is very similar to the old one, just slightly cleaner. If you copy either |
Ok, great. I'll do that once I flesh out a more complete implementation of all my I/Os on the GUI and test for more complicated VCD files. I currently have a minimal implementation working enough to do some tests for the remaining I/Os at least. Since time is of the essence on certain features (only a couple of weeks before I need something working at this point) I really need to get them implemented, then I can integrate the I'm mostly used to C and Java and so it isn't all too different but certain syntax things have tripped me up. Once I realized dict is like a hashMap in Java the rest of the project fell into place after my last reply. Like I said it is far from ready for prime time, but at least I am twiddling switched and LEDs are flashing based on the VCD file at the moment. Once I get a bit further along with it, I'll make it public and you can see what a hack I am at python : ) |
BTW, I changed the interface a bit on ba56abd (2.0.0 release), now you have to do |
As discussed in an issue, I refactored the code to return the sorted list of signals and the corresponding values of all the signals in that same sorted order. You can still use the print_dumps tag to have vcdvcd automatically print to the console if needed. I modified the version number in setup.py but did not try to push as described in your release procedure.