Line 19... |
Line 19... |
pc_new : in std_logic_vector(31 downto 2);
|
pc_new : in std_logic_vector(31 downto 2);
|
take_branch : in std_logic;
|
take_branch : in std_logic;
|
pause_in : in std_logic;
|
pause_in : in std_logic;
|
opcode25_0 : in std_logic_vector(25 downto 0);
|
opcode25_0 : in std_logic_vector(25 downto 0);
|
pc_source : in pc_source_type;
|
pc_source : in pc_source_type;
|
pc_out : out std_logic_vector(31 downto 0));
|
pc_out : out std_logic_vector(31 downto 0);
|
|
pc_out_plus4 : out std_logic_vector(31 downto 0));
|
end; --pc_next
|
end; --pc_next
|
|
|
architecture logic of pc_next is
|
architecture logic of pc_next is
|
-- type pc_source_type is (from_inc4, from_opcode25_0, from_branch,
|
-- type pc_source_type is (from_inc4, from_opcode25_0, from_branch,
|
-- from_lbranch);
|
-- from_lbranch);
|
signal pc_reg : std_logic_vector(31 downto 2); --:= ZERO(31 downto 2);
|
signal pc_reg : std_logic_vector(31 downto 2); --:= ZERO(31 downto 2);
|
begin
|
begin
|
|
|
pc_next: process(clk, reset_in, pc_new, take_branch, pause_in,
|
pc_next: process(clk, reset_in, pc_new, take_branch, pause_in,
|
opcode25_0, pc_source,
|
opcode25_0, pc_source, pc_reg)
|
pc_reg)
|
|
variable pc_inc, pc_next : std_logic_vector(31 downto 2);
|
variable pc_inc, pc_next : std_logic_vector(31 downto 2);
|
begin
|
begin
|
pc_inc := bv_increment(pc_reg); --pc_reg+1
|
pc_inc := bv_increment(pc_reg); --pc_reg+1
|
pc_next := pc_reg;
|
pc_next := pc_reg;
|
case pc_source is
|
case pc_source is
|
Line 59... |
Line 59... |
if rising_edge(clk) then
|
if rising_edge(clk) then
|
pc_reg <= pc_next;
|
pc_reg <= pc_next;
|
end if;
|
end if;
|
|
|
pc_out <= pc_reg & "00";
|
pc_out <= pc_reg & "00";
|
|
pc_out_plus4 <= pc_inc & "00";
|
end process;
|
end process;
|
|
|
end; --logic
|
end; --logic
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|