Re: Any ideas on how to do this?
- From: John Fields <jfields@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 14:55:04 -0600
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
.
- References:
- Any ideas on how to do this?
- From: 48 bytes
- Any ideas on how to do this?
- Prev by Date: Re: Microvoltage array
- Next by Date: Re: Microvoltage array
- Previous by thread: Re: Any ideas on how to do this?
- Next by thread: Re: Any ideas on how to do this?
- Index(es):
Relevant Pages
|