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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [rtl/] [w11a/] [pdp11_irq.vhd] - Diff between revs 8 and 13

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

Rev 8 Rev 13
Line 1... Line 1...
-- $Id: pdp11_irq.vhd 335 2010-10-24 22:24:23Z mueller $
-- $Id: pdp11_irq.vhd 427 2011-11-19 21:04:11Z mueller $
--
--
-- Copyright 2007-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2007-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
--
-- This program is free software; you may redistribute and/or modify it under
-- This program is free software; you may redistribute and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- the terms of the GNU General Public License as published by the Free
-- Software Foundation, either version 2, or at your option any later version.
-- Software Foundation, either version 2, or at your option any later version.
--
--
Line 16... Line 16...
-- Description:    pdp11: interrupt requester
-- Description:    pdp11: interrupt requester
--
--
-- Dependencies:   ib_sel
-- Dependencies:   ib_sel
-- Test bench:     tb/tb_pdp11_core (implicit)
-- Test bench:     tb/tb_pdp11_core (implicit)
-- Target Devices: generic
-- Target Devices: generic
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2, 12.1; ghdl 0.18-0.29
-- Tool versions:  xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29
--
--
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2011-11-18   427   1.2.2  now numeric_std clean
-- 2010-10-23   335   1.2.1  use ib_sel
-- 2010-10-23   335   1.2.1  use ib_sel
-- 2010-10-17   333   1.2    use ibus V2 interface
-- 2010-10-17   333   1.2    use ibus V2 interface
-- 2008-08-22   161   1.1.4  use iblib
-- 2008-08-22   161   1.1.4  use iblib
-- 2008-04-25   138   1.1.3  use BRESET to clear pirq
-- 2008-04-25   138   1.1.3  use BRESET to clear pirq
-- 2008-01-06   111   1.1.2  rename signal EI_ACK->EI_ACKM (master ack)
-- 2008-01-06   111   1.1.2  rename signal EI_ACK->EI_ACKM (master ack)
Line 34... Line 35...
-- 2007-05-12    26   1.0    Initial version 
-- 2007-05-12    26   1.0    Initial version 
------------------------------------------------------------------------------
------------------------------------------------------------------------------
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.numeric_std.all;
 
 
use work.slvtypes.all;
use work.slvtypes.all;
use work.iblib.all;
use work.iblib.all;
use work.pdp11.all;
use work.pdp11.all;
 
 
Line 59... Line 60...
  );
  );
end pdp11_irq;
end pdp11_irq;
 
 
architecture syn of pdp11_irq is
architecture syn of pdp11_irq is
 
 
  constant ibaddr_pirq : slv16 := conv_std_logic_vector(8#177772#,16);
  constant ibaddr_pirq : slv16 := slv(to_unsigned(8#177772#,16));
 
 
  subtype  pirq_ubf_pir    is integer range 15 downto 9;
  subtype  pirq_ubf_pir    is integer range 15 downto 9;
  subtype  pirq_ubf_pia_h  is integer range  7 downto 5;
  subtype  pirq_ubf_pia_h  is integer range  7 downto 5;
  subtype  pirq_ubf_pia_l  is integer range  3 downto 1;
  subtype  pirq_ubf_pia_l  is integer range  3 downto 1;
 
 
Line 99... Line 100...
    IB_SRES.busy <= '0';
    IB_SRES.busy <= '0';
  end process proc_ibres;
  end process proc_ibres;
 
 
  proc_pirq : process (CLK)
  proc_pirq : process (CLK)
  begin
  begin
    if CLK'event and CLK='1' then
    if rising_edge(CLK) then
      if BRESET = '1' then
      if BRESET = '1' then
        R_PIRQ <= (others => '0');
        R_PIRQ <= (others => '0');
      elsif IBSEL_PIRQ='1' and IB_MREQ.we='1'and IB_MREQ.be1='1'  then
      elsif IBSEL_PIRQ='1' and IB_MREQ.we='1'and IB_MREQ.be1='1'  then
        R_PIRQ <= IB_MREQ.din(pirq_ubf_pir);
        R_PIRQ <= IB_MREQ.din(pirq_ubf_pir);
      end if;
      end if;
Line 118... Line 119...
            "010" when R_PIRQ(2)='1' else
            "010" when R_PIRQ(2)='1' else
            "001" when R_PIRQ(1)='1' else
            "001" when R_PIRQ(1)='1' else
            "000";
            "000";
 
 
  proc_irq : process (PI_PRI, EI_PRI, EI_VECT, INT_ACK)
  proc_irq : process (PI_PRI, EI_PRI, EI_VECT, INT_ACK)
 
    constant vect_default : slv9 := slv(to_unsigned(8#240#,9));
  begin
  begin
 
 
    EI_ACKM <= '0';
    EI_ACKM <= '0';
 
 
    if unsigned(EI_PRI) > unsigned(PI_PRI) then
    if unsigned(EI_PRI) > unsigned(PI_PRI) then
      PRI  <= EI_PRI;
      PRI  <= EI_PRI;
      VECT <= EI_VECT;
      VECT <= EI_VECT;
      EI_ACKM <= INT_ACK;
      EI_ACKM <= INT_ACK;
    else
    else
      PRI  <= PI_PRI;
      PRI  <= PI_PRI;
      VECT <= conv_std_logic_vector(8#240#,9)(8 downto 2);
      VECT <= vect_default(8 downto 2);
    end if;
    end if;
 
 
  end process proc_irq;
  end process proc_irq;
 
 
end syn;
end syn;

powered by: WebSVN 2.1.0

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