Implementing division operation.

Discussion in 'VHDL' started by bhargava.ram, Feb 18, 2010.

?

How do you implement Division operation A/B

Poll closed Feb 21, 2010.
  1. Implement in data flow mode using "/" operator

    0 vote(s)
    0.0%
  2. A - B Subtract continually using while loop

    0 vote(s)
    0.0%
  3. A + B Subtract continually using for loop

    0 vote(s)
    0.0%
  4. pick something and get on with it.

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. bhargava.ram

    bhargava.ram

    Joined:
    Feb 18, 2010
    Messages:
    2
    Hello, I am designing a SDRAM Controller with variable burst size (burst size is an input along with read or write commands), at a point I have to find the number of read operations are needed to calculate the number of times the CAS latency has to be insured along with the precharge time ....

    For this I have to divide Burst size input with the maximum of columns a row has. I have tried implementing the repeated subtraction logic but all this has to be done in 1 clock.

    1. I have implemented in data flow model as
    "alt_result <= conv_std_logic_vector((conv_integer(Burst_size) / conv_integer(Row_size)),8);"

    Here the prob is for a value 136 Burst_size and 15 to Row_size I get 9, but 1 word is left and should be written to Row a total, you can say that it would be be ten when you consider 0 to 9 but this is not valid when 135 is divided by 15.

    2. I have tried to implement using while loop and for loop but both logics consumed more than 1 clock..

    How should I approach ??

    Also please could you tell me a book for VHDL other than Bhasker or Perry, which deals from introduction of VHDL commands and taking it to Sythesisable code and test bench implementation like in detail..

    Thank You.
     
    bhargava.ram, Feb 18, 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. oulan bator
    Replies:
    29
    Views:
    1,174
    Chris Uppal
    Dec 4, 2005
  2. silentlights

    Fast Division/Modulo Operation

    silentlights, Apr 16, 2004, in forum: C Programming
    Replies:
    8
    Views:
    1,003
    Dik T. Winter
    Apr 23, 2004
  3. Jerry

    Bitwise operation for division

    Jerry, Mar 2, 2005, in forum: C Programming
    Replies:
    7
    Views:
    8,263
    Chris Williams
    Mar 2, 2005
  4. Sri

    Implementing the division operator

    Sri, May 1, 2006, in forum: C Programming
    Replies:
    13
    Views:
    4,143
  5. krypto.wizard@gmail.com

    division by 7 without using division operator

    krypto.wizard@gmail.com, Feb 1, 2007, in forum: C Programming
    Replies:
    94
    Views:
    4,570
    ┬Ča\\/b
    Feb 9, 2007
Loading...

Share This Page