Radical Computer Technologies
Interfaces / entity

radif_irq_controller

Documentation version: 0.2.0 / Subpackage: radif_regbank / Source package: radif

RADIF-controlled interrupt aggregator. Latches interrupt sources into a pending register, applies a programmable mask, supports software force/clear bits, and emits one shared IRQ output.

Use Cases

Block Diagram

radif_irq_controller radhdl entity clk rstn irq_i reg_wr_addr reg_rd_addr reg_wr_en reg_rd_en reg_data_in irq_o irq_pending_o reg_data_out reg_wr_rdy reg_rd_rdy reg_wr_valid reg_rd_valid reg_error
VHDL Include And Instantiation Template

File Header

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

library radhdl;
-- Direct entity instantiation below does not require importing the entity name.
use radhdl.interfaces.all;
-- Narrower alternative: use radhdl.interfaces_regbank.all;

Component Declaration

component radif_irq_controller is
  generic (
    DATA_WIDTH : integer := 32;
    REG_ADDR_WIDTH : integer := 16;
    IRQ_COUNT : positive := 8;
    VENDOR_TAG : string := "GENERIC";
    PRODUCT_SERIES_TAG : string := "GENERIC"
  );
  port (
    clk : in std_logic;
    rstn : in std_logic;
    irq_i : in std_logic_vector(IRQ_COUNT - 1 downto 0);
    irq_o : out std_logic;
    irq_pending_o : out std_logic_vector(IRQ_COUNT - 1 downto 0);
    reg_wr_addr : in std_logic_vector(REG_ADDR_WIDTH - 1 downto 0);
    reg_rd_addr : in std_logic_vector(REG_ADDR_WIDTH - 1 downto 0);
    reg_wr_en : in std_logic;
    reg_rd_en : in std_logic;
    reg_data_in : in std_logic_vector(DATA_WIDTH - 1 downto 0);
    reg_data_out : out std_logic_vector(DATA_WIDTH - 1 downto 0);
    reg_wr_rdy : out std_logic;
    reg_rd_rdy : out std_logic;
    reg_wr_valid : out std_logic;
    reg_rd_valid : out std_logic;
    reg_error : out std_logic
  );
end component;

Direct Entity Instantiation

u_radif_irq_controller : entity radhdl.radif_irq_controller
  generic map (
    DATA_WIDTH         => 32,
    REG_ADDR_WIDTH     => 16,
    IRQ_COUNT          => 8,
    VENDOR_TAG         => "GENERIC",
    PRODUCT_SERIES_TAG => "GENERIC"
  )
  port map (
    clk           => <clk_signal>,
    rstn          => <rstn_signal>,
    irq_i         => <irq_i_signal>,
    irq_o         => <irq_o_signal>,
    irq_pending_o => <irq_pending_o_signal>,
    reg_wr_addr   => <reg_wr_addr_signal>,
    reg_rd_addr   => <reg_rd_addr_signal>,
    reg_wr_en     => <reg_wr_en_signal>,
    reg_rd_en     => <reg_rd_en_signal>,
    reg_data_in   => <reg_data_in_signal>,
    reg_data_out  => <reg_data_out_signal>,
    reg_wr_rdy    => <reg_wr_rdy_signal>,
    reg_rd_rdy    => <reg_rd_rdy_signal>,
    reg_wr_valid  => <reg_wr_valid_signal>,
    reg_rd_valid  => <reg_rd_valid_signal>,
    reg_error     => <reg_error_signal>
  );

Generics

NameTypeDefaultDescription
DATA_WIDTHinteger32Width of the RADIF register data path.
REG_ADDR_WIDTHinteger16Width of the RADIF byte address path.
IRQ_COUNTpositive8Number of interrupt source inputs.
VENDOR_TAGstring"GENERIC"Vendor selector retained for generated package consistency.
PRODUCT_SERIES_TAGstring"GENERIC"Device-family selector retained for generated package consistency.

Ports

NameDirectionTypeDescription
clkinstd_logicRegister clock.
rstninstd_logicActive-low register reset.
irq_iinstd_logic_vector(IRQ_COUNT - 1 downto 0)Raw interrupt source inputs.
irq_ooutstd_logicShared masked interrupt output.
irq_pending_ooutstd_logic_vector(IRQ_COUNT - 1 downto 0)Masked pending interrupt bits.
reg_wr_addrinstd_logic_vector(REG_ADDR_WIDTH - 1 downto 0)Register write address.
reg_rd_addrinstd_logic_vector(REG_ADDR_WIDTH - 1 downto 0)Register read address.
reg_wr_eninstd_logicOne-cycle register write request.
reg_rd_eninstd_logicOne-cycle register read request.
reg_data_ininstd_logic_vector(DATA_WIDTH - 1 downto 0)Register write data.
reg_data_outoutstd_logic_vector(DATA_WIDTH - 1 downto 0)Register read data.
reg_wr_rdyoutstd_logicRegister write ready.
reg_rd_rdyoutstd_logicRegister read ready.
reg_wr_validoutstd_logicRegister write response valid.
reg_rd_validoutstd_logicRegister read response valid.
reg_erroroutstd_logicRegister transaction error.

Measured Implementation Metrics

Metrics are generated by RadBuild from real Vivado synthesis reports for representative device targets. Raw report paths are preserved in the checked summary JSON.

PartClock nsMHzLUTsFFsBRAM tilesDSPsSetup WNS nsHold WHS nsGenericsSummary
xc7z020clg400-110.0100.04899006.9530.152-projects/synth_reports/radif_irq_controller/xc7z020clg400-1/synth_summary.json
xczu3eg-sfvc784-1-e6.667149.9934899005.602-0.068-projects/synth_reports/radif_irq_controller/xczu3eg-sfvc784-1-e/synth_summary.json

Register Interfaces

Static register maps are rendered below for this module.

InterfaceDirectionsSignalsRepresentative ports
Register control/statusin, out11reg_wr_addr, reg_rd_addr, reg_wr_en, reg_rd_en, reg_data_in, reg_data_out, reg_wr_rdy, reg_rd_rdy, +3 more

Register Maps

radif_irq_controller

Source: interfaces/hdl/radif/register_maps/radif_irq_controller.map.json

Aggregates interrupt sources into masked pending status and one shared interrupt output.

RegisterOffsetAccessResetDescription
control0x00rw0x00000000Configures global interrupt output behavior.
status0x04ro0x00000000Summarized interrupt controller state.
mask0x08rw0x00000000Per-source interrupt mask.
pending0x0Crw0x00000000Latched interrupt pending bits.
clear0x10wo0x00000000Write-one-to-clear pending bits.
force0x14wo0x00000000Software force register for pending bits.

control

Offset 0x00 / Access rw / Reset 0x00000000

Configures global interrupt output behavior.

Control[15:0]
1514131211109876543210
RSVD [15:1]
GLOBAL EN
Control[31:16]
31302928272625242322212019181716
RSVD [31:16]
NameRegister bit(s)Description
GLOBAL ENControl[0]When set, masked pending bits may assert irq_o.

status

Offset 0x04 / Access ro / Reset 0x00000000

Summarized interrupt controller state.

Status[15:0]
1514131211109876543210
RSVD [15:2]
MASKED PENDING
GLOBAL EN
Status[31:16]
31302928272625242322212019181716
RSVD [31:16]
NameRegister bit(s)Description
MASKED PENDINGStatus[1]Set when any pending interrupt is enabled by MASK.
GLOBAL ENStatus[0]Current global interrupt enable state.

mask

Offset 0x08 / Access rw / Reset 0x00000000

Per-source interrupt mask.

Mask[15:0]
1514131211109876543210
IRQ MASK [15:0]
Mask[31:16]
31302928272625242322212019181716
IRQ MASK [31:16]
NameRegister bit(s)Description
IRQ MASKMask[31:0]A bit value of 1 enables the corresponding source pending bit.

pending

Offset 0x0C / Access rw / Reset 0x00000000

Latched interrupt pending bits.

Pending[15:0]
1514131211109876543210
IRQ PENDING [15:0]
Pending[31:16]
31302928272625242322212019181716
IRQ PENDING [31:16]
NameRegister bit(s)Description
IRQ PENDINGPending[31:0]Current pending bits. Writes replace the pending register.

clear

Offset 0x10 / Access wo / Reset 0x00000000

Write-one-to-clear pending bits.

Clear[15:0]
1514131211109876543210
IRQ CLEAR [15:0]
Clear[31:16]
31302928272625242322212019181716
IRQ CLEAR [31:16]
NameRegister bit(s)Description
IRQ CLEARClear[31:0]Writing 1 clears the corresponding pending bit.

force

Offset 0x14 / Access wo / Reset 0x00000000

Software force register for pending bits.

Force[15:0]
1514131211109876543210
IRQ FORCE [15:0]
Force[31:16]
31302928272625242322212019181716
IRQ FORCE [31:16]
NameRegister bit(s)Description
IRQ FORCEForce[31:0]Writing 1 sets the corresponding pending bit.

Testbenches

tb_radif_gpio_irq interface timing diagram

Source: interfaces/hdl/radif/testbenches/tb_radif_gpio_irq.vhd

Exercises RADIF GPIO and interrupt-controller register behavior.

Interface Timing Diagram

Source: interfaces/hdl/radif/testbenches/tb_radif_gpio_irq.vhd

clk
rstn
irq_i
irq_o
irq_pending_o
reg_rd_valid
reg_wr_valid
reg_data_in
reg_data_out
reg_rd_addr
reg_wr_addr
reg_error
reg_rd_en
reg_rd_rdy
reg_wr_en
reg_wr_rdy

Sources