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

Refactor IOStreamer and QSPI #700

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Sep 22, 2024

  1. gateware.iostream.IOStreamer: add support for sample delay

    Added support for additionally delaying when the sample is taken.
    Normally the samples are taken at a time when the input signals
    change that have been launched at the same time as i_en, however
    this allows us to take samples later, specified in number of
    sync clock cycles. Additionally for ratio=2 iostreamer we can also
    delay by half a clock cycle.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    cec6a72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10aa480 View commit details
    Browse the repository at this point in the history
  3. Reapply "gateware.iostream.IOStreamer: fix bug for incorrect sampling…

    … DDR inputs"
    
    This reverts commit d1cc5d9.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    1e00d28 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    82a7b66 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    465d306 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    91f7757 View commit details
    Browse the repository at this point in the history
  7. added sample delay tests

    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    8756b70 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e1d96db View commit details
    Browse the repository at this point in the history
  9. test_iostream: sdr input sample test: use any edge to signify sampling

    This changes how the sdr input sampling test works. Before only positive
    edges on clk_out would signify to the testbench that the input has been
    sampled. The old behavior put a constraint on payload, that i_en must be
    high only for every second payload. This was less then ideal for developing
    stronger skid buffer tests.
    
    This change slows down the clk_out signal, and now any edge (positive or
    negative), means that we have sampled something. In the waves only the
    shape of clk_out changes, the rest of the signals stay the same. (i.e.
    the same values are sampled at the same times)
    
    The DDR input sample test does not require a similar change to it.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    8718b8b View commit details
    Browse the repository at this point in the history
  10. gateware.iostream.IOStreamer: fix same-cycle skid buffer push/pop

    There was a corner-case in IOStreamer where a sample could be lost,
    if it arrives to the skid buffer on the same cycle as when another
    sample is removed from the skid buffer.
    
    This PR also adds many more testcases.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    7a9d057 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a0e43cc View commit details
    Browse the repository at this point in the history
  12. test_iostream: refactor sampling to make it use .sample()

    This better relays the intent that we want to sample the
    "old" value of the inputs in case they change at the same time
    as clk_out, and may work better if input_generator_tb changes
    in the future.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    eab84b8 View commit details
    Browse the repository at this point in the history
  13. iostream ddr testcase: remove glitch mitigation, because new version …

    …of SimulatableDDRBuffer is glitchless
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    c20339a View commit details
    Browse the repository at this point in the history
  14. gateware.iostream.IOStreamer: let o_stream transfer if i_stream not rdy

    This change allows o_stream to take at least one transfer, as long as
    there are no sample transfers in flight. This will prevent deadlocks,
    for example if i_stream is implemented with something like:
    ```m.d.comb += ready.eq(valid)```
    Which is valid according to stream rules.
    
    This commit also adds tests for this.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    0cd5632 View commit details
    Browse the repository at this point in the history
  15. Refactor everything around IOStreamer, and QSPIController

    There is a slight change in behavior, because the "bypass" feature has been removed,
    CS clock pulses must now be at least 1 QPSI cycle long.
    
    `sample_delay_half_clocks` is now runtime-selectable.
    
    `max_sample_delay_half_clocks` is now a configuration option, for the IOStreamerTop to know how many resources to allocate.
    
    `min_divisor` is now a configuration option, that if set to > 0, allows IOStreamer to optimize away some uneeded resources.
    
    The bulk of the changes is about cutting up the functionality into smaller sub-components.
    purdeaandrei committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    a4f9696 View commit details
    Browse the repository at this point in the history