gpio_shim

Shim a GPIO pad with 2nd-HW override, LSIO, strap capture, and model control.

force_primary_i preempts hw2 override back to the primary plane (for example CAT-THERM over a 2nd-HW-function override). External drive, pull, and glitch-filter controls can override register settings when selected: the electrical controls come, in priority order, from the cold-reset defaults, the LSIO pin select, CONTROL.config_enable, then the LSIO software select. AXI-Lite addresses below the GPIO_CTRL base plus size reach the gpio_ctrl register block; the base-plus-size address and above receive DECERR from an error subordinate. Addresses below the base are decoded away upstream, so this shim bounds only the top of the aperture. While rst_cold_ni is low a latch follows the pad input, and it holds the strap value once rst_cold_ni rises.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
INPUT_BY_DEFAULTbit1'b1Enables strap capture and drives CONTROL.strap_valid; when clear, captured_strap_o is tied low.
ENABLE_PULLbit1'b0Pull enable driven in cold reset and when no source owns the electrical controls.
USE_PULL_UPbit1'b0Pull select driven in cold reset and when no source owns the electrical controls; 1 selects pull-up.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_primary_niinputlogicPrimary async reset, active-low; resets the demux, error subordinate and register block.
rst_cold_niinputlogicCold reset, active-low; forces the default electrical controls and opens the strap latch while low.
test_en_iinputlogicDFT test enable, driven to the demux test input.
core2pad_iinputPrimary core-to-pad data.
core2pad_en_iinputPrimary core-to-pad enable.
pad2core_ooutputPad input to the primary plane, driven from gpio_in_i whether or not the override is active.
pad2core_en_iinputPrimary pad-to-core enable.
core2pad_ovrd_iinputlogic2nd-HW core-to-pad data, used while CONTROL.hw2_ovrd is set and force_primary_i is low.
core2pad_en_ovrd_iinputlogic2nd-HW core-to-pad enable.
pad2core_ovrd_ooutputlogic2nd-HW pad-to-core data; low while the override is inactive.
pad2core_en_ovrd_iinputlogic2nd-HW pad-to-core enable.
force_primary_iinputlogicForce the primary plane over hw2 override. Assert for safety preempt (e.g. CAT-THERM).
ext_intf_sel_iinputlogicLSIO pin select; the ext_* controls take priority over the register settings unless reg_lsio_disable_i is set.
reg_lsio_sel_iinputlogicSoftware LSIO select; applies the ext_* controls only when CONTROL.config_enable is clear.
reg_lsio_disable_iinputlogicRegister LSIO disable; blocks both LSIO selects.
ext_drive_strength_iinputlogic [2:0]External drive strength.
ext_pull_en_iinputlogicExternal pull enable.
ext_pull_sel_iinputlogicExternal pull select.
ext_gf_disable_iinputlogicDisable the glitch filter.
captured_strap_ooutputlogicPad input latched while rst_cold_ni is low; also read back as CONTROL.strap_value.
gpio_in_iinputlogicPad input level.
gpio_out_ooutputlogicPad output data.
gpio_in_en_ooutputlogicPad input enable.
gpio_out_en_ooutputlogicPad output enable.
gpio_ctrl_ooutputgpio_model_ctrl_tPad drive strength, pull and glitch-filter controls; sps is always low.
gpio_status_iinputgpio_model_status_tModel status struct; unused.
axil_req_iinputgpio_axil_req_tAXI-Lite CSR request.
axil_resp_ooutputgpio_axil_resp_tAXI-Lite CSR response.