Re: Any ideas on how to do this?



On 25 Nov 2006 10:17:37 -0800, "48 bytes" <74m45h11@xxxxxxxxx>
wrote:

Hi everyone!
First of all, thanks for being such a help for like 5 years now.
However, now I'm a serious trouble.
I have to describe and design a 32 bit binary to 40 bits BCD converter.
I'm using VHDL as it's my class' focus language.
I found a very interesting solution at
http://www.engr.udayton.edu/faculty/jloomis/ece314/notes/devices/binary_to_BCD/bin_to_BCD.html
, but when I upgraded it to 16 bits it didn't work as expected.
And imagine having to instance more than 40 of those adders... Even
using the special replication instruction, it would fill the gate
amount of the Xilinx Spartan-3 S3-200, considering that nearly 60% of
it it's being used and I have to maintain that design (a DLX monocycle
processor... Computer Architecture II, geez).
Please, any help on this problem?

---
If you can spare the time, load a binary down-counter with the
number you want to convert and clear your up-counting BCD chain with
the load pulse. Then use the same clock for both sets of counters
and count down until your binary counter gets to all zeroes, at
which time the BCD counter outputs will contain the BCD equivalent
of the number you loaded into the binary counter.

If your BCD counter maxes out at 4 294 967 296 and you're using a
10MHz clock, it'll only take about 429 seconds. ;)


--
JF
.



Relevant Pages

  • Re: Problem writing quadrature decoder
    ... binary counter. ... Can you explain how bounce can be suppressed in a 4 count design? ... Solution) - so a 50MHz+ clock is not as silly as it may sound:) ...
    (comp.arch.fpga)
  • Re: BCD with DDS chip
    ... generate audio sinewaves but controlling it with BCD swtiches instead ... that runs in BCD than to convert for the AD9851. ... you may be best off using programable BCD counters to control ... how many pulses go into a binary counter. ...
    (sci.electronics.design)
  • Re: No duplicates question
    ... -- Open the table in design view ... cinnie wrote: ... Here's my problem - I can have duplicates in B or C or D, but I can't allow any matching BCD combinations. ...
    (microsoft.public.access.queries)
  • Re: BCD with DDS chip
    ... generate audio sinewaves but controlling it with BCD swtiches instead ... that runs in BCD than to convert for the AD9851. ... you may be best off using programable BCD counters to control ... how many pulses go into a binary counter. ...
    (sci.electronics.design)