OpenCores
no use no use 1/1 no use no use
initialization In VHDL
by ragu on Jan 17, 2012
ragu
Posts: 29
Joined: Sep 12, 2011
Last seen: Sep 8, 2014
Hi every one

How to initialization and perform division for below statment in VHDL.

(a/b) =(a*d)/(b*d);
Thanks in advance
RE: initialization In VHDL
by sebx86 on Jan 17, 2012
sebx86
Posts: 11
Joined: Sep 19, 2008
Last seen: May 16, 2020
What are a,b,d ? Signals ? Constants ?
RE: initialization In VHDL
by ragu on Jan 17, 2012
ragu
Posts: 29
Joined: Sep 12, 2011
Last seen: Sep 8, 2014
sebx86 thanks for your intrest

a,b,c,d are variables.
RE: initialization In VHDL
by jdoin on Jan 17, 2012
jdoin
Posts: 51
Joined: Sep 1, 2009
Last seen: Sep 27, 2024
Hi every one

How to initialization and perform division for below statment in VHDL.

(a/b) =(a*d)/(b*d);
Thanks in advance


That is a mathematical equality. It solves to (a/b) = (a/b).
What exactly do you need? Do you need a synthesizable circuit?

When those variables are represented in a digital number format, the operatons will be subject to rounding and truncation, and (a/b) != (a*d)/(b*d). Furthermore, it is not clear if you want a circuit to test the identity, or if you want to solve for one variable given the others, or if you want a symbolic solver.

In VHDL, you must define the format of those variables (type), and you must implement the operations '*(a,b)' and '/(a,b)' for the type. Although there are predefined numerical types with math operations, they may not be sinthesizable. That is because a multiplier can be implemented in several ways, and division is usually more expensive. Almost always, the number format will require loss of precision and quantization decisions that can yield small differences in the results of such expressions as yours.

So, what are your requirements? Do you need a circuit that will always evaluate the above identity as an equality, regardless of the a,b,c,d values?

- Jonny
RE: initialization In VHDL
by ragu on Jan 18, 2012
ragu
Posts: 29
Joined: Sep 12, 2011
Last seen: Sep 8, 2014
Thanks for your reply.
I doing below operations to perform denominator of then two statments are same for testbench.
(a/b) =(a*d)/(b*d);
(c/d)=(c*b)/(b*d);
RE: initialization In VHDL
by jdoin on Jan 18, 2012
jdoin
Posts: 51
Joined: Sep 1, 2009
Last seen: Sep 27, 2024
Thanks for your reply.
I doing below operations to perform denominator of then two statments are same for testbench.
(a/b) =(a*d)/(b*d);
(c/d)=(c*b)/(b*d);


Sorry, I can't understand. Can you provide more information? What is the type of the variables? Can you show actual code for your testbench?

RE: initialization In VHDL
by ragu on Jan 19, 2012
ragu
Posts: 29
Joined: Sep 12, 2011
Last seen: Sep 8, 2014
Thanks for your intrest. actually i try to find out max of two rational numbers.i implemented in package,but how to implement in testbench?
RE: initialization In VHDL
by praveenhv on Feb 16, 2012
praveenhv
Posts: 2
Joined: Feb 6, 2012
Last seen: Feb 22, 2012
use IPcore in Xilinx to perform division and multiplication operation..
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.