Forum: FPGA, VHDL & Verilog FPGA Frequency Divider

von _Jaiko 0. (jaiko)

Attached files:

Rate this post
0 useful
not useful

I need to design frequency divider that adjusts the clock frequency from 
50MHz to 200Hz so that it generates 200 pulse signal every second by 
using FPGA. I'm using Xilinx and the language that I used is VHDL 
language. I got stuck because I can't get the output. The frequency 
divider has 2 input ports and 1 output port. Here I attach my code.


von Mr. FPGA (Guest)

Rate this post
0 useful
not useful
dude, there so many frequency devider threads in this and other Forums, 
that the solution is just a Google click away.

regarding your code: it should be advisable to discuss this with your 
teachers to figure out your false appraoch to this subject

golden way: design with real components and learn vhdl after having the 
knowledge how circuits do operate

von Lothar M. (lkmiller) (Moderator)

Rate this post
0 useful
not useful
Mr. FPGA wrote:
> false appraoch to this subject
Indeed one MUST NOT generate a derived clock out of the one and only 
FPGA clock by using a counter. The only practical way is to create a 

So throughout the whole design there's only 1 clock and every other job 
is done by enable signals that are generated out of that clock being 
valid for 1 clock cycle.

See the creation of a 3 Hz clock enable for a chasing light there:
There you can see: only 1 clock is used throughout the whole design...

And: use integers for counters. That makes the code easily readable even 
for humans...

: Edited by Moderator


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.