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

Subversion Repositories mlite

[/] [mlite/] [trunk/] [vhdl/] [bus_mux.vhd] - Diff between revs 2 and 6

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

Rev 2 Rev 6
Line 30... Line 30...
        b_out        : out std_logic_vector(31 downto 0);
        b_out        : out std_logic_vector(31 downto 0);
 
 
        c_bus        : in  std_logic_vector(31 downto 0);
        c_bus        : in  std_logic_vector(31 downto 0);
        c_memory     : in  std_logic_vector(31 downto 0);
        c_memory     : in  std_logic_vector(31 downto 0);
        c_pc         : in  std_logic_vector(31 downto 0);
        c_pc         : in  std_logic_vector(31 downto 0);
 
        c_pc_plus4   : in  std_logic_vector(31 downto 0);
        c_mux        : in  c_source_type;
        c_mux        : in  c_source_type;
        reg_dest_out : out std_logic_vector(31 downto 0);
        reg_dest_out : out std_logic_vector(31 downto 0);
 
 
        branch_func  : in  branch_function_type;
        branch_func  : in  branch_function_type;
        take_branch  : out std_logic);
        take_branch  : out std_logic);
Line 81... Line 82...
      end if;
      end if;
      b_out(17 downto 0) <= imm_in & "00";
      b_out(17 downto 0) <= imm_in & "00";
   end case;
   end case;
end process;
end process;
 
 
cmux: process(c_bus, c_memory, c_pc, imm_in, c_mux)
cmux: process(c_bus, c_memory, c_pc, c_pc_plus4, imm_in, c_mux)
begin
begin
   case c_mux is
   case c_mux is
   when c_from_alu | c_from_shift | c_from_mult =>
   when c_from_alu | c_from_shift | c_from_mult =>
      reg_dest_out <= c_bus;
      reg_dest_out <= c_bus;
   when c_from_memory =>
   when c_from_memory =>
      reg_dest_out <= c_memory;
      reg_dest_out <= c_memory;
   when c_from_pc =>
   when c_from_pc =>
      reg_dest_out <= c_pc;
      reg_dest_out <= c_pc(31 downto 3) & "000"; --backup one opcode
 
   when c_from_pc_plus4 =>
 
      reg_dest_out <= c_pc_plus4;
   when c_from_imm_shift16 =>
   when c_from_imm_shift16 =>
      reg_dest_out <= imm_in & ZERO(15 downto 0);
      reg_dest_out <= imm_in & ZERO(15 downto 0);
--   when from_reg_source_nez =>
--   when from_reg_source_nez =>
--????
--????
--   when from_reg_source_eqz =>
--   when from_reg_source_eqz =>

powered by: WebSVN 2.1.0

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