Altera_Forum
Honored Contributor
17 years agosyntax errors.
I'm getting this error:
Error (10500): VHDL syntax error at processor.vhd(53) near text "PORT"; expecting "(", or "'", or "." I'm not sure why but here's the relevant code: The error refers to the line: fetch: imem PORT MAP(PC1,PC2,clock,INS1,INS2,0,0,INS1,INS2);--fetched the INSlibrary ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
use work.all;
entity processor is
port
(
clock,reset : in std_logic;
keyboard_in : in std_logic_vector(15 downto 0);
keyboard_ack : out std_logic;
lcd_out : out std_logic_vector(15 downto 0);
lcd_write : out std_logic
);
end processor;
architecture a of processor is
TYPE State_type IS(A,B,C,D,E);
SIGNAL state: State_type;
SIGNAL PC1,PC2,INS1,INS2: STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL opcode: STD_LOGIC_VECTOR(3 DOWNTO 0);
COMPONENT imem IS
PORT
(
address_a : IN STD_LOGIC_VECTOR (12 DOWNTO 0);
address_b : IN STD_LOGIC_VECTOR (12 DOWNTO 0);
clock : IN STD_LOGIC ;
data_a : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
data_b : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
wren_a : IN STD_LOGIC := '1';
wren_b : IN STD_LOGIC := '1';
q_a : OUT STD_LOGIC_VECTOR (15 DOWNTO 0);
q_b : OUT STD_LOGIC_VECTOR (15 DOWNTO 0)
);
END COMPONENT;
begin
process(clock,reset)
begin
if(reset = '1') then
state<=A;
PC<="0000000000000000";
--initialize stuff
elsif(rising_Edge(clock)) then
case state is
when A=>
fetch: imem PORT MAP(PC1,PC2,clock,INS1,INS2,0,0,INS1,INS2);--fetched the INS
opcode<=INS1(15 DOWNTO 12);
state <= B;
when B=>
--etc...
end case;
end if;
end process
end a;