Use Cases
- Reusable RadHDL building block for graph-generated FPGA systems.
Block Diagram
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
| Name | Type | Default | Description |
|---|---|---|---|
| DATA_WIDTH | integer | 32 | Width of the RADIF register data path. |
| REG_ADDR_WIDTH | integer | 16 | Width of the RADIF byte address path. |
| IRQ_COUNT | positive | 8 | Number of interrupt source inputs. |
| VENDOR_TAG | string | "GENERIC" | Vendor selector retained for generated package consistency. |
| PRODUCT_SERIES_TAG | string | "GENERIC" | Device-family selector retained for generated package consistency. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
| clk | in | std_logic | Register clock. |
| rstn | in | std_logic | Active-low register reset. |
| irq_i | in | std_logic_vector(IRQ_COUNT - 1 downto 0) | Raw interrupt source inputs. |
| irq_o | out | std_logic | Shared masked interrupt output. |
| irq_pending_o | out | std_logic_vector(IRQ_COUNT - 1 downto 0) | Masked pending interrupt bits. |
| reg_wr_addr | in | std_logic_vector(REG_ADDR_WIDTH - 1 downto 0) | Register write address. |
| reg_rd_addr | in | std_logic_vector(REG_ADDR_WIDTH - 1 downto 0) | Register read address. |
| reg_wr_en | in | std_logic | One-cycle register write request. |
| reg_rd_en | in | std_logic | One-cycle register read request. |
| reg_data_in | in | std_logic_vector(DATA_WIDTH - 1 downto 0) | Register write data. |
| reg_data_out | out | std_logic_vector(DATA_WIDTH - 1 downto 0) | Register read data. |
| reg_wr_rdy | out | std_logic | Register write ready. |
| reg_rd_rdy | out | std_logic | Register read ready. |
| reg_wr_valid | out | std_logic | Register write response valid. |
| reg_rd_valid | out | std_logic | Register read response valid. |
| reg_error | out | std_logic | Register 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.
| Part | Clock ns | MHz | LUTs | FFs | BRAM tiles | DSPs | Setup WNS ns | Hold WHS ns | Generics | Summary |
|---|---|---|---|---|---|---|---|---|---|---|
| xc7z020clg400-1 | 10.0 | 100.0 | 48 | 99 | 0 | 0 | 6.953 | 0.152 | - | projects/synth_reports/radif_irq_controller/xc7z020clg400-1/synth_summary.json |
| xczu3eg-sfvc784-1-e | 6.667 | 149.993 | 48 | 99 | 0 | 0 | 5.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.
| Interface | Directions | Signals | Representative ports |
|---|---|---|---|
| Register control/status | in, out | 11 | reg_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
Aggregates interrupt sources into masked pending status and one shared interrupt output.
| Register | Offset | Access | Reset | Description |
|---|---|---|---|---|
| control | 0x00 | rw | 0x00000000 | Configures global interrupt output behavior. |
| status | 0x04 | ro | 0x00000000 | Summarized interrupt controller state. |
| mask | 0x08 | rw | 0x00000000 | Per-source interrupt mask. |
| pending | 0x0C | rw | 0x00000000 | Latched interrupt pending bits. |
| clear | 0x10 | wo | 0x00000000 | Write-one-to-clear pending bits. |
| force | 0x14 | wo | 0x00000000 | Software force register for pending bits. |
control
Configures global interrupt output behavior.
| Name | Register bit(s) | Description |
|---|---|---|
| GLOBAL EN | Control[0] | When set, masked pending bits may assert irq_o. |
status
Summarized interrupt controller state.
| Name | Register bit(s) | Description |
|---|---|---|
| MASKED PENDING | Status[1] | Set when any pending interrupt is enabled by MASK. |
| GLOBAL EN | Status[0] | Current global interrupt enable state. |
mask
Per-source interrupt mask.
| Name | Register bit(s) | Description |
|---|---|---|
| IRQ MASK | Mask[31:0] | A bit value of 1 enables the corresponding source pending bit. |
pending
Latched interrupt pending bits.
| Name | Register bit(s) | Description |
|---|---|---|
| IRQ PENDING | Pending[31:0] | Current pending bits. Writes replace the pending register. |
clear
Write-one-to-clear pending bits.
| Name | Register bit(s) | Description |
|---|---|---|
| IRQ CLEAR | Clear[31:0] | Writing 1 clears the corresponding pending bit. |
force
Software force register for pending bits.
| Name | Register bit(s) | Description |
|---|---|---|
| IRQ FORCE | Force[31:0] | Writing 1 sets the corresponding pending bit. |
Testbenches
tb_radif_gpio_irq
Exercises RADIF GPIO and interrupt-controller register behavior.
Interface Timing Diagram
Sources
- interfaces/hdl/radif/src/radif_irq_controller.vhd
