MSAKARIM
Full Member level 3
- Joined
- Jun 2, 2015
- Messages
- 154
- Helped
- 1
- Reputation
- 2
- Reaction score
- 4
- Trophy points
- 1,298
- Activity points
- 2,528
Do you mean using the same concept of decoder and AND gates but in this case to reset the unrequired functions instead of clocking the required?gating clocks is not recommended for FPGAs especially for fast fmax.
You can use reset instead to stop logic except clock.
Yes keep it in reset. this will stop logic but not clock >> this will save power too, right?Yes keep it in reset. this will stop logic but not clock. Alternatively use clock enable on every register.
Gating clock leads to hold violations even at low speeds. Though you can try it if it passes timing.
I read about the intelligent gating clock, is it or the method of gating reset is the best?power due logic signals toggling will be saved but that of clock itself will stay as clock is running freely nonstop.
this concept "Clock multiplexer for glitch-free clock" is suitable for two sources of clocks and I want to mux between them isn't it?The circuit shown on post #1 surely is not what you wanted to do, once the same clock is AND'ed from decoder at both clock Functions 1,2. BTW, even the synchronous reset approach should not be suited. Perhaps it is worthy to have a look at implementations of "Clock multiplexer for glitch-free clock".
What about using the above proposed "Clock multiplexer for glitch-free clock" circuit with the same clock, but without the OR logic at the end; in other words, only the FF circuitry itself ? This way, the output at the AND become the selected clock. Note that the FF's inbetween is what ensures the non-occurrence of glitches when selecting one of both clock outputs.in my question, I have only one clock source and I want to time multiplex it for the two functions
I did a simulation and it worked well (No glitches), is there possibles that it works well in simulation but not in real-time?Hi,
Let´s imagin the SELECT signal of post#1 comes form a clocked logic or FF.
So it is synchronous. So far so good.
Now let´s imagine the SELECT signal is generated/synchronized with the rising clock edge.
Then the SELECT signal is a bit delayed to the clock edge.
Now if you AND the clock and the SELECT signal (disabling = falling): The rising clock signal comes first then the SELECT signal goes LOW a little later.
The output goes HIGH with the rising clock edge (at this time the clock was still eanbled) but a very short time late it gets disabled and goes LOW. This is called a "glitch".
Since it is a very short pulse it may cause your function toe
* see a true clock pulse
* not to see a clock pulse
* or sometimes see a clock pulse
--> unreliable function.
(Sadly I don´t have a good drawing tool at my tablet)
But as already recommended: do a real test or do a simulation.
Klaus
If I use this "https://www.fpgadeveloper.com/2011/09/code-templates-clock-mux.html/" after the Decoder and gates (consider clk1,clk2) it will work well?Thanks for all the comments and this useful discussion, but now I'm confused because I'm going to implement this model using VHDL
I will use Xilinx Virtex7 FPGA,
I tried solutions of @andre_teprom and @kaz1 in simulation, they worked well.
I want to make a global solution of clock gating without glitches in FPGA ( I will write it in VHDL).
what one of them is the best? both ? or should I see how Virtex 7 implement the clock gating ?
--- Updated ---
I did a simulation and it worked well (No glitches), is there possibles that it works well in simulation but not in real-time?
HDL simulations don't show setup/hold/pulse_width violations, so in the real-world the design might not work as expected.I did a simulation and it worked well (No glitches), is there possibles that it works well in simulation but not in real-time?
--- Updated ---
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?