File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 81
81
select -assert-count 0 t:dffn
82
82
select -assert-count 5 t:dffsr
83
83
select -assert-count 1 t:dffe
84
+
85
+ design -load orig
86
+ dfflibmap -liberty dfflibmap.lib -liberty dfflibmap_dffsr_mixedpol.lib -dont_use dffsr
87
+ clean
88
+ # We have one more _NOT_ than with the regular dffsr
89
+ select -assert-count 6 t:$_NOT_
90
+ select -assert-count 1 t:dffn
91
+ select -assert-count 4 t:dffsr_mixedpol
92
+ select -assert-count 1 t:dffe
93
+ # The additional NOT is on ff2.
94
+ # Originally, ff2.R is an active high "set".
95
+ # dffsr_mixedpol has functionally swapped labels due to the next_state inversion,
96
+ # so we use its CLEAR port for the "set",
97
+ # but we have to invert it because the CLEAR pin is active low.
98
+ # ff2.CLEAR = !R
99
+ select -assert-count 1 c:ff2 %x:+[CLEAR] %ci t:$_NOT_ %i
Original file line number Diff line number Diff line change
1
+ library(test) {
2
+ cell (dffsr_mixedpol) {
3
+ area : 6;
4
+ ff("IQ", "IQN") {
5
+ // look here
6
+ next_state : "!D";
7
+ clocked_on : "CLK";
8
+ // look here
9
+ clear : "!CLEAR";
10
+ preset : "PRESET";
11
+ clear_preset_var1 : L;
12
+ clear_preset_var2 : L;
13
+ }
14
+ pin(D) {
15
+ direction : input;
16
+ }
17
+ pin(CLK) {
18
+ direction : input;
19
+ }
20
+ pin(CLEAR) {
21
+ direction : input;
22
+ }
23
+ pin(PRESET) {
24
+ direction : input;
25
+ }
26
+ pin(Q) {
27
+ direction: output;
28
+ function : "IQ";
29
+ }
30
+ pin(QN) {
31
+ direction: output;
32
+ function : "IQN";
33
+ }
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments