platforms: asap7: Fixed set/reset signals for DFFASRHQNx1_ASAP7_75t_R#3215
Conversation
Signed-off-by: Jan Bylicki <jbylicki@antmicro.com>
|
@maliberty this is an important fix. Mind taking a look when you can |
|
Please make a similar PR for https://github.com/The-OpenROAD-Project/asap7sc7p5t_28 |
|
@jbylicki @QuantamHD How do we know the Liberty model is to blame? Looking at Yosys code I think this is likely a bug in interpretation of the model when a flop has both async set/clear signals and an inverted data input. |
|
We analyzed the generated code emitted after synthesis and:
Otherwise, the synthesis correctly mapped the implemented logic. Only |
|
I think you're saying that you expect |
|
The more certain method is to look at the CDL netlist and determine the functionality from the transistors. |
|
CDL notwithstanding we may have introduced a mismatch between the Liberty and Verilog models. Looking at When |
|
I see RESETn is an active-low reset and SETn is an active-low preset. I see it as non-inverting from D to Q so does not seem correct. I think QN should have function be IQNN. The name itself seems strange for a non-inverting gate. |
|
Unless I've made some mistake in examining the CDL that doesn't seem to be true. |
|
The names make more sense if that is the functionality.... |
|
I believe the changes to the Liberty here are correct. I haven't traced the Verilog simulation models. @povik do they need updating too? |
|
I believe the Liberty changes are incorrect and the schematic agrees with the truth table above (active SETN sets QN to zero and active RESETN sets QN to one) |
|
@povik I agree this is wrong. I'll revert unless @QuantamHD or @jbylicki want to argue their side. |
|
It just needs to be correct. I have no opinion. |
|
I think the actual issue is inside Yosys near this line https://github.com/YosysHQ/yosys/blob/e0747b71b7308d1a1ef72506a932908ea06329b6/passes/techmap/dfflibmap.cc#L317 The code is confused whether |
|
@povik does it make sense to file a yosys issue then? |
|
Yes, the details above should be helpful to whoever fixes it |



The definitions for
DFFASRHQNx1_ASAP7_75t_Rappear to be invalid. When they get a reset signal, they will have each bit of their initial state invalid. This Pull Request aims to correct this problem.Steps to reproduce:
Prerequisites:
5.036(tested on commitcfbcfd913c9c). I've confirmed the issue on an industry-standard, proprietary simulator and it displays the same behavior.$ORFS: path to base directory ofOpenROAD-flow-scriptsFiles used for the design:
countdown.sv,countdown_tb.sv,config.mkandconstraint.sdcare included to this PR as a.ziparchive.config.mkrequires paths to be updated based on individual configuration.Steps:
make -C $ORFS/flow DESIGN_CONFIG=$(pwd)/config.mk clean_all synth$PWD/verilator:./verilator/countdownOutput pre-change:
Please note that at time interval
500, when reset is asserted, the original state'svalbits are flipped, ascountdown.svdefines the reset state to be3'b101Relevant files:
asap7-pr-files.zip