Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with using real or unsigned data types in VHDL.

Status
Not open for further replies.

scorpiosidewinder

Technical User
May 27, 2005
1
US
I have real data that has to be used in a VHDL program.
For Example: If A, B and C are real data types. How do I use them in a VHDL program to perform arithmetic operations on them.
If A, B and C were integers then... this below program works..
------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity circuit1 is
Port ( A : in integer;
B : in integer;
C : in integer;
Y : out integer);
end circuit1;

architecture Behavioral of circuit1 is

begin

y <= (A + B) * (C);

end Behavioral;
------------------------------------------------------------
How would i make the same program work if A, B and C were real data types...
I tried using "real" instead of "integer".. but it did not work...
Also could someone please give a program to find the cosine value of an angle?? Pleaseeee....

Thank you... I really appreciate it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top