Fixed Point Binary

Discussion in 'VHDL' started by johnnyjohn2009, Jan 27, 2010.

  1. johnnyjohn2009

    johnnyjohn2009

    Joined:
    Dec 3, 2009
    Messages:
    8
    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
    johnnyjohn2009, Jan 27, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H aka N
    Replies:
    15
    Views:
    15,621
    Ben Jones
    Mar 2, 2006
  2. Motaz Saad
    Replies:
    7
    Views:
    6,461
  3. johnp
    Replies:
    4
    Views:
    3,656
    Toby Inkster
    May 23, 2005
  4. riya1012@gmail.com

    floating point to fixed point conversion

    riya1012@gmail.com, Feb 21, 2006, in forum: C Programming
    Replies:
    4
    Views:
    1,275
    Default User
    Feb 22, 2006
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,298
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page