-
-
Notifications
You must be signed in to change notification settings - Fork 97
Random signal initialization plugin. #1384
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
base: master
Are you sure you want to change the base?
Conversation
d30643b to
1f1800d
Compare
You can just copy what |
474b226 to
825e7a4
Compare
825e7a4 to
591b8d7
Compare
258022a to
51e3bfc
Compare
5311366 to
992e502
Compare
57fd42b to
76baf59
Compare
76baf59 to
5450740
Compare
|
Hi @nickg, this is now in first reasonably working state. I hand-tried on my project and NEORV32. I have couple of questions before I proceed with writing Tests:
|
Hi,
this is a WIP proposal of random signal initialization VHPI plugin. Not yet ready to be merged, putting it here in case someone wants to have a look or provide comments.
The plugin provides random signal initialization options as described in: #1042
Configuration is done by
+siginit+prefixed arguments.The plugin build is hooked to the NVC build. I went for the simplest approach of custom target. Having no experience with automake, google + AI helped me... hopefully not too bad :) Building native shared library required using LibTool extension, and I did not want to complicate it. Possible it will not work on Windows/Unix though.
The plugin load is integrated into
run_cmd, plusargs are filtered, and only those with prefix+siginit+are passed to the plugin. This may be redundant (all plusargs could be passed). However, to pass seed, I extend the arguments with+siginit+seed+<seed_value>.If
+siginit+seed+<seed_value>is specified, it is used to randomize the signal init value, if not, the seed is taken from--seed.The randomizer is "state-less", only signal name, index (if array is being initialized) and seed are used to generate random value.
This is to meet what was proposed in #1042 by Wilson Snyder.
Two simple and nested hashes are used as randomizer.
TODOs:
+siginit+verboseis set, value of every signal assigned is printed viavhpi_printf).run_cmd. Currently, the plusargs are passed also to other VHPI plugins. It would be good for this not to affect other VHPI plugins.entityor hierarchy where this occurs. Currently it is whole design, but typically user would do this only on DUT, so either pass DUTs hierchy, or rather DUT entity name.