Average, add n-bit numbers together and then divide by nbit numbers
I am having trouble putting this code together. My main code is a state machine. It adds 2 numbers together = sum then loads A to add A to sum (sum=a+sum) after clock is reached. It then divides by n bit. I'm having Lots of trouble assigning outputs. What is legal and what is not am I able to set the regs equal to each other sometimes I feel like I can do that and some other times I cannot. If I use the module, can the input be an output and vice versa? I posted my whole code because I wanted to get it to work. I think my device is correct, but I need to create a testbench to test it. module A
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.