When I compile the following code I get an error message saying "Unsupported clock statement" I cannot figure out why? Thanks in advance
----------------------------------------------------------------------------------
entity cpu is
Port ( AR : inout STD_LOGIC_VECTOR (15 downto 0);
PC : inout STD_LOGIC_VECTOR (15 downto 0);
DR : inout STD_LOGIC_VECTOR (7 downto 0);
TR : inout STD_LOGIC_VECTOR (7 downto 0);
IR : inout STD_LOGIC_VECTOR (7 downto 0);
R : inout STD_LOGIC_VECTOR (7 downto 0);
AC : inout STD_LOGIC_VECTOR (7 downto 0);
Mem : inout STD_LOGIC_VECTOR (15 downto 0);
path : inout STD_LOGIC_VECTOR (15 downto 0);
clk : in STD_LOGIC;
sel : in STD_LOGIC_VECTOR(3 downto 0);
display
ut STD_LOGIC_VECTOR(9 downto 0));
end cpu;
architecture Behavioral of cpu is
TYPE matrix IS ARRAY(0 to 42,9 downto 0)of STD_LOGIC;
signal microseq:matrix:= (('1','0','0','0','0','0','0','0','1','0'), ('0','0','0','0','0','0','1','0','0','0'), ('1','0','0','0','0','0','1','0','0','0'),
('0','0','0','0','0','0','1','0','0','1'), ('0','0','0','0','0','0','1','0','0','0'), ('0','1','0','1','0','0','0','0','1','0'), ('0','0','0','0','0','0','1','0','0','0'), ('0','0','1','0','0','0','0','0','0','0'),
('0','0','0','0','0','0','1','0','0','0'), ('0','0','0','0','0','0','1','0','0','0'), ('0','1','0','1','0','0','0','0','1','0'), ('0','0','0','0','0','1','0','0','0','0'), ('0','0','1','0','0','0','1','0','0','0'),
('0','0','0','0','0','1','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'),
('0','0','0','0','1','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'),
('0','0','0','0','0','0','1','0','0','1'), ('0','0','0','0','0','0','1','0','0','0'), ('0','1','0','1','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'),
('0','0','0','0','0','0','1','0','0','1'), ('0','0','0','0','0','0','1','0','0','0'), ('0','1','0','1','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'),
('0','0','0','0','0','0','1','0','0','1'), ('0','0','0','0','0','0','1','0','0','0'), ('0','1','0','1','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'),
('0','0','0','0','1','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'), ('0','0','0','0','0','0','0','0','0','0'));
signal temp : std_logic_vector(9 downto 0);
signal index : integer;
signal j: integer;
signal i:integer;
signal k:integer;
signal z : std_logic;
begin
process(clk, temp, index,j,i,z) begin
while(rising_edge(clk)) loop
-- 3 Fetch cycles
for y in 0 to 2 loop
j <= y;
for a in 0 to 9 loop
temp(a) <= microseq (j,a);
end loop;
display <= temp;
if(microseq(j,9)='1') then
AR <= PC;
end if;
if(microseq(j,3)='1') then
TR <= DR;
DR <= Mem(7 downto 0);
end if;
end loop;
--Microsequencer
index <= conv_integer((sel*"0101")+ "0011");
for m in 0 to 4 loop
i <= m;
while(temp /= "00000000000") loop
k<=index+i;
for b in 0 to 9 loop
temp(b) <= microseq(k,b);
end loop;
--DRHBUS
if(microseq(i,8)='1') then
path(15 downto 8) <= DR;
end if;
--DRLBUS
if(microseq(i,7)='1') then
path(7 downto 0) <= DR;
end if;
--TRBUS
if(microseq(i,6)='1') then
path(7 downto 0) <= TR;
end if;
--RBUS
if(microseq(i,5)='1') then
path(7 downto 0) <= R;
end if;
--ACBUS
if(microseq(i,4)='1') then
path(7 downto 0) <= AC;
end if;
--MEMBUS
if(microseq(i,3)='1') then
TR <= DR;
DR <= Mem(7 downto 0);
end if;
--BUSMEM
if(microseq(i,2)='1') then
Mem(7 downto 0) <= path(7 downto 0);
end if;
--ARLOAD
if(microseq(i,1)='1') then
AR <= path;
end if;
--ARINC
if(microseq(i,0)='0') then
AR <= AR + "0000000000000001";
end if;
--SELECT
case sel is
when "0000" =>
if(i = 0 or i= 1) then
PC<=PC+"0000000000000001";
elsif(i=2)then
AR <= path;
elsif(i=4)then
AC <= path(7 downto 0);
end if;
when "0001" =>
if(i =0 or i= 1) then
PC<=PC+"0000000000000001";
elsif(i=2)then
AR <= path;
elsif(i=3)then
DR <= path(7 downto 0);
end if;
when "0010" => R <= path(7 downto 0);
when "0011" => AC <= path(7 downto 0);
when "0100"=>
if(i=3) then
PC <= path;
end if;
when "0101" =>
if(Z = '0') then
if(i=3) then
PC <= path;
end if;
end if;
when "0110" =>
if(Z = '1') then
if(i=3) then
PC <= path;
end if;
end if;
when others => path <= "0000000000000000";
end case;
end loop;
end loop;
end loop;
end process;
end Behavioral;