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

Subversion Repositories light8080

[/] [light8080/] [trunk/] [vhdl/] [light8080.vhdl] - Diff between revs 39 and 49

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

Rev 39 Rev 49
Line 147... Line 147...
signal uc_do_ret :    std_logic;  -- ret flag, pipelined
signal uc_do_ret :    std_logic;  -- ret flag, pipelined
signal uc_halt_flag : std_logic;  -- uinst field, decoded 'halt' flag
signal uc_halt_flag : std_logic;  -- uinst field, decoded 'halt' flag
signal uc_halt :      std_logic;  -- halt command
signal uc_halt :      std_logic;  -- halt command
signal halt_reg :     std_logic;  -- halt status reg, output as 'halt' signal
signal halt_reg :     std_logic;  -- halt status reg, output as 'halt' signal
signal uc_ei :        std_logic;  -- uinst field, decoded 'ei' flag
signal uc_ei :        std_logic;  -- uinst field, decoded 'ei' flag
signal uc_di :        std_logic;  -- uinst field, decoded 'ei' flag
signal uc_di :        std_logic;  -- uinst field, decoded 'di' flag
signal inte_reg :     std_logic;  -- inte status reg, output as 'inte' signal
signal inte_reg :     std_logic;  -- inte status reg, output as 'inte' signal
signal int_pending :  std_logic;  -- intr requested, inta not active yet
signal int_pending :  std_logic;  -- intr requested, inta not active yet
signal inta_reg :     std_logic;  -- inta status reg, output as 'inta'
signal inta_reg :     std_logic;  -- inta status reg, output as 'inta'
signal clr_t1 :       std_logic;  -- uinst field, explicitly erase T1
signal clr_t1 :       std_logic;  -- uinst field, explicitly erase T1
signal do_clr_t1 :    std_logic;  -- clr_t1 pipelined
signal do_clr_t1 :    std_logic;  -- clr_t1 pipelined
signal clr_t2 :       std_logic;  -- uinst field, explicitly erase T2
signal clr_t2 :       std_logic;  -- uinst field, explicitly erase T2
signal do_clr_t2 :    std_logic;  -- clr_t2 pipelined
signal do_clr_t2 :    std_logic;  -- clr_t2 pipelined
signal ucode :        std_logic_vector(31 downto 0); -- microcode word
signal ucode :        std_logic_vector(31 downto 0); -- microcode word
signal ucode_field2 : std_logic_vector(24 downto 0); -- pipelined microcode
signal ucode_field2 : std_logic_vector(24 downto 0); -- pipelined microcode
 
 
 
-- used to delay interrup enable for one entire instruction after EI
 
signal delayed_ei :   std_logic;
 
 
-- microcode ROM : see design notes and microcode source file 
-- microcode ROM : see design notes and microcode source file 
type t_rom is array (0 to 511) of std_logic_vector(31 downto 0);
type t_rom is array (0 to 511) of std_logic_vector(31 downto 0);
 
 
signal rom : t_rom := (
signal rom : t_rom := (
"00000000000000000000000000000000", -- 000
"00000000000000000000000000000000", -- 000
Line 772... Line 775...
-- ALU intermediate results
-- ALU intermediate results
signal logic_res :    std_logic_vector(7 downto 0);
signal logic_res :    std_logic_vector(7 downto 0);
signal shift_res :    std_logic_vector(7 downto 0);
signal shift_res :    std_logic_vector(7 downto 0);
signal alu_mux1 :     std_logic_vector(7 downto 0);
signal alu_mux1 :     std_logic_vector(7 downto 0);
 
 
 
 
begin
begin
 
 
DI <= data_in;
DI <= data_in;
 
 
process(clk)    -- IR register, load when uc_decode flag activates
process(clk)    -- IR register, load when uc_decode flag activates
Line 935... Line 939...
process(clk)
process(clk)
begin
begin
  if clk'event and clk='1' then
  if clk'event and clk='1' then
    if reset = '1' then
    if reset = '1' then
      inte_reg <= '0';
      inte_reg <= '0';
 
      delayed_ei <= '0';
 
    else
 
      if (uc_di='1' or uc_ei='1') and uc_end='1' then
 
        --inte_reg <= uc_ei;
 
        delayed_ei <= uc_ei; -- FIXME DI must not be delayed
 
      end if;
 
      if uc_end = '1' then -- at the last cycle of every instruction...
 
        if uc_di='1' then  -- ...disable interrupts if the instruction is DI...
 
          inte_reg <= '0';
    else
    else
      if uc_di='1' or uc_ei='1' then
          -- ...of enable interrupts after the instruction following EI
        inte_reg <= uc_ei;
          inte_reg <= delayed_ei;
 
        end if;
      end if;
      end if;
    end if;
    end if;
  end if;
  end if;
end process;
end process;
 
 

powered by: WebSVN 2.1.0

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