Line 30... |
Line 30... |
WE_LL : in std_logic;
|
WE_LL : in std_logic;
|
WE_SP : in SP_OP;
|
WE_SP : in SP_OP;
|
|
|
-- data in signals
|
-- data in signals
|
IMM : in std_logic_vector(15 downto 0); -- immediate data
|
IMM : in std_logic_vector(15 downto 0); -- immediate data
|
M_RDAT : in std_logic_vector( 7 downto 0); -- memory data
|
RDAT : in std_logic_vector( 7 downto 0); -- memory/IO data
|
|
|
-- memory control signals
|
-- memory control signals
|
ADR : out std_logic_vector(15 downto 0);
|
ADR : out std_logic_vector(15 downto 0);
|
MQ : out std_logic_vector( 7 downto 0);
|
MQ : out std_logic_vector( 7 downto 0);
|
|
|
-- input/output
|
|
IO_RDAT: in std_logic_vector( 7 downto 0);
|
|
|
|
Q_RR : out std_logic_vector(15 downto 0);
|
Q_RR : out std_logic_vector(15 downto 0);
|
Q_LL : out std_logic_vector(15 downto 0);
|
Q_LL : out std_logic_vector(15 downto 0);
|
Q_SP : out std_logic_vector(15 downto 0)
|
Q_SP : out std_logic_vector(15 downto 0)
|
);
|
);
|
end data_core;
|
end data_core;
|
Line 69... |
Line 66... |
|
|
COMPONENT select_yy
|
COMPONENT select_yy
|
PORT( SY : IN std_logic_vector( 3 downto 0);
|
PORT( SY : IN std_logic_vector( 3 downto 0);
|
IMM : IN std_logic_vector(15 downto 0);
|
IMM : IN std_logic_vector(15 downto 0);
|
QUICK : IN std_logic_vector( 3 downto 0);
|
QUICK : IN std_logic_vector( 3 downto 0);
|
M_RDAT : IN std_logic_vector( 7 downto 0);
|
RDAT : IN std_logic_vector( 7 downto 0);
|
IO_RDAT : IN std_logic_vector( 7 downto 0);
|
|
RR : IN std_logic_vector(15 downto 0);
|
RR : IN std_logic_vector(15 downto 0);
|
YY : OUT std_logic_vector(15 downto 0)
|
YY : OUT std_logic_vector(15 downto 0)
|
);
|
);
|
END COMPONENT;
|
END COMPONENT;
|
|
|
Line 109... |
Line 105... |
|
|
selyy: select_yy
|
selyy: select_yy
|
PORT MAP( SY => SY,
|
PORT MAP( SY => SY,
|
IMM => IMM,
|
IMM => IMM,
|
QUICK => QU,
|
QUICK => QU,
|
M_RDAT => M_RDAT,
|
RDAT => RDAT,
|
IO_RDAT => IO_RDAT,
|
|
RR => RR,
|
RR => RR,
|
YY => YY
|
YY => YY
|
);
|
);
|
|
|
ADR <= ADR_XYZ;
|
ADR <= ADR_XYZ;
|
Line 177... |
Line 172... |
end process;
|
end process;
|
|
|
regs: process(CLK_I)
|
regs: process(CLK_I)
|
begin
|
begin
|
if (rising_edge(CLK_I)) then
|
if (rising_edge(CLK_I)) then
|
if (T2 = '1') then
|
|
if (CLR = '1') then
|
if (CLR = '1') then
|
RR <= X"0000";
|
RR <= X"0000";
|
LL <= X"0000";
|
LL <= X"0000";
|
SP <= X"0000";
|
SP <= X"0000";
|
elsif (CE = '1') then
|
elsif (CE = '1' and T2 = '1') then
|
if (WE_RR = '1') then RR <= ZZ; end if;
|
if (WE_RR = '1') then RR <= ZZ; end if;
|
if (WE_LL = '1') then LL <= ZZ; end if;
|
if (WE_LL = '1') then LL <= ZZ; end if;
|
|
|
case WE_SP is
|
case WE_SP is
|
when SP_INC => SP <= ADR_YZ;
|
when SP_INC => SP <= ADR_YZ;
|
when SP_LOAD => SP <= ADR_XYZ;
|
when SP_LOAD => SP <= ADR_XYZ;
|
when SP_NOP => null;
|
when SP_NOP => null;
|
end case;
|
end case;
|
end if;
|
end if;
|
end if;
|
end if;
|
end if;
|
|
end process;
|
end process;
|
|
|
end Behavioral;
|
end Behavioral;
|
|
|
No newline at end of file
|
No newline at end of file
|