Verilog Hardware primitives giving odd output

Guest #2534293
Rate this post
• ▲ 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.
Attached files:

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.