Replies: 2 comments 1 reply
-
Negative edges are supported but on IHP there was a recent fix PR. You should make sure you are at the head of master. |
Beta Was this translation helpful? Give feedback.
-
Hi @maliberty, thanks a lot, that gave me some hints where to look and how to debug 😄 So I did some debugging and I think this is a pretty interesting problem:
What happened here: My clock divider essentially looks like this: wire[16:0] q;
assign clk_mult = q[5];
genvar i;
generate for (i = 0; i < 16; i = i+1)
begin: gen
tff inst (.clk(q[i]), .arstn(arstn), .q(q[i+1]));
end
endgenerate; The TFF: module tff(input clk, input arstn, output reg q);
always @(posedge clk or negedge arstn) begin
if (arstn == 1'b0)
q <= 1'b0;
else
q <= ~q;
end
endmodule You can see that This signal is routed to always @(negedge clk_mult) begin
if (mult_rst == 1'b1)
b_latched <= b;
else
b_latched <= {1'b0, b_latched[B_WIDTH-1:1]};
end So I think constraining Now in the final mapped netlist, for the clock divider: (* src = "/home/usr7/cd101-tt/src/hdl/tff.v:11.5-16.8" *)
sg13g2_dfrbp_1 \stop.syn.clki.gen[4].inst.q$_DFF_PN0_ (
.CLK(\stop.syn.clki.gen[3].inst.q ),
.D(_0037_),
.Q(\stop.syn.clk_mult ),
.Q_N(_0037_),
.RESET_B(\stop.syn.clki.arstn )
); So it assigned Let's look at the location where the
Actually all instances that trigger on the negative edge (all in this design), now use But: It breaks my timing contraints. If I additionally constrain net I could probably also rewrite the original HDL to just make clk_mult the inverted output and make the clocked FFs trigger on the pos edge. Then I assume I could probably constrain So what do you experts think? I this work opening a bug report? If you think it's a bug, I'll produce a complete, reduced testcase. If you think it's not an issue, any recommendations how to deal with it in the design? even if it didn't crash CTS, constraining |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm currently running one of my designs through the OpenRoad Flow Scripts flow with IHP PDK and it's complaining about unclocked register/latch pins in
2_1_floorplan.log
.I changed the floorplan script to do a verbose
check_setup
and had a look at the unclocked registers.All of them are clocked from one clock and all of them are clocked on the negative clock edge (
always @(negedge clk)
).Are falling-edge FFs supposed to work? I can't really seem to find any documentation for that, but maybe I just don't know the term to search for. When I change the verilog to use
posedge
, it no longer complains.Of course it's also possible that I just did not constrain that clock properly. However, I don't see any errors about that in the logs. This is the clock definition:
And all clocks in the design are then set to be asynchronous:
I use the same design with TinyTapeout and have run their OpenLane flow locally. I don't see any
unclocked
issues there, so I think this should work with proper flow configuration?Beta Was this translation helpful? Give feedback.
All reactions