Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- From: Leon zhang <leoncamel@xxxxxxxxx>
- Date: 28 May 2007 01:04:50 -0700
On 5月27日, 午後10:24, Jonathan Bromley <jonathan.brom...@xxxxxxxxxxxxx>
wrote:
On 27 May 2007 05:50:30 -0700,
Leon zhang <leonca...@xxxxxxxxx> wrote:
Thanks you for you kindly reply.
Yes, What I want is a simple float arithmetic unit for a Calculator.
In that case, it's probably better (for a beginner) to consider
BCD arithmetic, and floating-point with powers of 10 instead
of powers of 2. This will save you the very large bother of
conversion between display formats and internal representation,
and it will be plenty fast enough.
Yes, But, in this case, how can I implemente a * and / about BCD ? By
the way, for synopsys IC, the multiplication is synthesisable, while
division is not synthesisable. Is it synthesisable on FPGA tools?
Even better, use a soft-core microprocessor and code
the calculations as software.
Hmm, thanks, Yes, I look into the opencores/fpu module. But, I found
it implemented the division by "/" operator. So,
is it synthesisable ? Any more suggestion about it ?
Yes, how about I convert it into integer number. then use the "*"
If it is only the four arithmetic operations +-*/ then
I would guess I could probably get working RTL in that time.
So, do you mean "+-*/" operator in Verilog, and $bitstoreal(),
$realtobits() is the solution for this ?
NO!!!!! I think that no synthesis tool handles real numbers.
You must create the floating point operations yourself.
Somewhere, inside those floating-point operations, there
will be simple integer arithmetic operations. For that,
of course you can use the standard Verilog operators.
And, how it works in depth ?
If you use BCD then each decimal digit is stored as a
separate 4-bit register, and you can do the arithmetic
in exactly the same way you were taught at school, digit
by digit. You will need a state machine or controller
to manage the calculation process, of course.
operator ? Yes, maybe it is quite ugly code. ;)
So, the two ones is just for test only ? It why it is not
So, what is the different between the IEEE-754
and the "real" type in verilog ? $bitstoreal() could encode it to
IEEE-754 data format?
As someone pointed out to me on this group a few days ago, yes,
$realtobits converts from Verilog 'real' to 64-bit IEEE-754
floating-point representation. Again, though, it is not
synthesisable by any tool I know of.
synthesisable ?
Thanks in advance.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.brom...@xxxxxxxxxxxxxxxxx://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
.
- Follow-Ups:
- References:
- Is there any possibility to implemented a 32-bit float point calculator in two week ?
- From: Leon zhang
- Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- From: Jonathan Bromley
- Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- From: Leon zhang
- Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- From: Jonathan Bromley
- Is there any possibility to implemented a 32-bit float point calculator in two week ?
- Prev by Date: Re: dynamically enable/disable timing checks?
- Next by Date: Systemverilog: Quartus-II 7.1 and interfaces?
- Previous by thread: Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- Next by thread: Re: Is there any possibility to implemented a 32-bit float point calculator in two week ?
- Index(es):
Relevant Pages
|
Loading