Forum: FPGA, VHDL & Verilog Verilog Hardware primitives giving odd output

Author: RandomCEStudent (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
I am a student just starting with Verilog and am trying to create a 
module to take all the numbers between 0 and 63 and then modulo them by 
three and five.

I am trying to do it with a pair of hardware primitives, and the modulo 
three works, but trying to modulo by other numbers mysteriously does 
not. I have tried 2/3/4/5/10 now and they have all given me very odd 
output in both the simulator and on the DE2 board I am working with.

Things I have tried as well: using only one primitive in the top level, 
separate inputs for the different primitives, changing the amount of 
time in the test bench, and re-writing the entire truth table. I get the 
same wrong outputs every time regardless of what I do.

The zip file included has text files for the outputs of all the 
different modulos, and the source files for the top level module, the 
test bench, and all the different modulos I have created.


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.