Line 96... |
Line 96... |
signal pause : std_logic;
|
signal pause : std_logic;
|
signal nullify_op : std_logic;
|
signal nullify_op : std_logic;
|
signal intr_enable : std_logic;
|
signal intr_enable : std_logic;
|
signal intr_signal : std_logic;
|
signal intr_signal : std_logic;
|
signal reset_reg : std_logic;
|
signal reset_reg : std_logic;
|
|
signal reset : std_logic;
|
begin --architecture
|
begin --architecture
|
|
|
pause <= pause_mult or pause_memory;
|
pause <= pause_mult or pause_memory;
|
nullify_op <= '1' when pc_source = from_lbranch and
|
nullify_op <= '1' when pc_source = from_lbranch and
|
(take_branch = '0' or branch_function = branch_yes) else
|
(take_branch = '0' or branch_function = branch_yes) else
|
'0';
|
'0';
|
c_bus <= c_alu or c_shift or c_mult;
|
c_bus <= c_alu or c_shift or c_mult;
|
|
reset <= reset_in or reset_reg;
|
|
|
--synchronize reset and interrupt pins
|
--synchronize reset and interrupt pins
|
intr_proc: process(clk, reset_in, intr_in, intr_enable, pc_source, pc, pause)
|
intr_proc: process(clk, reset_in, intr_in, intr_enable, pc_source, pc, pause)
|
begin
|
begin
|
if rising_edge(clk) then
|
if rising_edge(clk) then
|
Line 124... |
Line 126... |
end if;
|
end if;
|
end process;
|
end process;
|
|
|
u1_pc_next: pc_next PORT MAP (
|
u1_pc_next: pc_next PORT MAP (
|
clk => clk,
|
clk => clk,
|
reset_in => reset_reg,
|
reset_in => reset,
|
take_branch => take_branch,
|
take_branch => take_branch,
|
pause_in => pause,
|
pause_in => pause,
|
pc_new => c_alu(31 downto 2),
|
pc_new => c_alu(31 downto 2),
|
opcode25_0 => opcode(25 downto 0),
|
opcode25_0 => opcode(25 downto 0),
|
pc_source => pc_source,
|
pc_source => pc_source,
|
pc_out => pc,
|
pc_out => pc,
|
pc_out_plus4 => pc_plus4);
|
pc_out_plus4 => pc_plus4);
|
|
|
u2_mem_ctrl: mem_ctrl PORT MAP (
|
u2_mem_ctrl: mem_ctrl PORT MAP (
|
clk => clk,
|
clk => clk,
|
reset_in => reset_reg,
|
reset_in => reset,
|
pause_in => pause,
|
pause_in => pause,
|
nullify_op => nullify_op,
|
nullify_op => nullify_op,
|
address_pc => pc,
|
address_pc => pc,
|
opcode_out => opcode,
|
opcode_out => opcode,
|
|
|
Line 176... |
Line 178... |
|
|
u4_reg_bank: reg_bank
|
u4_reg_bank: reg_bank
|
generic map(memory_type => memory_type)
|
generic map(memory_type => memory_type)
|
port map (
|
port map (
|
clk => clk,
|
clk => clk,
|
reset_in => reset_reg,
|
reset_in => reset,
|
rs_index => rs_index,
|
rs_index => rs_index,
|
rt_index => rt_index,
|
rt_index => rt_index,
|
rd_index => rd_index,
|
rd_index => rd_index,
|
reg_source_out => reg_source,
|
reg_source_out => reg_source,
|
reg_target_out => reg_target,
|
reg_target_out => reg_target,
|