Commit d3210b8a by SergeyDegtyar

Fix failed tests

parent 4c8a3c38
...@@ -152,7 +152,7 @@ $(eval $(call template,tribuf_logic,tribuf_logic_top tribuf_merge_logic_top)) ...@@ -152,7 +152,7 @@ $(eval $(call template,tribuf_logic,tribuf_logic_top tribuf_merge_logic_top))
#expose #expose
$(eval $(call template,expose,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_dff expose_evert_shared expose_evert_dff_shared)) $(eval $(call template,expose,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_dff expose_evert_shared expose_evert_dff_shared))
$(eval $(call template,expose_dff,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_dff expose_evert_shared expose_evert_dff_shared)) $(eval $(call template,expose_dff,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_dff expose_evert_shared expose_evert_dff_shared))
$(eval $(call template,expose_ffs,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_dff expose_evert_shared expose_evert_dff_shared)) $(eval $(call template,expose_ffs,expose_cut expose_input expose_evert expose_sep expose_shared expose_dff expose_evert_shared expose_evert_dff_shared))
#opt_demorgan #opt_demorgan
$(eval $(call template,opt_demorgan,opt_demorgan)) $(eval $(call template,opt_demorgan,opt_demorgan))
......
...@@ -15,9 +15,9 @@ module adff ...@@ -15,9 +15,9 @@ module adff
end end
always @( posedge clk, posedge clr ) always @( posedge clk, posedge clr )
if ( clr ) if ( clr )
`ifndef BUG `ifndef BUG
q <= 1'b0; q <= 1'b0;
`else `else
q <= d; q <= d;
`endif `endif
else else
...@@ -32,9 +32,9 @@ module adffn ...@@ -32,9 +32,9 @@ module adffn
end end
always @( posedge clk, negedge clr ) always @( posedge clk, negedge clr )
if ( !clr ) if ( !clr )
`ifndef BUG `ifndef BUG
q <= 1'b0; q <= 1'b0;
`else `else
q <= d; q <= d;
`endif `endif
else else
...@@ -49,9 +49,9 @@ module dffe ...@@ -49,9 +49,9 @@ module dffe
end end
always @( posedge clk ) always @( posedge clk )
if ( en ) if ( en )
`ifndef BUG `ifndef BUG
q <= d; q <= d;
`else `else
q <= 1'b0; q <= 1'b0;
`endif `endif
endmodule endmodule
...@@ -63,9 +63,9 @@ module dffsr ...@@ -63,9 +63,9 @@ module dffsr
end end
always @( posedge clk, posedge pre, posedge clr ) always @( posedge clk, posedge pre, posedge clr )
if ( clr ) if ( clr )
`ifndef BUG `ifndef BUG
q <= 1'b0; q <= 1'b0;
`else `else
q <= d; q <= d;
`endif `endif
else if ( pre ) else if ( pre )
...@@ -78,18 +78,18 @@ module ndffnsnr ...@@ -78,18 +78,18 @@ module ndffnsnr
( d, clk, pre, clr, q ); ( d, clk, pre, clr, q );
parameter s=2; parameter s=2;
parameter l=1; parameter l=1;
input [s-1:l] d; input [s-1:l] d;
input clk, pre, clr; input clk, pre, clr;
output reg [s-1:l] q; output reg [s-1:l] q;
initial begin initial begin
q = 2'b11; q = 2'b11;
end end
always @( negedge clk, negedge pre, negedge clr ) always @( negedge clk, negedge pre, negedge clr )
if ( !clr ) if ( !clr )
`ifndef BUG `ifndef BUG
q <= 2'b00; q <= 2'b00;
`else `else
q <= d; q <= d;
`endif `endif
else if ( !pre ) else if ( !pre )
...@@ -108,6 +108,8 @@ output b,b1,b2,b3,b4 ...@@ -108,6 +108,8 @@ output b,b1,b2,b3,b4
wire a1,b11; wire a1,b11;
parameter x = 0;
dffsr u_dffsr ( dffsr u_dffsr (
.clk (clk ), .clk (clk ),
.clr (clr), .clr (clr),
...@@ -115,7 +117,7 @@ dffsr u_dffsr ( ...@@ -115,7 +117,7 @@ dffsr u_dffsr (
.d (a ), .d (a ),
.q (b ) .q (b )
); );
ndffnsnr #(4) u_ndffnsnr ( ndffnsnr #(4) u_ndffnsnr (
.clk (clk ), .clk (clk ),
.clr (clr), .clr (clr),
...@@ -123,23 +125,23 @@ ndffnsnr #(4) u_ndffnsnr ( ...@@ -123,23 +125,23 @@ ndffnsnr #(4) u_ndffnsnr (
.d ({a,a1} ), .d ({a,a1} ),
.q ({b1,b11} ) .q ({b1,b11} )
); );
defparam u_ndffnsnr.l = 0; defparam u_ndffnsnr.l = 0;
adff u_adff ( adff u_adff (
.clk (clk ), .clk (clk ),
.clr (clr), .clr (clr),
.d (a ), .d (a ),
.q (b2 ) .q (b2 )
); );
adffn u_adffn ( adffn u_adffn (
.clk (clk ), .clk (clk ),
.clr (clr), .clr (clr),
.d (a ), .d (a ),
.q (b3 ) .q (b3 )
); );
dffe u_dffe ( dffe u_dffe (
.clk (clk ), .clk (clk ),
.en (clr), .en (clr),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment