[libre-riscv-dev] pipeline sync issues

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sat Apr 13 05:22:36 BST 2019


as an additional experiment, by analysing the vcd wave from FIFOs i
was able to ascertain that when fwft mode is off (first-write
fall-through), whilst the data falls through from a
write-to-being-read, the read-enable and read-ready signals *DO NOT*.

consequently, i had to introduce a "sync" (delay) on the connection to
next, i.e. both incoming n_i_valid *and* outgoing n_o_ready.

that in turn had me wondering if the introduction of the buffered FIFO
would work - it did - however it required *combinatorial* setting of
connection to next (i.e. both n_i_valid and n_o_ready).

the issue with fwft=True/False i believe may be part of the confusion
over the pipeline API.  here's the rules for fwft in SyncFIFO, from
the docstring:

fwft : bool
First-word fallthrough. If set, when ``readable`` rises, the first
entry is already
available, i.e. ``dout`` is valid. Otherwise, after ``readable``
rises, it is necessary
to strobe ``re`` for ``dout`` to become valid.

so, when fwft is True, comb may be used (passing through the
"readable" and "re" signals).

when fwft is False, SYNC must be used, to allow for the wait for dout
to become valid, because dout will be valid on the *next* clock cycle,
*NOT* the current one.

i have a suspicion that the difference between these two types of
rules are what is resulting in confusion in the pipeline API.

l.



More information about the libre-riscv-dev mailing list