-
Notifications
You must be signed in to change notification settings - Fork 178
Mocks of combinational circuits and add_process
#1193
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
Comments
Sorry, I am confused about your example. You say that you are simulating a combinational circuit, but you are using |
Wait, is this code pattern why you wanted |
Sorry, for introducing confusion. My example should present a scenario where the simulated circuit is synchronous, but it uses some external combinational modules. In unit tests such external modules should be substituted by mock processes to verify only interesting module. In my example The presented example is very artificial, but I wanted to keep it simple and minimal. In reality in transactron we have modules which takes
Roughly yes. Using If you want to see real, not minimalized example, you can see on
yield Settle()
yield Settle()
yield Settle() (One more |
I see in amaranth-lang/rfcs#36 proposition to introduce |
RFC 36 has been merged. Does it fit your use case? |
Yes. It should fit and I see that #1213 is added to 0.5 milestone so we will be available in the same version as RFC 27, so there will be no problem in transition time. Thanks! |
Hi,
recently there was implemented RFC 27 and now the
yield Settle()
inadd_process
is deprecated. I would like to ask how in the new way of testing, mocks for external combinational circuits should be implemented. As I understand mocks are behavioural replacement so according to RFC 27 they should be implemented withadd_process
. But in case of combinational circuits there is a race. Here is an example:The example is based on the fact that first inputs to external module has to be calculated and after that we can safely execute body of
proc
.The
yield Settle
can be removed ifproc
will be changed toadd_testbench
, but according to amaranth-lang/rfcs#36 (comment) there are doubts if testbenches should be allowed to be passive. Whats more this doesn't scale up. If we add a second external module in the chain, then testbenches also stops to work:What is the current way of mocking external combinational stuff after RFC 27?
The text was updated successfully, but these errors were encountered: