Guest
Hi everyone!!!!!!!!!!
I'm studying vhdl for my college and facing problems running the
following program to implement an UP-DOWN counter. When i compile the
program, no error is shown but when i run it, i receive the
following :-
---------------------------------------------------------------------------------------------------------------------------------------
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clr1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clr1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Terminating run because of too many errors!
Error: Failed to connect to simulator 'vhdle'!!
-------------------------------------------------------------------------------------------------
I'm new to this language and hence can't figure out what's the
problem.
So please help.
Here are the 4 files:
1.) UPDN.vhd
2.) UPDN_TFF.vhd
3.) UPDN_COMP.vhd
4.)TEST_UPDN.vhd
--------------------------------------------------------------------------------
--UPDN.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity updn is
port(up,down,clock,clear : in bit;
outp : out bit_vector(3 downto 0));
end entity;
architecture arch_updn of updn is
component tff is
port ( in1,in2,clk,reset : in bit;
q : out bit);
end component;
component comp1 is
port(ups,dns,ops : in bit;
upside,downside : out bit);
end component;
signal Q,U,D : bit_vector(3 downto 0) ;
begin
tff0 : tff port map (up,down,clock,clear,Q(0));
comp10 : comp1 port map (up,down,Q(0),U(0),D(0));
tff1 : tff port map (U(0),D(0),clock,clear,Q(1));
comp11 : comp1 port map (Q(0),(not Q(0)),Q(1),U(1),D(1));
tff2 : tff port map (U(1),D(1),clock,clear,Q(2));
comp12 : comp1 port map (Q(1),(not Q(1)),Q(2),U(2),D(2));
tff3 : tff port map (U(2),D(2),clock,clear,Q(3));
comp13 : comp1 port map (Q(2),(not Q(2)),Q(3),U(3),D(3));
outp <= Q;
end arch_updn;
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--UPDN_TFF.vhd
entity tff is
port ( in1,in2,clk,reset : in bit;
q : out bit);
end entity;
architecture tff_arch of tff is
begin
process (clk,reset)
variable temp : bit;
begin
if (reset = '1') then
temp :='0';
elsif (clk'event and clk='1' and in1='0' and in2='0') then
temp := temp;
elsif (clk'event and clk='1' and (in1='1' or in2='1')) then
temp := not temp;
end if;
q <=temp;
end process;
end tff_arch;
-----------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
--UPDN_COMP.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity comp1 is
port(ups,dns,ops : in bit;
upside,downside : out bit);
end entity;
architecture arch_comp1 of comp1 is
begin
--tff <= ups or dns;
upside <= ups and ops;
downside <= dns and (not ops);
end arch_comp1;
-------------------------------------------------------------------------
------------------------------------------------------------------------
--TEST_UPDN.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity test_updn is
end entity;
architecture arch_test_updn of updn is
component updn is
port(up,down,clock,clear : in bit;
outp : out bit_vector(3 downto 0));
end component;
signal u1,d1,clk1,clr1 : bit;
signal OUTPUT : bit_vector(3 downto 0);
begin
inst : updn port map (u1,d1,clk1,clr1,OUTPUT);
process
begin
u1 <= '1';
d1 <= '0';
wait for 40 ns;
u1 <= '0';
d1 <= '1';
wait for 30 ns;
end process;
process
begin
clk1 <= '0';
clr1 <= '0';
wait for 10 ns;
clk1 <= '1';
clr1 <= '0';
wait for 10 ns;
end process;
end arch_test_updn;
---------------------------------------------------------------------------------------------------------------------------
Please HELP!!!!!!!!!!!!!!!!!!
I'm studying vhdl for my college and facing problems running the
following program to implement an UP-DOWN counter. When i compile the
program, no error is shown but when i run it, i receive the
following :-
---------------------------------------------------------------------------------------------------------------------------------------
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clr1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clr1'
has more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'u1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'd1' has
more than one source
Error: CSVHE0001: test_updn.vhd: (line 13): Unresolved signal 'clk1'
has more than one source
Terminating run because of too many errors!
Error: Failed to connect to simulator 'vhdle'!!
-------------------------------------------------------------------------------------------------
I'm new to this language and hence can't figure out what's the
problem.
So please help.
Here are the 4 files:
1.) UPDN.vhd
2.) UPDN_TFF.vhd
3.) UPDN_COMP.vhd
4.)TEST_UPDN.vhd
--------------------------------------------------------------------------------
--UPDN.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity updn is
port(up,down,clock,clear : in bit;
outp : out bit_vector(3 downto 0));
end entity;
architecture arch_updn of updn is
component tff is
port ( in1,in2,clk,reset : in bit;
q : out bit);
end component;
component comp1 is
port(ups,dns,ops : in bit;
upside,downside : out bit);
end component;
signal Q,U,D : bit_vector(3 downto 0) ;
begin
tff0 : tff port map (up,down,clock,clear,Q(0));
comp10 : comp1 port map (up,down,Q(0),U(0),D(0));
tff1 : tff port map (U(0),D(0),clock,clear,Q(1));
comp11 : comp1 port map (Q(0),(not Q(0)),Q(1),U(1),D(1));
tff2 : tff port map (U(1),D(1),clock,clear,Q(2));
comp12 : comp1 port map (Q(1),(not Q(1)),Q(2),U(2),D(2));
tff3 : tff port map (U(2),D(2),clock,clear,Q(3));
comp13 : comp1 port map (Q(2),(not Q(2)),Q(3),U(3),D(3));
outp <= Q;
end arch_updn;
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--UPDN_TFF.vhd
entity tff is
port ( in1,in2,clk,reset : in bit;
q : out bit);
end entity;
architecture tff_arch of tff is
begin
process (clk,reset)
variable temp : bit;
begin
if (reset = '1') then
temp :='0';
elsif (clk'event and clk='1' and in1='0' and in2='0') then
temp := temp;
elsif (clk'event and clk='1' and (in1='1' or in2='1')) then
temp := not temp;
end if;
q <=temp;
end process;
end tff_arch;
-----------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
--UPDN_COMP.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity comp1 is
port(ups,dns,ops : in bit;
upside,downside : out bit);
end entity;
architecture arch_comp1 of comp1 is
begin
--tff <= ups or dns;
upside <= ups and ops;
downside <= dns and (not ops);
end arch_comp1;
-------------------------------------------------------------------------
------------------------------------------------------------------------
--TEST_UPDN.vhd
library IEEE;
use ieee.std_logic_1164.all;
entity test_updn is
end entity;
architecture arch_test_updn of updn is
component updn is
port(up,down,clock,clear : in bit;
outp : out bit_vector(3 downto 0));
end component;
signal u1,d1,clk1,clr1 : bit;
signal OUTPUT : bit_vector(3 downto 0);
begin
inst : updn port map (u1,d1,clk1,clr1,OUTPUT);
process
begin
u1 <= '1';
d1 <= '0';
wait for 40 ns;
u1 <= '0';
d1 <= '1';
wait for 30 ns;
end process;
process
begin
clk1 <= '0';
clr1 <= '0';
wait for 10 ns;
clk1 <= '1';
clr1 <= '0';
wait for 10 ns;
end process;
end arch_test_updn;
---------------------------------------------------------------------------------------------------------------------------
Please HELP!!!!!!!!!!!!!!!!!!