3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 21:27:00 +00:00

Fix the truth table for $_SR_* cells.

This brings the documented behavior for these cells in line with
$_DFFSR_* and $_DLATCHSR_*, which is that R has priority over S.
The models were already reflecting that behavior.

Also get rid of sim-synth mismatch in the models while we're at it.
This commit is contained in:
Marcelina Kościelnicka 2020-04-11 16:03:19 +02:00
parent 7ad8b24280
commit 53ba3cf718
3 changed files with 21 additions and 26 deletions

View file

@ -1633,7 +1633,7 @@ wire [WIDTH-1:0] pos_clr = CLR_POLARITY ? CLR : ~CLR;
genvar i;
generate
for (i = 0; i < WIDTH; i = i+1) begin:bitslices
always @(posedge pos_set[i], posedge pos_clr[i])
always @*
if (pos_clr[i])
Q[i] <= 0;
else if (pos_set[i])