end process;
-asyn: process(instr_r_addr, jump_result, prediction_result, branch_prediction_bit, alu_jump_bit, instr_rd_data)
+asyn: process(reset, instr_r_addr, jump_result, prediction_result, branch_prediction_bit, alu_jump_bit, instr_rd_data)
begin
instruction <= instr_rd_data;
instr_r_addr_nxt <= std_logic_vector(unsigned(instr_r_addr) + 1);
+ if (reset = RESET_VALUE) then
+ instr_r_addr_nxt <= (others => '0');
+ end if;
+
if (alu_jump_bit = LOGIC_ACT) then
instr_r_addr_nxt <= jump_result;
elsif (branch_prediction_bit = LOGIC_ACT) then
subtype RAM_ENTRY_TYPE is std_logic_vector(DATA_WIDTH -1 downto 0);
type RAM_TYPE is array (0 to (2**ADDR_WIDTH)-1) of RAM_ENTRY_TYPE;
- signal ram : RAM_TYPE := (others=> x"00000001");
+ signal ram : RAM_TYPE := (
+ 0 => x"00000010",
+ 1 => x"00110010",
+ 2 => x"000000FF",
+ 3 => x"00AB00BA",
+ others=> x"00000000");
begin
process(clk)
subtype RAM_ENTRY_TYPE is std_logic_vector(DATA_WIDTH -1 downto 0);
type RAM_TYPE is array (0 to (2**ADDR_WIDTH)-1) of RAM_ENTRY_TYPE;
- signal ram : RAM_TYPE := ((others => b"11100000000000001001000000000000"));
+ signal ram : RAM_TYPE := (0 => "11100000000000011001000000000000",
+ 1 => "11100000000000001001000000000000",
+ 2 => "11100000000010001001000000000000",
+ 3 => "11100001000110010111011001101100",
+ others => x"00000000");
begin
process(clk)