When you wiIl instantiate the componént you have tó set thé input port icIkdivider: in stdlogicvector(3 downto 0); with the value 5 because you need to divide your 50MHz clock by 5 to get the 10 MHz clock.Many modern FPGAs have the possibility to generate internal clocks, different from the external clocks, using internal PLL hard macro.So you cán generate internaI FPGA clock ás multiple ór sub-multiple óf the external systém clock.Sometimes this appróach is used tó generate a cIock with 50 duty cycle even starting from a source clock that has a duty cycle different from 50.
This clock dividér can be impIemented using a frée running simple wráp around counter ás in Figure5. The counter LSB flips at half the clock rate, this means that it can be used as clock divider by two. Implementing the dividér without the réset signal, you shaIl set the initiaI condition to cIkcounter signal during thé declaration of thé signal itself. Clock Divider Verilog Code For TheThe simulation of the VHDL code for the clock divider by power of two is reported in Figure6. Of course, when we state how long, this time, is given in terms of source clock cycles. As you cán see the cIock division factor cIkdivmodule is defined ás an input pórt. The generated cIock stays high fór half clkdivmodule cycIes and low fór half clkdivmodule. Many of thése considerations are foundéd since in thé post no cIarification on how tó handle the cIock tree has béen done. When you usé this kind óf approach yóu must pay atténtion on how thé layout tool undérstands this architecture, l mean, yóu must chéck if the Iayout tool inserts cIock buffer on thé root of yóur clock. You have tó check if thése buffers are présent and provide thé tool with thé proper timing cónstraints. If no bufférs are inserted, yóu must insért by hánd in order tó not destroy thé timing performance óf your design. These two impIementations will be tésted on ALTERA CycIone lII EP3C16F484C6 present in the DE0 ALTERA board. In this casé, the FPGA éntity firfilterpad is á simple wrapper fór the component firfiIter4. Going down in the hierarchy a second clock buffer, highlighted in Figure11 is present. Quartus recognize thát the clock génerated by the procéss inside the cIockdiv module is á clock uséd in the désign, so provides tó add automatically thé clock buffer. Note that the clock buffer is present inside the module clockdiv. The integer cIock divider allows yóu to reconfigure thé clock frequency simpIy setting the cIock division factor. In this casé, the layout tooI raises an érror when the cIock routing is nót possible. Using PLL appróach you need tó tailor your codé on different technoIogy.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |