gpio

Drive one GPIO pad from AXI-Lite registers with an LSIO override path.

AXI-Lite accesses pass a gpio_filter AxPROT check before reaching the gpio_intf register block. lsio_interface_select_i steers pad direction and data between register control and the LSIO plane. Each of core2pad data, output enable and input enable is owned, in priority order, by the LSIO pin select, the register override, then the DATA_CTRL.lsio_select software select; DATA_CTRL.lsio_disable blocks both LSIO selects. The pad input is synchronized into clk_i by prim_sync3r for the register readback and the interrupt, which DATA_CTRL.interrupt_type selects as active-high level, active-low level, rising edge or falling edge. GPIO control-register access for the pad ring lives elsewhere; this block handles its own interface registers only. core2pad_* and pad2core_* are the pad-facing request wires.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
MAX_TRANSint unsigned32Maximum open transactions per channel in the filter demux.
INPUT_BY_DEFAULTbit1'b1pad2core_en_o value during cold reset and when no source owns the input enable.
GPIO_INTF_REG_MAP_SIZEbit [AddrWidth-1:0]0Interface register-map size in bytes; its clog2 is the address width passed to the register block.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock, rising-edge triggered.
rst_primary_niinputlogicPrimary async reset, active-low. Assert asynchronously; deassert synchronously to clk_i. Resets the filter, registers, synchronizer and interrupt state.
rst_cold_niinputlogicCold reset, active-low, applied combinationally: while low the output is disabled, pad2core_en_o is INPUT_BY_DEFAULT and pad2core_i passes to lsio_pad2core_data_o.
test_en_iinputlogicDFT test enable, active-high; drives the filter demux test input.
axil_req_iinputgpio_axil_req_tAXI-Lite CSR request. 32-bit address and data.
axil_resp_ooutputgpio_axil_resp_tAXI-Lite CSR response.
lsio_interface_select_iinputlogicActive-high LSIO pad-control select; highest priority unless DATA_CTRL.lsio_disable is set.
lsio_core2pad_en_niinputlogicLSIO core-to-pad enable, active-low.
lsio_core2pad_data_iinputlogicLSIO core-to-pad data.
lsio_pad2core_en_niinputlogicLSIO pad-to-core enable, active-low.
lsio_pad2core_data_ooutputlogicUnsynchronized pad2core_i while an LSIO select is active or in cold reset; low otherwise.
interrupt_ooutputlogicGPIO interrupt, active-high, registered in clk_i and gated by DATA_CTRL.interrupt_enable; a one-cycle pulse in the edge modes.
core2pad_ooutputCore-to-pad data.
core2pad_en_ooutputCore-to-pad output enable, active-high.
pad2core_iinputPad-to-core data.
pad2core_en_ooutputPad-to-core input enable, active-high.