How could I output a real signal to std_logic_vector?

W

Will

Hi all,

I'm really new to VHDL. I need to output a real signal. How could I
convert it to std_logic_vector? Or, could I output a real number
directly?
BTW, is there any way that I could monitor variables during test bench
simulation like debugging in other language?

Thanks and bow.
 
Joined
Dec 9, 2008
Messages
88
Reaction score
0
Well, first you need some definition for your 'real' signal. If you can define it as a std_logic_vector then you are done.

signal clk_scaler : unsigned(20 downto 0);

What is your definition of 'real'? Not 'imaginary' (1 + i1)?

Yes, your test bench will let you see about anything that makes it through the compiler.
 
Joined
Mar 7, 2009
Messages
9
Reaction score
0
in VHDL you can set your signal into any number. you can write any signed or unsigned number on it and your output signal will carry that value until you change it.

the question regarding creating a real signal... if you are talking about actual signals such as sinusoid i do not think you can do that. you can create a squarewave which is a simple clock in VHDL but thats about it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top