Skip to content
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

VIO probes always output undefined, making them hard to use in simulation #2498

Open
martijnbastiaan opened this issue Jun 14, 2023 · 3 comments

Comments

@martijnbastiaan
Copy link
Member

martijnbastiaan commented Jun 14, 2023

I don't have a suggestion on how to handle this, unfortunately. Perhaps it is as simple as pointing out the existence of:

-- | 'True' in Haskell/Clash simulation. Replaced by 'False' when generating HDL.
clashSimulation :: Bool
clashSimulation = True
{-# NOINLINE clashSimulation #-}

@christiaanb
Copy link
Member

christiaanb commented Jun 14, 2023

I wonder which use case is the most common:

  1. Arguments are only provided by VIO; results are only consumed by VIO
  2. VIO used for debugging values passed to a subcircuit

I assume situation 2 is the most common, in which case it might be worth to make a version that muxes between the original argument and the VIO probe. It would pick the original argument in simulation only, and would pick the VIO probe when synthesized. We should then make this the default behavior and use the most convenient name; and maker the VIO probe that outputs undefined the special case with a less convenient name.

@leonschoorl
Copy link
Member

leonschoorl commented Jul 14, 2023

You have to provide an initial value for each probe.
Why don't we just always output those values in simulation?

@leonschoorl
Copy link
Member

The hardware-in-the-loop tests on bitide use option 1., where a script on a computer uses a VIO to start a test in the FPGA and to read the result of the test back.

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

No branches or pull requests

4 participants