Implementing division operation.

How do you implement Division operation A/B

  • Implement in data flow mode using "/" operator

    Votes: 0 0.0%
  • A - B Subtract continually using while loop

    Votes: 0 0.0%
  • A + B Subtract continually using for loop

    Votes: 0 0.0%
  • pick something and get on with it.

    Votes: 0 0.0%

  • Total voters
    0
  • Poll closed .
Joined
Feb 18, 2010
Messages
2
Reaction score
0
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.
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top