-
Notifications
You must be signed in to change notification settings - Fork 154
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
Use of ~LONGESTPERIOD
prevents absolute time calculation in Clash simulation
#2455
Comments
It was done to fix issue #2001 so a static value will always be wrong if we have clock period that is longer than said static value. So perhaps we can add a static value on top of |
Why do we even model GSR in #2452? According to https://docs.xilinx.com/r/en-US/ug900-vivado-logic-simulation/Global-Set-and-Reset-Net you only want to deal with explicit GSR in post-synt/post-impl simulation. |
Perhaps we want to change:
to: See also: https://docs.xilinx.com/r/2021.2-English/ug900-vivado-logic-simulation/Behavioral-Simulation |
Huh, I never realised we were not running a behavioural simulation in Xilinx 😅 I agree, let's switch to behavioural simulation. Perhaps it will even be less hideously slow. |
It's what the Xilinx's
+
We do :). |
Adding 100 ns would entirely sidestep my issues. |
@martijnbastiaan where in the docs does it say that behavioral is the default? https://docs.xilinx.com/r/2021.2-English/ug900-vivado-logic-simulation/Behavioral-Simulation seems to suggest otherwise. |
We've released v1.8.0, which includes a fix for this issue. |
Xilinx's primitive models use a global set/reset (GSR) that is used to implement initial values. This reset signal is (by default) defined as asserted for 100 ns. Therefore, to faithfully replicate the VHDL/Verilog model, Clash simulation will have to know the absolute simulation time. Unfortunately, Clash's clock generation primitives wait for
~LONGESTPERIOD
before it makes clock tick, a value only known at RTL compile time.Encountered in: #2452. Waveform:
Note that the first three cycles (0000, 0001, 0002) are ignored by the pipeline because GSR is asserted.
@christiaanb Do you remember the rationale behind
~LONGESTPERIOD
? Could we simply deprecate it / set it to a static value?The text was updated successfully, but these errors were encountered: