Skip to content

pb_InterruptController

Patrick Lehmann edited this page Sep 8, 2015 · 1 revision

pb_InterruptController

This interrupt controller can handle up to 32 ports. All ports are arbitrated by a round-robin arbitration algorithm (PoC.bus.Arbiter). Each interrupt source can supply a interrupt message of 1 byte to the controller, which is latched until the particular interrupt is handled by the !PicoBlaze.

Registers

           | 1 to 8 ports          | 9 to 16 ports
==============================================================
Register 0 | Enable Inerrupts 8:1  | Enable Inerrupts 8:1
Register 1 | Disable Inerrupts 8:1 | Enable Inerrupts 16:9
Register 2 |                       | Disable Inerrupts 8:1
Register 3 |                       | Disable Inerrupts 16:9

Dependencies

library IEEE;
use     IEEE.STD_LOGIC_1164.all;
use     IEEE.NUMERIC_STD.all;
    
library PoC;
use     PoC.utils.all;
use     PoC.vectors.all;
use     PoC.components.all;
    
library L_PicoBlaze;
use     L_PicoBlaze.pb.all;</code>

Entity

entity pb_InterruptController is
  generic (
    DEBUG             : BOOLEAN               := FALSE;
    ADDRESS_MAPPING   : T_PB_ADDRESS_MAPPING;
    PORTS             : POSITIVE              := 4
  );
  port (
    Clock             : in  STD_LOGIC;
    Reset             : in  STD_LOGIC;
		
    -- PicoBlaze interface
    PB_Address        : in  T_SLV_8;
    PB_WriteStrobe    : in  STD_LOGIC;
    PB_WriteStrobe_K  : in  STD_LOGIC;
    PB_ReadStrobe     : in  STD_LOGIC;
    PB_DataIn         : in  T_SLV_8;
    PB_DataOut        : out T_SLV_8;
    PB_Interrupt      : out STD_LOGIC;
    PB_Interrupt_Ack  : in  STD_LOGIC;
		
    -- Interrupt source interface
    Interrupt         : in  STD_LOGIC_VECTOR(PORTS - 1 downto 0);
    Interrupt_Ack     : out STD_LOGIC_VECTOR(PORTS - 1 downto 0);
    Interrupt_Message : in  T_SLVV_8(PORTS - 1 downto 0)
  );
end entity;

Clone this wiki locally