EmbDev.net

Forum: FPGA, VHDL & Verilog force input in simulation wrong.


Author: fuck_modelsim (Guest)
Posted on:

Rate this post
0 useful
not useful
this software is a nightmare!!

i have a simualtion running, it is a 32bit multiplier.
but for some reason when i force a "10" it outputs "16".
so for example if i try to multiplie 10*2 it gives me the result 16*2 = 
32;
i put the radix in decimal but it still goes on like this. why?

btw, its like that with all the numbers with zero, meaning 20 is 32.

Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
fuck_modelsim wrote:
> when i force
That "forcing" thing is the wrong way to s(t)imulate a HDL design. Use a 
test bench insted.

> but for some reason when i force a "10" it outputs "16".
Obviously the 10 is a hexadecimal number. Thats fairly usual in 
hardware design...

: Edited by Moderator
Author: ee_vhdl (Guest)
Posted on:

Rate this post
0 useful
not useful
Lothar M. wrote:
> fuck_modelsim wrote:
>> when i force
> That "forcing" thing is the wrong way to s(t)imulate a HDL design. Use a
> test bench insted.
>
>> but for some reason when i force a "10" it outputs "16".
> Obviously the 10 is a hexadecimal number. Thats fairly usual in
> hardware design...

can u explain to me what is a test bench and how do i do one?
i know its super basic.. the thing is my college provided just 3 classes 
on vhdl and now they want us to create an intire project with it.

Reply

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.