toki_rnm
Newbie level 3
The following errors were found .. plz help me correct them
ERROR:Xst:1534 - Sequential logic for node <count1> appears to be controlled by multiple clocks.
ERROR:Xst:739 - Failed to synthesize logic for signal <count1>.
ERROR:Xst:1431 - Failed to synthesize unit <clk_gnrtr> .
The code is as follows
library ieee;
use iee.std_logic_1164.all;
use ieee. std_logic_arith.all;
entity clk_gnrtr is
port ( clk,reset: in std_logic;
y,ale,z: inout std_logic);
end clk_gnrtr;
architecture behavioral of clk_gnrtr is
signal count: std_logic_vector(3 downto 0);
signal count1: std_logic_vector(3 downto 0);
signal count2: std_logic_vector(2 downto 0);
signal count3: std_logic_vector(6 downto 0);
begin
process(clk,reset)
begin
if reset = '1' then
count<="0000";
count1<="00000";
count2<="000";
count3<="0000000";
y<='0';
z<='0';
elsif rising_edge (clk) then
count<=count + 1;
count3<= count3 + 1;
if count = "1101" then -- time period for 40khz is 25us. therefore on and off periods are approximately 13 us.
count<="0000";
y<= not y;
end if;
if count3<= "1100100" then -- time period for 5khz is 200us. therefore on and off periods are 100 us.
count3<="0000000";
z<= not z;
end if;
if rising_edge then
count1<= count1 + 1;
if count = "1000" then
count1<= "0000";
ale<='1';
end if;
end if;
if ale = '1' then
count2<=count2+ 1;
if count2 = "101" then
count2 <="000";
ale<= '0';
end if;
end if;
end if;
end process;
end behavioral;
ERROR:Xst:1534 - Sequential logic for node <count1> appears to be controlled by multiple clocks.
ERROR:Xst:739 - Failed to synthesize logic for signal <count1>.
ERROR:Xst:1431 - Failed to synthesize unit <clk_gnrtr> .
The code is as follows
library ieee;
use iee.std_logic_1164.all;
use ieee. std_logic_arith.all;
entity clk_gnrtr is
port ( clk,reset: in std_logic;
y,ale,z: inout std_logic);
end clk_gnrtr;
architecture behavioral of clk_gnrtr is
signal count: std_logic_vector(3 downto 0);
signal count1: std_logic_vector(3 downto 0);
signal count2: std_logic_vector(2 downto 0);
signal count3: std_logic_vector(6 downto 0);
begin
process(clk,reset)
begin
if reset = '1' then
count<="0000";
count1<="00000";
count2<="000";
count3<="0000000";
y<='0';
z<='0';
elsif rising_edge (clk) then
count<=count + 1;
count3<= count3 + 1;
if count = "1101" then -- time period for 40khz is 25us. therefore on and off periods are approximately 13 us.
count<="0000";
y<= not y;
end if;
if count3<= "1100100" then -- time period for 5khz is 200us. therefore on and off periods are 100 us.
count3<="0000000";
z<= not z;
end if;
if rising_edge then
count1<= count1 + 1;
if count = "1000" then
count1<= "0000";
ale<='1';
end if;
end if;
if ale = '1' then
count2<=count2+ 1;
if count2 = "101" then
count2 <="000";
ale<= '0';
end if;
end if;
end if;
end process;
end behavioral;