Line 19... |
Line 19... |
|
|
LIBRARY IEEE;
|
LIBRARY IEEE;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE IEEE.numeric_std.ALL;
|
USE IEEE.numeric_std.ALL;
|
USE work.components.ALL;
|
USE work.components.ALL;
|
USE work.ram_parts.ALL;
|
USE work.RAM.ALL;
|
USE work.mux_parts.ALL;
|
USE work.mux_parts.ALL;
|
USE work.controllers.ALL;
|
USE work.controllers.ALL;
|
|
|
-- LIBRARY unisim;
|
-- LIBRARY unisim;
|
-- USE unisim.vcomponents.ALL;
|
-- USE unisim.vcomponents.ALL;
|
Line 38... |
Line 38... |
END system;
|
END system;
|
|
|
ARCHITECTURE Structural OF system IS
|
ARCHITECTURE Structural OF system IS
|
|
|
CONSTANT w_data : POSITIVE := 16;
|
CONSTANT w_data : POSITIVE := 16;
|
|
CONSTANT w_addr : POSITIVE := 11;
|
|
|
SIGNAL CLK : STD_LOGIC; -- System clock
|
SIGNAL CLK : STD_LOGIC; -- System clock
|
SIGNAL CLK_VAL : STD_LOGIC; -- System clock valid
|
SIGNAL CLK_VAL : STD_LOGIC; -- System clock valid
|
SIGNAL RST : STD_LOGIC; -- System synchronous reset
|
SIGNAL RST : STD_LOGIC; -- System synchronous reset
|
|
|
Line 295... |
Line 296... |
CLK => CLK,
|
CLK => CLK,
|
ena => EIN2,
|
ena => EIN2,
|
Q => DO3,
|
Q => DO3,
|
port_in => pushb_in);
|
port_in => pushb_in);
|
|
|
-- 1kx16 two port RAM
|
-- 32kx16 two port RAM
|
MEM1 : generic_ram
|
MEM1 : memory
|
GENERIC MAP (
|
GENERIC MAP (
|
filename => "input_data.txt",
|
w_data => w_data,
|
w_addr => 11)
|
w_addr => w_addr,
|
|
filename => "")
|
PORT MAP (
|
PORT MAP (
|
CLK => CLK,
|
CLK => CLK,
|
we => MEM_WR,
|
we => MEM_WR,
|
a1 => B_OUT(10 DOWNTO 0),
|
a1 => B_OUT(w_addr - 1 DOWNTO 0),
|
a2 => PC_NEXT(10 DOWNTO 0),
|
a2 => PC_NEXT(w_addr - 1 DOWNTO 0),
|
d1 => A_OUT,
|
d1 => A_OUT,
|
q1 => MEMO4, -- Data memory output
|
q1 => MEMO4, -- Data memory output
|
q2 => INSO4); -- Instruction memory output
|
q2 => INSO4); -- Instruction memory output
|
|
|
IR : data_reg
|
IR : data_reg
|