Newer
Older
Digital logic: Ik noem logic zonder klok vaak "combinatorial logic". Deze term is op zich correct, maar de meer gangbare term is "combinational logic", zie
https://en.wikipedia.org/wiki/Combinational_logic . Ik zal dat aanpassen in de documentatie. De logic met klok wordt "sequential logic" genoemd. Tesamen heet het "digital logic".
Het verschil is dat sequential logic memory heeft (flip flop registers) en combinational logic niet. De combinational logic bepaalt de functie van de logic en de sequential logic de toestand. Daarnaast kan sequential logic ook nog dienen voor pipelining. Pipelining introduceert latency, en is (vaak) nodig om de kloktiming te halen, dwz om te zorgen dat de combinational logic output steeds stabiel is binnen een klokcycle. Hieronder heb ik geschetst hoe je functie, toestand en pipelining netjes gescheiden kunt houden bij het implementeren van register transfer level (RTL) code.
Idea / rule: Distinguish beteen state registers and pipeline registers.
. The state registers keep the state of the function and the function itself is programmed in combinatorial logic.

Eric Kooistra
committed
In this way the pipelining that is needed to achieve timing closure can be added independent of the function.
This approach could be described in a paper, because it is quite significant and differs from the well known
Gailser approach (that uses RL=1 and does not separate state from pipeline). AXI uses RL=0 but need to check
how it then handles pipelining.
. Components need pipelining to achieve timing closure. This pipelining causes a latency in the data
stream. This latency is typically no problem, because it only delays the output. If components need
flow control then the stream has a siso backpressure signal that must have a certain timing relation
to the sosi data signal. This timing relation is the ready latency (RL) and the RL can be >= 0. For
RL = 0 the ready signal acts as a data acknowledge and for RL > 0 the ready signal acts as a data
request signal. Adding pipelining to the sosi data increases the RL.
. The RL is explained in the Avalon specification. An example of RL = 0 are so called look ahead (Altera)
or first word fall through (Xilinx) FIFOs. In our UniBoard applications we use RL = 1. For most parts
of the design we try to not use flow control. I think that the Axi stream use RL = 0.
. The function operates with ready latency (RL) = 0, if it is combinatorial. If the stream has no flow
control then the pipeline is achieved as an output register stage. If the stream does need flow control,
then this output register stage increases the RL by 1. To restore the RL to 0 a dp_latency_adapter.vhd
is needed. This latency adapter also registers the ready, so it provides pipelining for both the output
stream sosi data as well as the output stream siso ready flow control.
. For new components the development approach implement the function for RL=0, so only with the state
registers. If the component does not use flow control, then it may still just wire the flow control
from output to input. If the component does use flow control than it can combinatorially impose this
on the incomming flow control and pass the combined flow control on to its input. For timing closure
the pipelining is added as a seperate stage. Either pipeline sosi if no flow control is needed
or pipeline siso if flow control is needed. For example: dp_block_resize.vhd, dp_block_select.vhd,
dp_counter.vhd.
. Components that do not need input flow control can support external flow control by simply wiring the
output_siso to the input_siso.
. Components that do need input flow control can OR their input flow control with the external flow control
and wire that to the input_siso.

Eric Kooistra
committed

Eric Kooistra
committed

Eric Kooistra
committed
Ref:
$RADIOHDL/tools/oneclick/doc/desp_firmware_dag_erko.txt