Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Software (http://www.velocityreviews.com/forums/f6-software.html)
-   -   VHDL Program (http://www.velocityreviews.com/forums/t755043-vhdl-program.html)

harrama 10-21-2011 10:49 AM

VHDL Program
 
HI. I try to write addition of rational numbers program in vhdl.below program working in RTL design ?.

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;


entity ratpack_rtl is
port(
a : in std_logic;
b : in std logic;
c : out std_logic;
clk : in std_logic);
end ratpack_rtl;


architecture rtl of ratpack_rtl is
begin

process(clk,a,b)

begin

variable a : rational := (5/12);
variable b : rational := (2/3);

c <= a+b;

end process;
end rtl;



Regards
Raghu


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.