Skip to content

Simulation: revert deepcopy of 'dut'? #279

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

Open
gasparka opened this issue Aug 2, 2018 · 0 comments
Open

Simulation: revert deepcopy of 'dut'? #279

gasparka opened this issue Aug 2, 2018 · 0 comments

Comments

@gasparka
Copy link
Owner

gasparka commented Aug 2, 2018

The simulate function used to contaminate the input dut object, for example it added type information that was gathered from the simulation. Benefit of this was that after simulaton the same dut could be observed for changed values etc..

Downside was that since values in dut changed, it was not possible to run more than 1 simulation.
Because of this i changed the way how simulate works: now it makes a deepcopy of the input and uses that for simulation, thus the original dut stays untouched!

Now i need to add a convertToVHDL function that takes in a simulated object, for this i feel that the change should be reverted i.e. User can simulate the dut and then pass it to the convert.

Maybe there should be a flag dut._pyha_is_simulated that disables running successive simulations. Running simulation from non-default state can be major confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant