- 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:
*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
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