Fixed Point Binary

Joined
Dec 3, 2009
Messages
8
Reaction score
0
Hi,

I am trying to keep a running total, where when ever an event occurs add 0.36 to the total. At the moment I have it adding 1 each time:

Code:
signal DataCount : std_logic_vector(5 downto 0) := "000000";
DataCount <= DataCount + 1;

*Hopefully I have tagged the code okay.

I have spent most of today trying to find out how to use fixed point binary in VHDL such as 0.36 in binary. I believe this to be 00000000.01011011.

Will i need to use something other than std_logic_vector?

Many thanks
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top