-
Notifications
You must be signed in to change notification settings - Fork 0
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
Entity state saving to binary file #22
Conversation
The property simpath is now common to spice and rtl, and it's defined in thesdk instead of the respective simulator modules. Tested IO pointers when loading a state from disk, the pointers are now persistent. Also, added option to load only IOs instead of full state.
Okay I think these changes are done. The overall changes are implemented in Some things I refactored:
The entity directory structure is now more consistent in my opinion. If this is too large change, please let me know. In terms of simulations and saved states, the directory tree should now look like
For clarity the properties are now
I confirmed that the IO() object pointers are preserved when the entity state is loaded. P.S. The output prints look less depressing with the color tags. |
My world is now full of colour and joy :) More seriously, this seems to work well, so green light for merge from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the changing Simulations to simulations eventually, but it breaks/may break LOT of references to Simulations directory, so I would leave it as Simulations at this point.
The |
Discussed with @ojarvin , One problematic part of Simulations->simulations is that currently rtl uses dofile.do that is used in interactive modelsim simulations. Eventually that would be the only file left in Simulations that is not created by TheSyDeKick. Way to proceed is as follows.
@chiplet Can you see any other things that may break with the proposed change? |
I will open another PR for this.
This seems like a good approach to me since it doesn't break downstream projects, provides a clear update path, and also increases configurability. The new default for interactive_controlfile should then probably point to |
Okay the simulation directory structure is now as it was in previous versions. I will probably open a new PR for re-naming it and refactoring the dofile location as well (I see these as somewhat related). |
Tested with inverter. TO my opinion, can be merged. |
@ojarvin there seems to be a conflict. WIll you resolve it? |
Moi,
This branch is supposed to re-factor, clarify and improve the way simulation results and files are stored.
This is for now related to changes in the spice-module, but eventually this state saving/loading should work for any simulator model.
Changes related to file preserving properties:
preserve_iofiles(replaced by load_result)preserve_spicefiles(replaced by load_result)These changes are supposed to create clear separation between debug features (preserve_*), which are intended to be False unless some interface debugging is needed, and the result-saving features (save_state & load_state), which are meant for typical testbench usage.
You need to use branch "save_state" in spice if you want to test this branch!