OpenCores
URL https://opencores.org/ocsvn/mlite/mlite/trunk

Subversion Repositories mlite

[/] [mlite/] [trunk/] [vhdl/] [pc_next.vhd] - Diff between revs 76 and 128

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 76 Rev 128
Line 24... Line 24...
        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));
        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, 
   signal pc_reg : std_logic_vector(31 downto 2);
--      from_lbranch);
 
   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, pc_reg)
                 opcode25_0, pc_source, 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
 
 
   case pc_source is
   case pc_source is
   when from_inc4 =>
   when FROM_INC4 =>
      pc_next := pc_inc;
      pc_next := pc_inc;
   when from_opcode25_0 =>
   when FROM_OPCODE25_0 =>
      pc_next := pc_reg(31 downto 28) & opcode25_0;
      pc_next := pc_reg(31 downto 28) & opcode25_0;
   when others =>   --from_branch | from_lbranch =>
   when FROM_BRANCH | FROM_LBRANCH =>
      if take_branch = '1' then
      if take_branch = '1' then
         pc_next := pc_new;
         pc_next := pc_new;
      else
      else
         pc_next := pc_inc;
         pc_next := pc_inc;
      end if;
      end if;
 
   when others =>
 
      pc_next := pc_inc;
   end case;
   end case;
 
 
   if pause_in = '1' then
   if pause_in = '1' then
      pc_next := pc_reg;
      pc_next := pc_reg;
   end if;
   end if;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.