i have done a program in xilinx(ripple carry adder in structural modeling).
Code VHDL - [expand] |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity ripple is
Port ( x : in STD_LOGIC_VECTOR (3 downto 0);
y : in STD_LOGIC_VECTOR (3 downto 0);
c : in STD_LOGIC;
s : out STD_LOGIC_VECTOR (3 downto 0);
co : out STD_LOGIC);
end ripple;
architecture Behavioral of ripple is
component fulladd
port(a,b,cin:in STD_LOGIC;cout,sum:out STD_LOGIC);
end component;
signal cc:STD_LOGIC_VECTOR(3 downto 1);
begin
fa0:fulladd port map(x(0),y(0),c,s(0),cc(1));
fa1:fulladd port map(x(1),y(1),cc(1),s(1),cc(2));
fa2:fulladd port map(x(2),y(2),cc(2),s(2),cc(3));
fa3:fulladd port map(x(3),y(3),cc(3),s(3),co);
end Behavioral; |
8888888888888888888888888888888888888888888888888888888888888888
full adder program was also done separately.it is as follows
Code VHDL - [expand] |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity fulladd is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
sum : out STD_LOGIC;
cout : out STD_LOGIC);
end fulladd;
architecture Behavioral of fulladd is
begin
sum<=a xor b xor cin;
cout<=(a and b) or (b and cin) or (a and cin);
end Behavioral; |
8888888888888888888888888888888888888888888888888
but while simulating the program..,error is there as follows
ERROR:Simulator:170 - work/fulladd/Behavioral is not compiled properly. Please recompile work/fulladd/Behavioral in file "C:/Xilinx91i/ripple/../fulladd/fulladd.vhd" without -incremental option.
ERROR:Simulator:198 - Failed when handling dependencies for module ripplewav
888888888888888888888888888888888888888888888888
but i have compiled the two programs separately.
i got the full adder program simulated output perfectly..
i am not able to trace the program..please help..
awaiting your response...