Frans Skarman
02/02/2024, 1:29 PMwire ena;
wire[8:0] data;
wire ena_reg;
wire[8:0] data_reg;
always @(posedge clk) begin
ena_reg <= ena;
end
always @(posedge clk) begin
if (ena) begin
data_reg <= data;
end else begin
data_reg <= data_reg;
end
end
Synthesizing this with the default flow.tcl
generates multiplexers to select the next value, which is not what I want. I have tried the same thing on ice40 FPGAs using yosys and there it correctly does "clock gating" (it uses the enable pins on the registers)
Is clock gating like this even supported by openlane? Do I have to turn it on somehow? From searching around I've found that there is a clock gating cell: sky130_fd_sc_hd__dlclkp_1
but I have no idea how I'd begin to try and use thatMatt Liberty
02/04/2024, 2:34 AMdonn
02/04/2024, 1:56 PMFrans Skarman
02/06/2024, 8:57 AM