Re: Low frequency clock generation - need help
- From: Svenn Are Bjerkem <svenn.bjerkem@xxxxxxxxxxxxxx>
- Date: Mon, 6 Oct 2008 02:10:27 -0700 (PDT)
On Oct 2, 1:38 pm, KJ <kkjenni...@xxxxxxxxxxxxx> wrote:
On Oct 1, 4:33 pm, Svenn Are Bjerkem <svenn.bjer...@xxxxxxxxxxxxxx>
wrote:
Pulse shortener is made with one flip-flop clocked by sys_clk taking
qn to and with sys_clk. Both the counter and the pulse shortener is
clocked by the negative edge of sys_clk to have the clock enable
signal high when rising_edge on sys_clk happens. (Does using negative
edge (inverted sys_clk) need another clock buffer?)
No, but it is also unneeded and not helpful to use the negative edge
of the clock. You should be using the rising edge for the clock
enable, using the negative edge simply cuts down by 1/2 the max clock
rate that you can run the design at.
Shouldn't the enable mask be available well before and after the
rising edge of the system clock? I see no other possibility than to
use the negative edge to achieve this. What happens when there is skew
on the enable input related to the clock input on a ff due to wire
lengths?
I have no idea why you are using any DCMs for SPI. At the start you
said that you had implemented the counter and clock enable both
running off of the system clock. In any case, it is simple to add
whatever additional clock enables you may need.
What I meant was that the chip only has 2 DCM modules and 8 global
clock buffers. The synthesiser used all global clock buffers and
wanted more before I had integrated all my SPI modules. I then only
had the DCMs to spend, but they are assigned for other purposes in the
final design.
I think I have understood the benefits of using clock enable, both
through not having enough ressources and through different postings in
webforums, so I sat down and coded and coded but didn't really like
what I saw as a result.
What did you see? Why did you not like it?
When I looked at the code that I wrote to generate the two enables,
one for the spi clock toggling and one for the state machine, the
number of code lines were almost exceeding the number of lines in my
spi code. I am maybe too minimalistic since I come from ASIC full
custom design where I place my gates by hand. The synthesized logic
also looked larger than nescessary, but I think the mapper reduce
things for me "magically" when I generate the FPGA binary file. (I
still use ISE in noob mode)
I have searched on the net for some hours without finding any document
that really shows a best-practices solution on how to generate and use
clock enables for peripheral serial devices.
You didn't look too hard then. Symon reply also shows how to generate
and use the clock enables.
Symons code was a reply to my statement ....
I really wonder why. It
is not rocket science, is it?
Not rocket science, just simple sequential boolean logic.
I am in the transition from ASIC to FPGA. Re-learning threshold, you
know ....
--
Svenn
.
- Follow-Ups:
- Re: Low frequency clock generation - need help
- From: Brian Drummond
- Re: Low frequency clock generation - need help
- From: KJ
- Re: Low frequency clock generation - need help
- References:
- Re: Low frequency clock generation - need help
- From: Svenn Are Bjerkem
- Re: Low frequency clock generation - need help
- From: KJ
- Re: Low frequency clock generation - need help
- Prev by Date: Re: Spartan 3E overmapping problem
- Next by Date: Re: OTU2 implementation with Virtex 4
- Previous by thread: Re: Low frequency clock generation - need help
- Next by thread: Re: Low frequency clock generation - need help
- Index(es):
Relevant Pages
|
Loading