Names for loops (clock enables, initial value after reset) #571
Replies: 3 comments 2 replies
-
This sounds good to me! |
Beta Was this translation helpful? Give feedback.
-
Our components specifying reset values set them after reset and select between I would prefer not having multiple signal: option (signal Bit) (* optional clock enable *)
-> option (signal B) (* optional reset value *)
-> (signal A * signal B -> cava (signal B)) -> signal A -> cava (signal B) |
Beta Was this translation helpful? Give feedback.
-
Yeah, agreed, and I don't have super strong views either. I do find it confusing when I come across a function call that has several |
Beta Was this translation helpful? Give feedback.
-
We've got clunky names for loops of various flavours of registers:
D
, outputQ
). This isFDR
in the Xilinx library.INIT
, inputs;D
, outputQ
). This isFDR
in the Xilinx library.D, CE
, outputQ
). This isFDRE
in the Xilinx library.INIT
, inputs;D, CE
, outputQ
). This isFDRE
in the Xilinx library.You can search for the descriptions of these registers in this Xilinx library guide.
All the registers we generate have two implicit input signals that we deliberately don't have access to in Cava but are wired up during netlist instantiation:
C
: the clock signal.R
: a synchronous reset signal. All registers we generate have a synchronous reset at the start of execution which is asserted once and then never asserted again (otherwise our semantics do not apply). We could chose to switch to an asynchronous reset if required.The latter case should be the only primitive element and the others defined as specializations of the component in library modules.
Now, given that our
loop
combinator is fused with a register how should we name the primitive loop combinator and all the specializations of it? We could follow the Xilinx naming convention:loop
which (morally) instantiates aFDR
loopInit
which has a compile time constant for the initial reset value which instantiates aFDR
loopCE
which instantiates aFDRE
loopInitCE
which has a compile time constant for the initial reset value which instantiates aFDRE
Any better ideas?
Note that except for the Xilinx specific designs (and even then we might not) we don't directly instantiate these registers, instead generating an
always
block sensitive the clock and reset which the Xilinx Vivado synthesis tools then map into actual register primitives. I do check the synthesized circuits to make sure they generated the registers I expected.Satnam
Beta Was this translation helpful? Give feedback.
All reactions