sun_ray
Advanced Member level 3
- Joined
- Oct 3, 2011
- Messages
- 772
- Helped
- 5
- Reputation
- 10
- Reaction score
- 5
- Trophy points
- 1,298
- Activity points
- 6,828
always @ (posedge clk, posedge rst) begin
if(rst) begin
reg <= 1'b0;
end else if(enable) begin
reg <= signal;
end
end
Below is the process that will synthesize to a flop with positive edge triggered clock, asynchronous positive edge reset and clk gating will be inferred. The main idea is to have enable controlling whether data content of the flop changes or not.
Code:always @ (posedge clk, posedge rst) begin if(rst) begin reg <= 1'b0; end else if(enable) begin reg <= signal; end end
morris_mano
Will the synthesis tool automatically be able to infer and pick up that clock gating cell for this kind of rtl which you coded? Thanks for your reply.
What do you suggest about the code by rocking_vlsi?
Regards
sun_ray,
rocking_vlsi has given code for clock gating cell itself. While synthesizing, you will have option to tell the tool whether to use the standard cell (clk gating cell) that may come up with the standard cell lib or you could write your own rtl like rocking_vlsi has done. Then wherever, the synthesis tool infer clock gating cell, it will insert the clock gating cell with the one you have specified.
Regards.
You need to understand the difference between actual instantiation of clock gating cell and inferred clock gating cell. Do you have options of running simple synthesis flow? Try running with a design where you have instantiated clock gating cell of rocking_vlsi module as well as using RTL as I have described earlier. After synthesis, if you do clock gating report, it will show two types of clock gating in the design. One instantiated and one inferred. Doing this will give you clearer understanding , rather than me trying to explain it. For instantiated one, you can manually instantiate standard cell clock gating cell also, or rtl level clock gating cell as shown by rocking_vlsi.
1. No.
2. Yes.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?