Skip to content

Commit

Permalink
tests: fix dfflibmap test - false negative conflict multiple -liberty…
Browse files Browse the repository at this point in the history
… vs enable inference
  • Loading branch information
widlarizer committed Dec 10, 2024
1 parent 87736a2 commit 55dcf0e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 27 deletions.
9 changes: 5 additions & 4 deletions tests/techmap/dfflibmap.ys
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ select -assert-count 1 t:dffe
select -assert-none t:dffn t:dffsr t:dffe t:$_NOT_ %% %n t:* %i

design -load orig
dfflibmap -prepare -liberty dfflibmap_dffn.lib -liberty dfflibmap_dffsr.lib
dfflibmap -map-only -liberty dfflibmap_dffn.lib -liberty dfflibmap_dffsr.lib
dfflibmap -prepare -liberty dfflibmap_dffn_dffe.lib -liberty dfflibmap_dffsr.lib
dfflibmap -map-only -liberty dfflibmap_dffn_dffe.lib -liberty dfflibmap_dffsr.lib
clean

select -assert-count 4 t:$_NOT_
select -assert-count 5 t:$_NOT_
select -assert-count 1 t:dffn
select -assert-count 1 t:dffe
select -assert-count 4 t:dffsr
select -assert-none t:dffn t:dffsr t:$_NOT_ %% %n t:* %i
select -assert-none t:dffn t:dffsr t:dffe t:$_NOT_ %% %n t:* %i

design -load orig
dfflibmap -liberty dfflibmap.lib -dont_use *ffn
Expand Down
23 changes: 0 additions & 23 deletions tests/techmap/dfflibmap_dffn.lib

This file was deleted.

47 changes: 47 additions & 0 deletions tests/techmap/dfflibmap_dffn_dffe.lib
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
library(test) {
cell (dffn) {
area : 6;
ff("IQ", "IQN") {
next_state : "D";
clocked_on : "!CLK";
}
pin(D) {
direction : input;
}
pin(CLK) {
direction : input;
}
pin(Q) {
direction: output;
function : "IQ";
}
pin(QN) {
direction: output;
function : "IQN";
}
}
cell (dffe) {
area : 6;
ff("IQ", "IQN") {
next_state : "(D&EN) | (IQ&!EN)";
clocked_on : "!CLK";
}
pin(D) {
direction : input;
}
pin(EN) {
direction : input;
}
pin(CLK) {
direction : input;
}
pin(Q) {
direction: output;
function : "IQ";
}
pin(QN) {
direction: output;
function : "IQN";
}
}
}

0 comments on commit 55dcf0e

Please sign in to comment.