mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-18 07:59:31 +00:00
clockgate: formal liberty tests
This commit is contained in:
parent
f4a10a4808
commit
687e5442f2
5 changed files with 107 additions and 100 deletions
44
tests/techmap/clockgate.v
Normal file
44
tests/techmap/clockgate.v
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
module dffe_00( input clk, en,
|
||||
input d1, output reg q1,
|
||||
);
|
||||
always @( negedge clk ) begin
|
||||
if ( ~en )
|
||||
q1 <= d1;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module dffe_01( input clk, en,
|
||||
input d1, output reg q1,
|
||||
);
|
||||
always @( negedge clk ) begin
|
||||
if ( en )
|
||||
q1 <= d1;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module dffe_10( input clk, en,
|
||||
input d1, output reg q1,
|
||||
);
|
||||
always @( posedge clk ) begin
|
||||
if ( ~en )
|
||||
q1 <= d1;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module dffe_11( input clk, en,
|
||||
input d1, output reg q1,
|
||||
);
|
||||
always @( posedge clk ) begin
|
||||
if ( en )
|
||||
q1 <= d1;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module dffe_wide_11( input clk, en,
|
||||
input [3:0] d1, output reg [3:0] q1,
|
||||
);
|
||||
always @( posedge clk ) begin
|
||||
if ( en )
|
||||
q1 <= d1;
|
||||
end
|
||||
endmodule
|
||||
Loading…
Add table
Add a link
Reference in a new issue