3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-15 17:06:40 +00:00

clockgate: EN can be a bit on a multi-bit wire

This commit is contained in:
Emil J. Tywoniak 2024-09-11 19:18:25 +02:00
parent 8b464341c2
commit 1e999a3cb7
2 changed files with 38 additions and 13 deletions

View file

@ -171,4 +171,26 @@ select -module bad2 -assert-count 0 t:\\pdk_icg
#------------------------------------------------------------------------------
# Regression test: EN is a bit from a multi-bit wire
design -reset
read_verilog << EOT
module dffe_wide_11( input clk, input [1:0] en,
input [3:0] d1, output reg [3:0] q1,
);
always @( posedge clk ) begin
if ( en[0] )
q1 <= d1;
end
endmodule
EOT
proc
opt
clockgate -pos pdk_icg ce:clkin:clkout -tie_lo scanen
select -assert-count 1 t:\\pdk_icg
#------------------------------------------------------------------------------
# TODO test -tie_lo