<mithro>
Now just need to figure out async_reg .....
<daveshah>
mithro: I think async_reg should just become keep for Yosys
<mithro>
daveshah: oh?
<daveshah>
And even then that only matters if you enable retiming - which is disabled by default
<daveshah>
All you are saying for async_reg from a synthesis point of view is don't move or optimise away the register
<daveshah>
Obviously it also needs to be passed on to place and route and STA so they can deal with it too
<mithro>
• A register can receive asynchronous data on the D input pin relative to its source clock.
<daveshah>
Yes, it is intended for a typical synchroniser chain to prevent metastability
<daveshah>
You want the FFs of the chain to be as close together as possible to maximise the slack available to remove metastability
<daveshah>
you also don't want logic placed between them during retiming
<mithro>
• The register is a synchronizing register within a synchronization chain.
<mithro>
ASYNC_REG modifies the register to output the last known value even though a timing violation occurs.
<daveshah>
That last paragraph will be refering to simulation
<mithro>
Specifying ASYNC_REG also affects optimization, placement, and routing to improve Mean Time Before Failure (MTBF) for registers that may go metastable. If ASYNC_REG is applied, the placer will ensure the flip-flops on a synchronization chain are placed closely to maximize MTBF. Registers with ASYNC_REG that are directly connected will be grouped and placed together into a single SLICE, assuming they have a compatible control set
<mithro>
and the number of registers does not exceed the available resources of the SLICE.
<mithro>
daveshah: So you seem to be correct, we want keep set
<mithro>
daveshah: And we want to pass through to place and route
<daveshah>
Yeap
<mithro>
So, I'll need
<mithro>
setattr -set keep 1 a:async_reg=true
<daveshah>
Yes
<daveshah>
(btw - do you see here why in Yosys an empty selection isn't an error :D)
<mithro>
daveshah: Well, I still think a selection should have something like an "-allow_empty" type flag or something....
<daveshah>
You would break every existing script with that though...
lutsabound has quit [Quit: Connection closed for inactivity]
<mithro>
daveshah: Yeah, probably too late now
<daveshah>
mithro: I suppose you could have it the other way round, so you specify something to enable the error. But then people would have to remember to use it