2 (* techmap_celltype = "$_DFF_P_" *)
7 parameter [0:0] _TECHMAP_WIREINIT_Q_ = 1'bx;
9 ffbb #(.INIT(_TECHMAP_WIREINIT_Q_)) _TECHMAP_REPLACE_(.D(D), .Q(Q), .C(C));
11 wire _TECHMAP_FAIL_ = _TECHMAP_WIREINIT_Q_ === 1'b1;
13 wire _TECHMAP_REMOVEINIT_Q_ = 1'b1;
20 (* techmap_celltype = "$_DFF_P_" *)
25 parameter [0:0] _TECHMAP_WIREINIT_Q_ = 1'bx;
27 ffbb #(.INIT(_TECHMAP_WIREINIT_Q_)) _TECHMAP_REPLACE_(.D(D), .Q(Q), .C(C));
29 wire _TECHMAP_FAIL_ = _TECHMAP_WIREINIT_Q_ === 1'b1;
31 wire _TECHMAP_REMOVEINIT_Q_ = 1'b0;
35 design -stash map_noremove
39 parameter [0:0] INIT = 1'bx;
52 always @(posedge clk) begin
68 # Make sure the parameter was used properly.
69 select -assert-count 3 top/t:ffbb
70 select -set ff0 top/w:q0 %ci t:ffbb %i
71 select -set ffq0 top/w:qq0 %ci t:ffbb %i
72 select -set ffx top/w:qx %ci t:ffbb %i
73 select -assert-count 1 @ff0
74 select -assert-count 1 @ffq0
75 select -assert-count 1 @ffx
76 select -assert-count 1 @ff0 r:INIT=1'b0 %i
77 select -assert-count 1 @ffq0 r:INIT=1'b0 %i
78 select -assert-count 1 @ffx r:INIT=1'bx %i
79 select -assert-count 0 top/w:q1 %ci t:ffbb %i
80 # Make sure the init values are dropped from the wires iff mapping was performed.
81 select -assert-count 0 top/w:q0 a:init %i
82 select -assert-count 0 top/w:qq0 a:init %i
83 select -assert-count 1 top/w:q1 a:init=1'b1 %i
84 select -assert-count 0 top/w:qx a:init %i
90 techmap -map %map_noremove
92 # Make sure the parameter was used properly.
93 select -assert-count 3 top/t:ffbb
94 select -set ff0 top/w:q0 %ci t:ffbb %i
95 select -set ffq0 top/w:qq0 %ci t:ffbb %i
96 select -set ffx top/w:qx %ci t:ffbb %i
97 select -assert-count 1 @ff0
98 select -assert-count 1 @ffq0
99 select -assert-count 1 @ffx
100 select -assert-count 1 @ff0 r:INIT=1'b0 %i
101 select -assert-count 1 @ffq0 r:INIT=1'b0 %i
102 select -assert-count 1 @ffx r:INIT=1'bx %i
103 select -assert-count 0 top/w:q1 %ci t:ffbb %i
104 # Make sure the init values are not dropped from the wires.
105 select -assert-count 1 top/w:q0 a:init=1'b0 %i
106 select -assert-count 1 top/w:qq0 a:init=1'b0 %i
107 select -assert-count 1 top/w:q1 a:init=1'b1 %i
108 select -assert-count 0 top/w:qx a:init %i