K
Kumar
Guest
How to remove the warnings in the following vhdl program when we
compile it???
vsim>uvecC 010101010101010101
vsim>uveczero 00000000111111111
vsim>uvecone 00000000000000000
But gives waring while running??
Can anyone tell me the modficiaton in the program??
Please reply soon........
Program
========
entitiy shift is
port( C : in bit;
zero : in bit;
one : in bit;
output : out bit);
end shift;
architecture archi of shift is
constant S0 : bit_vector(4 downto 0) := "00001";
constant S1 : bit_vector(10 downto 0) := "00000010101";
constant S2 : bit_vector(5 downto 0) := "000101";
constant S3 : bit_vector(7 downto 0) := "00010011";
signal tmp1 : bit_vector(10 downto 0);
signal count : bit_vector(7 downto 0);
signal opcode : bit_vector(2 downto 0);
begin
count <= 0;
opcode <= 0;
process (C)
begin
if(count = 0) then
if(zero ='0' and one='0')then
tmp1 <= s0;
opcode <= 0;
end if;
if(zero ='0' and one='1')then
tmp1 <= s1;
opcode <= 1;
end if;
if(zero ='1' and one='0')then
tmp1 <= s2;
opcode <= 2;
end if;
if(zero ='1' and one='1')then
tmp1 <= s3;
opcode <= 3;
end if;
end if;
if(count < 4) then
if (C='1' and opcode = 0) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= output;
end if;
if (C='1' and opcode = 1) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= tmp1(6);
tmp1(6) <= tmp1(7);
tmp1(7) <= tmp1(8);
tmp1(8) <= tmp1(9);
tmp1(9) <= tmp1(10);
tmp1(10) <= output;
end if;
if (C='1' and opcode = 2) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= output;
end if;
if (C='1' and opcode = 3) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= tmp1(6);
tmp1(6) <= tmp1(7);
tmp1(7) <= output;
end if;
else
count <= 0;
end if;
end process;
end archi;
compile it???
vsim>uvecC 010101010101010101
vsim>uveczero 00000000111111111
vsim>uvecone 00000000000000000
But gives waring while running??
Can anyone tell me the modficiaton in the program??
Please reply soon........
Program
========
entitiy shift is
port( C : in bit;
zero : in bit;
one : in bit;
output : out bit);
end shift;
architecture archi of shift is
constant S0 : bit_vector(4 downto 0) := "00001";
constant S1 : bit_vector(10 downto 0) := "00000010101";
constant S2 : bit_vector(5 downto 0) := "000101";
constant S3 : bit_vector(7 downto 0) := "00010011";
signal tmp1 : bit_vector(10 downto 0);
signal count : bit_vector(7 downto 0);
signal opcode : bit_vector(2 downto 0);
begin
count <= 0;
opcode <= 0;
process (C)
begin
if(count = 0) then
if(zero ='0' and one='0')then
tmp1 <= s0;
opcode <= 0;
end if;
if(zero ='0' and one='1')then
tmp1 <= s1;
opcode <= 1;
end if;
if(zero ='1' and one='0')then
tmp1 <= s2;
opcode <= 2;
end if;
if(zero ='1' and one='1')then
tmp1 <= s3;
opcode <= 3;
end if;
end if;
if(count < 4) then
if (C='1' and opcode = 0) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= output;
end if;
if (C='1' and opcode = 1) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= tmp1(6);
tmp1(6) <= tmp1(7);
tmp1(7) <= tmp1(8);
tmp1(8) <= tmp1(9);
tmp1(9) <= tmp1(10);
tmp1(10) <= output;
end if;
if (C='1' and opcode = 2) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= output;
end if;
if (C='1' and opcode = 3) then
output <= tmp1(0);
if(output = '1') then
count <= count + 1;
end if;
tmp1(0) <= tmp1(1);
tmp1(1) <= tmp1(2);
tmp1(2) <= tmp1(3);
tmp1(3) <= tmp1(4);
tmp1(4) <= tmp1(5);
tmp1(5) <= tmp1(6);
tmp1(6) <= tmp1(7);
tmp1(7) <= output;
end if;
else
count <= 0;
end if;
end process;
end archi;