Hsb Ip Def
NVIDIAOfficialCreated by Holoscan TeamDistributed by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The hsb-ip-def skill provides a structured approach to managing SystemVerilog configuration macros for the Holoscan Sensor Bridge (HSB) IP. It enables users to generate, validate, explain, and compare HOLOLINK_def.svh files, ensuring that macro definitions align with board-level requirements and IP constraints. The skill leverages bundled Python scripts to perform these operations, providing a reliable interface for configuring HSB IP revisions 16'h2603 and 16'h2604.
What it does
- Generates HOLOLINK_def.svh files based on user-confirmed board requirements.
- Validates existing configuration files using a dedicated linting script.
- Explains macro semantics, legal values, and their impact on top-level ports.
- Compares two configuration files to identify semantic differences.
- Provides warnings for potential configuration footguns, such as HD-W3xx issues.
- Integrates with other HSB skills for top-level wrapper creation and packetizer derivation.
When to use it
- When you need to create a new HOLOLINK_def.svh file for a custom HSB board design.
- When you need to verify that an existing configuration file is valid and follows IP constraints.
- When you need to understand the effect of specific macros on the HSB IP dataplane or clocking.
- When you need to diff two configurations to understand changes between board revisions.
Advantages
- Ensures configuration consistency through automated validation.
- Prevents common configuration errors with built-in rule checking.
- Provides clear, grounded explanations for complex macro interactions.
- Maintains compatibility with specific HSB IP revisions.
Usage examples
- “Generate a new HOLOLINK_def.svh for a high-bandwidth single-sensor board.”
- The agent will initiate the generation workflow, asking for board requirements one by one, building a profile, and running the generation script upon confirmation.
- “Validate my current HOLOLINK_def.svh and check for any warnings.”
- The agent will run the validation script, report any errors or warnings, and specifically highlight any HD-W3xx footgun warnings.
- “Is it legal to set HOST_WIDTH=512 and PTP_CLK_FREQ=90_000_000?”
- The agent will use the validation script or macro references to determine if the combination is legal and explain the reasoning.
- “Compare my local def file with the baseline configuration.”
- The agent will run the comparison script and provide a summary of the semantic differences between the two files.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/hsb-ip-def/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip hsb-ip-def.zip -d .agents/skills
Documentation by Holoscan Team
HSB IP Def Skill
Purpose
Use this skill through four workflows:
Generate a
HOLOLINK_def.svhfrom confirmed board requirements.Validate an existing def file with the bundled validator.
Explain / Reason about HSB IP macros, legality, and macro-driven ports.
Compare two def files semantically.
Scope
This skill owns the contents of HOLOLINK_def.svh: \definedirectives,localparamarrays, theHOLOLINK_pkgwrapper, and boot-timeinit_reg[]sequence. The surrounding top-level wrapper is owned byhsb-ip-create-top; packetizer-only profile derivation can be delegated to hsb-ip-packetizer`.
The file must use the standard guard plus package HOLOLINK_pkg wrapper. Load references/macro-reference.md for the full wrapper requirement and per-macro semantics.
Prerequisites
Python 3.9+ is required for the bundled scripts; PyYAML is required when reading YAML profiles.
The user must confirm file writes and shell commands unless they already asked for that exact operation.
A concrete def file path, pasted content, or confirmed generation profile is required before script-backed validation or generation.
Live HSB IP source is optional but preferred when validating against a specific checked-out IP revision.
Instructions
Run bundled script preflight from
references/script-usage.mdbefore Generate, Validate, Compare, or script-backed legality checks.Never silently default a macro during Generate. Show the proposed value or inferred requirement and get user confirmation.
Ask one requirements question per turn during chat-driven Generate.
Use sensor-agnostic language unless the user says the design is camera-specific.
Avoid unsupported "typical", "common", "most designs", or corpus-frequency claims. Anchor choices to IP behavior, documented constraints, or user requirements.
Always surface HD-W3xx footgun warnings, even when the user asks only about errors.
Do not generate
FPGA_top.sv; offer handoff tohsb-ip-create-topafter a generated def file is validated.Treat unfamiliar macros as project-specific unless they are documented in this skill's references or live HSB IP source.
Security Considerations
This skill can read and write local files and run shell commands through its bundled scripts. Before running a command or writing a file, state the command or path and get user confirmation unless the user already explicitly requested that exact operation. For pasted HOLOLINK_def.svh content, write only to a safely generated file in an isolated temporary directory and remove it after validation unless the user asks to keep it.
Version, Compatibility, And Live Source
This skill targets HSB IP rev 16'h2604 and is backward-compatible with 16'h2603. Live HSB IP source supersedes bundled references.
When source-sensitive behavior matters:
Locate
<hsb-ip-root>/top/HOLOLINK_top.sv. Known roots includehw/nvcpu_dgx_fpga/vrtl/hololink/and public-releasefpga/nv_hsb_ip/.Read
HOLOLINK_REVandHOLOLINK_BACKWARD_COMPAT_REV.Trust live source for consumed macros, port gates, and RTL behavior when it differs from bundled references.
Pass
--ip-source <root>toscripts/validate_def.pywhen validating against a known source root.
Public-doc baseline:
https://github.com/nvidia-holoscan/holoscan-sensor-bridge/blob/release-2.6.0-EA/docs/user_guide/ip_integration.mdhttps://github.com/nvidia-holoscan/holoscan-sensor-bridge/blob/release-2.6.0-EA/docs/user_guide/port_description.md
Workflow Decision
Generate when the user asks to create, scaffold, draft, design, or produce a
HOLOLINK_def.svh.Validate when the user asks to lint, check, validate, or review a
HOLOLINK_def.svh.Explain / Reason when the user asks what a macro does, whether a combination is legal, why validation fails, or how a macro affects
HOLOLINK_top.Compare when the user asks to diff two def files or understand what changed between configurations.
Generate
Load references/generate-workflow.md and references/script-usage.md.
Follow the detailed Generate workflow in the reference: run preflight, classify supplied requirements, ask one requirements question per turn, build a flat YAML profile, run scripts/generate_def.py, show provenance for generated fields, and offer handoff to hsb-ip-create-top.
When packetizer fields are needed, invoke hsb-ip-packetizer with the known RX count, RX widths, and the user's data-manipulation description. Consume only that skill's packetizer_profile_overlay YAML keys, merge them into the in-progress profile, and continue full-file generation and validation here.
Validate
Load references/script-usage.md. Load references/validation-rules.md only when explaining specific rule IDs or validation behavior.
Steps:
Run bundled script preflight once per session.
Locate the file. If the user pastes content, tell them the generated temporary path before writing, ask for confirmation, use an isolated safe temp path, and clean it up after validation unless they ask to keep it. Otherwise use the provided path.
Run
<PY> scripts/validate_def.py <path> --jsonand do not reimplement validation in context.Group findings by severity: errors, warnings, then info. For each error, cite rule ID, line number, and macro when available.
Always surface footgun warnings, especially HD-W3xx silent-fallback warnings.
If clean, confirm the inferred archetype and IP version, then suggest the likely next check or handoff.
Explain / Reason
Load only the reference needed for the question:
| Question type | Reference |
|---|---|
| Macro semantics or legal values | references/macro-reference.md |
| Validation rule behavior | references/validation-rules.md |
| Macro-driven port effects | references/top-port-map.md |
init_reg[] and N_INIT_REG | references/init-reg-cookbook.md |
| Advanced macros | references/advanced-macros.md |
| Example legal configurations | references/archetypes.md |
For grounded legality questions, run preflight and prefer validating a concrete file or minimal synthetic file with scripts/validate_def.py over hand reasoning. Cite RTL line ranges from references when explaining why a rule exists.
Compare
Load references/script-usage.md, run preflight, then use <PY> scripts/compare_defs.py <a.svh> <b.svh> [--json|--text]. Summarize semantic differences, not whitespace or comment-only changes.
Limitations
Do not generate
FPGA_top.sv; usehsb-ip-create-topafter the defs file validates.Do not derive packetizer-only field sets here when the packetizer behavior is underspecified; delegate that slice to
hsb-ip-packetizer.Do not treat bundled archetypes or corpus metadata as norms. They are examples and maintenance metadata, not defaults.
Do not silently accept unknown macros as validated HSB IP behavior unless live source or references document them.
Troubleshooting
Script preflight fails: report the missing Python or PyYAML requirement and stop before generation or validation.
Validation reports errors: group by severity, cite rule ID and line, and fix the defs file before offering top-level handoff.
Validation reports HD-W3xx warnings: surface them even when there are no errors because they describe silent RTL fallback risks.
Unknown macro appears: treat it as project-specific unless live HSB IP source or bundled references document it.
Available Scripts
Use <PY> selected during preflight from references/script-usage.md for every command.
| Script | Purpose | Arguments |
|---|---|---|
scripts/generate_def.py | Generate HOLOLINK_def.svh from an archetype and/or YAML/JSON profile; validates before writing | --profile <path>, --archetype <slug>, -o <output>, optional --allow-random-uuid compatibility flag |
scripts/validate_def.py | Validate a HOLOLINK_def.svh and emit JSON or text findings | <path/to/HOLOLINK_def.svh>, optional --json or --text, optional --ip-source <root> |
scripts/compare_defs.py | Compare two def files semantically, ignoring whitespace/comment-only changes | <a.svh> <b.svh>, optional --json or --text |
scripts/build_corpus_metadata.py | Maintenance helper to rebuild anonymized corpus metadata; do not run during normal user workflows | <path1> [<path2> ...] |
Bundled Resources
| Resource | Use |
|---|---|
references/generate-workflow.md | Detailed Generate workflow, requirement order, question style, and per-topic prompt guidance |
references/script-usage.md | Preflight, command forms, and run_script() examples for bundled scripts |
references/macro-reference.md | Wrapper requirement, macro semantics, legal constraints, and RTL citations |
references/validation-rules.md | Rule catalog for validator findings |
references/archetypes.md | Illustrative legal configurations; never treat as templates or frequency guidance |
references/init-reg-cookbook.md | Boot-time APB write sequence patterns and address conventions |
references/top-port-map.md | Macro-to-HOLOLINK_top port effects |
references/advanced-macros.md | SYNC_CLK_HIF_APB, SYNC_CLK_HIF_PTP, PERI_RAM_DEPTH, and DISABLE_COE |
assets/metadata/corpus.json, assets/metadata/corpus-stats.json | Maintenance metadata only; do not cite corpus counts as user guidance |
scripts/generate_def.py | Generate a def file from a profile |
scripts/validate_def.py | Validate a def file and emit JSON/text findings |
scripts/compare_defs.py | Compare two def files semantically |
Examples
Use hsb-ip-def to generate a HOLOLINK_def.svh for a new HSB board.Treat as Generate, run script preflight, classify supplied requirements, ask one requirement question per turn, and runscripts/generate_def.pyonly after the profile is confirmed.Use hsb-ip-def to validate my existing HOLOLINK_def.svh and tell me whether any warnings are important.Treat as Validate, ask for or locate the file, runscripts/validate_def.py <path> --json, group findings by errors, warnings, and info, and always surface HD-W3xx footgun warnings.Use hsb-ip-def to explain whether HOST_WIDTH=512 and PTP_CLK_FREQ=90_000_000 is legal.Treat as Explain / Reason, prefer a concrete validator-backed check over hand reasoning, and load only the macro or validation reference needed to explain the result.
Files
- ATTRIBUTION.mdAdded by AutoGineer895 B
- BENCHMARK.md3.4 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- README.md5.0 KiB
- SKILL.md11.3 KiB
- assets/metadata/corpus-stats.json5.3 KiB
- assets/metadata/corpus.json16.9 KiB
- evals/evals.json4.4 KiB
- references/advanced-macros.md4.7 KiB
- references/archetypes.md22.3 KiB
- references/generate-workflow.md25.1 KiB
- references/init-reg-cookbook.md5.7 KiB
- references/macro-reference.md29.8 KiB
- references/script-usage.md3.1 KiB
- references/top-port-map.md10.2 KiB
- references/validation-rules.md14.8 KiB
- scripts/build_corpus_metadata.pyScript7.5 KiB
- scripts/compare_defs.pyScript6.0 KiB
- scripts/generate_def.pyScript8.6 KiB
- scripts/lib/__init__.pyScript0 B
- scripts/lib/emitter.pyScript25.7 KiB
- scripts/lib/parser.pyScript22.3 KiB
- scripts/lib/rules.pyScript29.1 KiB
- scripts/validate_def.pyScript5.6 KiB
- skill-card.md4.5 KiB
- skill.oms.sig8.9 KiB
references/macro-reference.md
HOLOLINK_def.svh Macro Reference
Known-revision reference. Where this file conflicts with the public documentation, follow this file. Conflicts are noted inline.
If live HSB IP source is available, use it as the authority for the checked-out design. This file documents known rev 16'h2604 and backward-compatible rev 16'h2603; live HOLOLINK_top.sv wins for newer or locally modified IP.
Public-doc baseline
The closest public reference is the HSB user guide:
Macros:
docs/user_guide/ip_integration.mdPorts:
docs/user_guide/port_description.md
Repo: https://github.com/nvidia-holoscan/holoscan-sensor-bridge/tree/release-2.6.0-EA
The HSB documentation includes example macro values. They are not closed allow-sets. The skill enforces hard RTL/legal constraints such as byte-alignment, derived-width equality, and documented frequency bands; it does not warn merely because a legal value differs from bundled examples.
IP-root layout
The HSB IP RTL ships under at least two known directory roots:
| Layout | Root path |
|---|---|
| Public release | fpga/nv_hsb_ip/ |
| NVIDIA-internal workspace | hw/nvcpu_dgx_fpga/vrtl/hololink/ |
Both roots contain identical subdirectories (top/, lib_axis/, packetizer/, sys_init/, ptp/, bootp/, etc.). All RTL citations in this file use the form <hsb-ip-root>/<subdir>/<file>.sv:<line> — substitute your root.
IP version compatibility
| Constant | Value | Site |
|---|---|---|
HOLOLINK_REV (current) | 16'h2604 | top/HOLOLINK_top.sv:151 |
HOLOLINK_BACKWARD_COMPAT_REV | 16'h2603 | top/HOLOLINK_top.sv:152 |
This file is written against 16'h2604. It is backward-compatible with 16'h2603 (the public release rev).
For an unknown or newer live revision, read top/HOLOLINK_top.sv before making source-sensitive claims. If the live source changes consumed macros, conditional port gates, or macro-to-RTL behavior, trust the live source and flag that this reference may need an update.
File wrapper requirement
HOLOLINK_def.svh must be wrapped in a guard + package:
`ifndef HOLOLINK_def
`define HOLOLINK_def
package HOLOLINK_pkg;
// ... `define directives and localparam arrays ...
endpackage: HOLOLINK_pkg
`endifThe wrapper is required: top/HOLOLINK_top.sv:17 does `include "HOLOLINK_def.svh" and import HOLOLINK_pkg::*;. A file missing the wrapper will fail elaboration.
Macro index
| # | Macro | Kind | Section |
|---|---|---|---|
| 1 | HIF_CLK_FREQ | \define` | Clocking |
| 2 | APB_CLK_FREQ | \define` | Clocking |
| 3 | PTP_CLK_FREQ | \define` | Clocking |
| 4 | UUID | \define` | Board identity |
| 5 | ENUM_EEPROM | \define` (toggle) | Enumeration |
| 6 | EEPROM_REG_ADDR_BITS | \define` | Enumeration |
| 7 | DATAPATH_WIDTH | \define` | Sensor datapath |
| 8 | DATAKEEP_WIDTH | \define` (derived) | Sensor datapath |
| 9 | DATAUSER_WIDTH | \define` | Sensor datapath |
| 10 | SENSOR_RX_IF_INST | \define` (gates ports) | Sensor RX |
| 11 | SIF_RX_WIDTH[] | localparam array | Sensor RX |
| 12 | SIF_RX_DATA_GEN | \define` (toggle) | Sensor RX |
| 13 | SIF_RX_PACKETIZER_EN[] | localparam array | Sensor RX |
| 14 | SIF_RX_VP_COUNT[] | localparam array (do not change) | Sensor RX |
| 15 | SIF_RX_SORT_RESOLUTION[] | localparam array (do not change) | Sensor RX |
| 16 | SIF_RX_VP_SIZE[] | localparam array (do not change) | Sensor RX |
| 17 | SIF_RX_NUM_CYCLES[] | localparam array (do not change) | Sensor RX |
| 18 | SENSOR_TX_IF_INST | \define` (gates ports) | Sensor TX |
| 19 | SIF_TX_WIDTH[] | localparam array | Sensor TX |
| 20 | SIF_TX_BUF_SIZE[] | localparam array | Sensor TX |
| 21 | HOST_WIDTH | \define` | Host |
| 22 | HOSTKEEP_WIDTH | \define` (derived) | Host |
| 23 | HOSTUSER_WIDTH | \define` | Host |
| 24 | HOST_IF_INST | \define` | Host |
| 25 | HOST_MTU | \define` | Host |
| 26 | SPI_INST | \define` (gates ports) | Peripherals |
| 27 | I2C_INST | \define` (gates ports) | Peripherals |
| 28 | UART_INST | \define` (gates ports) | Peripherals |
| 29 | GPIO_INST | \define` | Peripherals |
| 30 | GPIO_RESET_VALUE | localparam | Peripherals |
| 31 | EXT_PTP | \define` (gates ports) | PTP |
| 32 | SYNC_CLK_HIF_APB | \define` (toggle) | Clock sync (not in public docs) |
| 33 | SYNC_CLK_HIF_PTP | \define` (toggle) | Clock sync (not in public docs) |
| 34 | REG_INST | \define` | User registers |
| 35 | N_INIT_REG | \define` | System init |
| 36 | init_reg[] | localparam array | System init |
| 37 | PERI_RAM_DEPTH | \define` (override) | Peripherals (not in public docs) |
| 38 | DISABLE_COE | \define` (toggle) | Dataplane (not in public docs) |
| — | BUILD_REV | Module parameter (not a \define`) | Versioning |
Clocking
HIF_CLK_FREQ
Host Interface clock frequency, in Hz.
| Kind | \define` (integer) |
| Documented examples | 156250000 (with 64-bit datapath), 201416016 (with 512-bit datapath) |
| Hard rules | > 0 |
| Soft rules | Power-of-2 not required; many real configs use non-power-of-2 frequencies derived from transceiver PLLs |
| RTL sites | top/HOLOLINK_top.sv:601 (passed to ptp_top); ptp/ptp_timer.sv:19,52,55,106 (used in nanosecond increment + CDC depth calc) |
| Derives | default_hif_inc = 10**9 * (2**W_FRAC_NS) / HIF_CLK_FREQ (ptp/ptp_timer.sv:55); CDC buffer depth via PTP_IS_LOWER_FREQ = PTP_CLK_FREQ < HIF_CLK_FREQ (ptp/ptp_timer.sv:106) |
| Interacts with | PTP_CLK_FREQ (CDC ratio decides asymmetric latency at ptp/ptp_timer.sv:106-119) |
APB_CLK_FREQ
APB Interface clock frequency, in Hz. Used to compute I²C clock divider when ENUM_EEPROM is defined.
| Kind | \define` (integer) |
| Documented examples | 19531250 (with 64-bit datapath), 100000000 (with 512-bit datapath) |
| Hard rules | > 0 |
| RTL sites | top/HOLOLINK_top.sv:732 (passed to EEPROM info module when ENUM_EEPROM defined); ptp/ptp_top.sv:927 (CDC) |
| Interacts with | ENUM_EEPROM (when defined, APB_CLK_FREQ sets the I²C baud divider) |
PTP_CLK_FREQ
PTP Interface clock frequency, in Hz.
| Kind | \define` (integer) |
| HSB-documented range | "95 MHz to 105 MHz" |
| Documented examples | 100446545, 100000000, 100707500, 78125000 (varies by board) |
| Hard rules | > 0 |
| Soft rules | Should be in the 95–105 MHz band per HSB documentation; out-of-band warns |
| RTL sites | top/HOLOLINK_top.sv:602,912-913,926-927; ptp/ptp_timer.sv:20,47,50,106 |
| Derives | default_inc = 10**9 * (2**W_FRAC_NS) / PTP_CLK_FREQ (ptp/ptp_timer.sv:50); PTP_IS_LOWER_FREQ flag controls CDC latency compensation |
| Interacts with | HIF_CLK_FREQ (CDC ratio); EXT_PTP (when EXT_PTP is defined the user supplies PTP timestamps externally and PTP_CLK_FREQ only affects internal counter scaling) |
Board identity
UUID
Universally unique identifier used in BOOTP enumeration to identify the board for bitfile flashing.
| Kind | \define` literal |
| Width | 128 bits |
| Format | 128'h<32 hex chars, optionally with _ separators> |
| Hard rules | Required; must be exactly 128 bits; must be a literal (not a derived expression) |
| Soft rules | Should be unique per board. The generator inserts a random UUID by default; pin a specific value by adding uuid: to your profile. |
| RTL sites | top/HOLOLINK_top.sv:416 (passed to rx_ls_parser); bootp/bootp.sv:23,235-239 (byte-swapped for network transmission) |
Enumeration
ENUM_EEPROM
Toggle. When defined, the IP reads MAC address and serial number from an external EEPROM over I²C bus 0 (7-bit address 0x50). When undefined, the user must drive i_mac_addr[], i_board_sn, and i_enum_vld ports.
| Kind | \define` toggle (defined / undefined) |
| RTL sites | top/HOLOLINK_top.sv:45 (gates the soft-enumeration input ports — \ifndef ENUM_EEPROM); top/HOLOLINK_top.sv:729(instantiateseeprom_info` when defined) |
| Effect when defined | EEPROM_REG_ADDR_BITS becomes meaningful; soft-enumeration ports are absent |
| Effect when undefined | Top module exposes i_mac_addr[HOST_IF_INST-1:0][47:0], i_board_sn[55:0], i_enum_vld for the user to drive |
EEPROM_REG_ADDR_BITS
EEPROM register address width.
| Kind | \define` (integer) |
| Allowed values (HSB documentation) | 8 or 16 |
| Hard rules | Must be 8 or 16; only valid when ENUM_EEPROM is defined |
| Footgun | Defining EEPROM_REG_ADDR_BITS without ENUM_EEPROM is silently ignored — the macro is dead unless ENUM_EEPROM is also defined. The validator warns. |
| RTL sites | top/HOLOLINK_top.sv:733 (passed as REG_ADDR_BITS parameter to eeprom_info) |
Sensor datapath
DATAPATH_WIDTH
Width of the Sensor AXI-Stream tdata bus, in bits. The system-wide maximum sensor datapath width.
| Kind | \define` (integer) |
| Documented examples | 8, 16, 32, 64, 128, 256, 512, 1024 |
| Hard rules | > 0; byte-aligned (divisible by 8) |
| Soft rules | Power-of-2 (AXI bus convention; warned if violated); > 1024 warns about logic and routing resource use |
| RTL sites | top/HOLOLINK_top.sv:61-76,169,1082,1168,1300-1302; lib_axis/axis_pkg.sv:42 (sensor byte-swap is fully parameterized over DATAPATH_WIDTH) |
| Derives | DATAKEEP_WIDTH = DATAPATH_WIDTH/8 (mandatory equality) |
| Interacts with | SIF_RX_WIDTH[i] ≤ DATAPATH_WIDTH and SIF_TX_WIDTH[i] ≤ DATAPATH_WIDTH (per-port subsets) |
DATAKEEP_WIDTH
Width of the Sensor AXI-Stream tkeep bus, in bits.
| Kind | \define` (derived) |
| Hard rule | Must equal DATAPATH_WIDTH/8 |
| RTL sites | top/HOLOLINK_top.sv:62,75,1302; lib_axis/axis_pkg.sv:51,59 |
DATAUSER_WIDTH
Width of the Sensor AXI-Stream tuser sideband signal, in bits. The HSB dataplane.md doc describes the per-bit semantics only for MIPI CSI-2 camera datapaths feeding an internal ISP:
i_sif_axis_tuser[0]— asserted during cycles containing embedded data (MIPI Data Type0x12).i_sif_axis_tuser[1]— asserted on the final clock cycle of a long packet (Line End signal).
The doc explicitly notes these signals are "used only for high-bandwidth camera with need for internal Image Signal Processing (ISP). For further details, please contact the NVIDIA Holoscan team." It does not define tuser semantics for non-MIPI sensor sources, and does not state a "default" or "typical" choice.
| Kind | \define` (integer) |
| HSB-documented range | 1 or 2 |
| Hard rules | > 0; ≤ 2 |
When DATAUSER_WIDTH = 1 | Only tuser[0] is present. tuser[1] (Line End marker) is not available. For a MIPI CSI-2 path that doesn't need the Line End marker, this carries the embedded-data marker. For non-MIPI sensors, the doc doesn't define what tuser[0] carries — interpretation is between the user's sensor and downstream logic. |
When DATAUSER_WIDTH = 2 | Both tuser[0] (embedded-data) and tuser[1] (Line End) markers present. Required when a MIPI CSI-2 path with internal ISP uses both markers. |
| Picking a value | Determined by your design: do you need the Line End marker (or both MIPI markers)? If yes → 2. If no, or if non-MIPI → 1. The doc does not declare one of these "standard." |
| RTL sites | top/HOLOLINK_top.sv:63,76,1375 |
| Doc reference | HSB user guide — docs/user_guide/dataplane.md |
Sensor RX
SENSOR_RX_IF_INST
Number of Sensor RX (sensor → host) interfaces. Defining or undefining this macro gates an entire group of ports on the top module.
| Kind | \define` (integer, OR undefined) |
| HSB-documented range | 1–32, OR undefined |
| Hard rules | When defined, 1 ≤ value ≤ 32 |
| Footgun | When undefined, RTL silently substitutes a 1-bit dummy interface — there is no compile error. The validator warns when an arrays exists (SIF_RX_WIDTH etc.) but SENSOR_RX_IF_INST is undefined. |
| RTL sites | top/HOLOLINK_top.sv:54-65 (gates input ports i_sif_rx_clk, i_sif_axis_*, etc.); top/HOLOLINK_top.sv:169-176,181-183 (defines NUM_SENSOR_RX localparam: macro value when defined, 1 otherwise) |
| Generates | All SIF_RX_*[] arrays are sized [SENSOR_RX_IF_INST-1:0] |
SIF_RX_WIDTH[]
Per-RX-interface AXI-Stream tdata width, in bits.
| Kind | localparam integer array, sized [SENSOR_RX_IF_INST-1:0] |
| Documented examples | 8, 16, 32, 64, 128, 256, 512, 1024 |
| Hard rules | > 0; byte-aligned; ≤ DATAPATH_WIDTH for every element |
| Soft rules | Power-of-2 (warned if violated); > 1024 warns about logic and routing resources |
| Default expression | '{default:DATAPATH_WIDTH}` — every interface uses the full datapath width unless overridden |
| RTL sites | top/HOLOLINK_top.sv:1087,1099,1102,1283,1300-1302,1373,1396-1397 |
| Padding rule | When SIF_RX_WIDTH[i] != DATAPATH_WIDTH, the unused MSBs of tdata and the unused upper tkeep bits are tied to 0; LSBs of tkeep must still be set to all 1's per the HSB ip_integration.md |
SIF_RX_DATA_GEN
Compile-time toggle for the per-port test-pattern injection capability. When defined, the IP instantiates a data_gen module per Sensor RX interface, each with its own APB register interface. The data_gen has an internal data_gen_ena register (defaults to 0 at reset) that the host software writes via APB at runtime to enable test injection per port. When enabled on a port, that port's input mux selects the generator output instead of i_sif_axis_*, and the IP asserts back-pressure to the external sensor (o_sif_axis_tready[i] = 0). When the register is 0 (the reset state), external sensor data flows. When the macro is undefined, the data_gen modules are not instantiated, the mux select is tied to 0, and only external sensor data ever flows.
| Kind | \define` toggle |
| Behavior when defined | data_gen modules instantiated per RX port. Real sensor data flows by default (data_gen_ena = 0 at reset). Host enables injection per port at runtime via APB writes. |
| Behavior when undefined | No data_gen modules instantiated (saves logic + embedded RAM). Real sensor data always flows. No runtime test-injection capability. |
| RTL sites — instantiation | top/HOLOLINK_top.sv:1276 (\ifdef SIF_RX_DATA_GEN); top/HOLOLINK_top.sv:1280-1306(per-portdata_gengenerate block);data_gen/data_gen.sv:272 (o_data_gen_axis_mux = data_gen_ena` — the runtime mux select) |
| RTL sites — fallback | top/HOLOLINK_top.sv:1308-1326 (\else` branch ties data_gen outputs and mux to 0) |
| RTL sites — mux | top/HOLOLINK_top.sv:1350-1354 (per-port mux: sen_rx_mux_axis_* = data_gen_axis_mux ? data_gen_output : i_sif_axis_*); top/HOLOLINK_top.sv:1411 (back-pressure: o_sif_axis_tready[i] = data_gen_axis_mux ? 0 : sif_axis_tready[i]) |
| When to use | Define for boards that benefit from in-system test/diagnostics or simulation-driven bringup. Some teams keep it on in production; others remove it to save logic and embedded RAM. Defining it does not disable real sensor data — it only adds the runtime-controllable injection capability. |
SIF_RX_PACKETIZER_EN[]
Per-RX-interface packetizer enable flag.
| Kind | localparam integer array, sized [SENSOR_RX_IF_INST-1:0] |
| Allowed values | 0 or 1 per element |
| Default expression | '{default:'1} (all enabled) |
Effect when 0 for interface i | The four "do not change" parameters (SIF_RX_VP_COUNT[i], SIF_RX_SORT_RESOLUTION[i], SIF_RX_VP_SIZE[i], SIF_RX_NUM_CYCLES[i]) become don't-cares. The packetizer is bypassed; top/HOLOLINK_top.sv:1357-1362 substitutes fallback constants (SORT_RESOLUTION=2, VP_COUNT=1, VP_SIZE=32, NUM_CYCLES=1). |
| RTL sites | top/HOLOLINK_top.sv:1243,1300,1342,1356-1362,1382,1414 |
SIF_RX_VP_COUNT[], SIF_RX_SORT_RESOLUTION[], SIF_RX_VP_SIZE[], SIF_RX_NUM_CYCLES[]
Packetizer internal parameters. Do not change per HSB documentation. Required when any element of SIF_RX_PACKETIZER_EN[] is 1; the corresponding element is a don't-care when its EN[i] is 0.
| Macro | Kind | Example values | Effect |
|---|---|---|---|
SIF_RX_VP_COUNT[] | localparam integer array | 1, 2, 4 | Number of virtual ports per RX interface |
SIF_RX_SORT_RESOLUTION[] | localparam integer array | 2, 16, 32, DATAPATH_WIDTH | Packetizer sort resolution |
SIF_RX_VP_SIZE[] | localparam integer array | 64, 128, 256, DATAPATH_WIDTH | Bytes per virtual port |
SIF_RX_NUM_CYCLES[] | localparam integer array | 1, 3 | Cycle count |
| RTL sites (all four) | top/HOLOLINK_top.sv:1356-1362 (consumed via ternary on SIF_RX_PACKETIZER_EN[i]) |
The validator does not enforce specific values for these; it only enforces presence (when packetizers are enabled) and array length consistency.
Sensor TX
SENSOR_TX_IF_INST
Number of Sensor TX (host → sensor) interfaces. Defining or undefining gates the TX port group.
| Kind | \define` (integer, OR undefined) |
| HSB-documented range | 1–32, OR undefined |
| Hard rules | When defined, 1 ≤ value ≤ 32 |
| RTL sites | top/HOLOLINK_top.sv:67-77 (gates output ports); top/HOLOLINK_top.sv:193-200,205-207 (defines NUM_SENSOR_TX localparam: macro value when defined, 0 otherwise) |
| Footgun | Same silent-fallback as SENSOR_RX_IF_INST |
SIF_TX_WIDTH[]
Per-TX-interface AXI-Stream tdata width.
| Kind | localparam integer array |
| Documented examples | 8, 64, 512 |
| Hard rules | > 0; byte-aligned; ≤ DATAPATH_WIDTH |
| Soft rules | Power-of-2; > 1024 warns about logic and routing resources |
| Default expression | '{default:DATAPATH_WIDTH}` |
| RTL sites | top/HOLOLINK_top.sv:1169,1578-1579,1586-1587,1608-1611,1735,1747-1748 |
SIF_TX_BUF_SIZE[]
Per-TX-interface FIFO depth, measured as a count of SIF_TX_WIDTH[i]-wide elements, not bytes. Backed by FPGA embedded RAM. The buffer primarily lets the IP absorb host-to-sensor data and apply backpressure toward the host when the sensor side cannot accept data immediately; larger values allow more TX-width elements to be stored at the cost of embedded RAM.
| Kind | localparam integer array |
| Documented examples | 1024, 2048, 4096 TX-width elements |
| Default value | 2048 TX-width elements |
| Hard rules | > 0 |
| Soft rules | Power-of-2; > 8192 warns about embedded RAM resource use |
| RTL sites | top/HOLOLINK_top.sv:1587 (passed as FIFO_DEPTH to axis_buffer_tx) |
Host
HOST_WIDTH
Width of the Host AXI-Stream tdata bus, in bits. This is one scalar width shared by every host interface selected by HOST_IF_INST; the IP does not support per-host HOST_WIDTH[] values. The value is determined by the host-side Ethernet datapath connected to HSB and the line-rate/clock pairing implemented by the user's MAC, transceiver, and FPGA clocking chain.
| Kind | \define` (integer) |
| Documented examples | 8, 16, 32, 64, 128, 256, 512 |
| Hard rules | > 0; byte-aligned |
| Soft rules | Power-of-2 (warned if violated); > 1024 warns about logic and routing resources |
| RTL sites | top/HOLOLINK_top.sv:90,97,349,409,603,1082,1168,1254,1367,1374,1700,1741; lib_axis/axis_pkg.sv:24,33,68 (host byte-swap and decode are fully parameterized over HOST_WIDTH; the helper functions impose no per-value restriction) |
| Derives | HOSTKEEP_WIDTH = HOST_WIDTH/8; HOST_BUF_DEPTH = HOST_MTU * 2 / (HOST_WIDTH / 8) (top/HOLOLINK_top.sv:1082) |
Documented Ethernet line-rate / HOST_WIDTH / HIF_CLK_FREQ pairings:
| Line rate | HOST_WIDTH | HIF_CLK_FREQ | Matching archetype |
|---|---|---|---|
| 1 GbE | 8 | 125_000_000 (125 MHz) | gigabit-baseline |
| 10 GbE | 64 | 156_250_000 (156.25 MHz) | mid-bandwidth-baseline, minimal-gateway |
| 25 GbE / 40 GbE | 128 / 256 | intermediate (~390 MHz / ~156 MHz) | — |
| 100 GbE (wide) | 512 | ~201_416_016 (~201 MHz) | high-bandwidth-single-sensor |
| 100 GbE+ (very high) | 512 | ~322_265_625 (~322 MHz) | very-high-speed |
Set HOST_WIDTH to the single AXI-Stream width shared by all HSB host interfaces. Set HIF_CLK_FREQ to the frequency of the clock actually driving that HSB host interface; it may be driven directly by the MAC or derived through a PLL/divider from another MAC/transceiver clock. Other byte-aligned widths are legal for the shared width; validation focuses on hard constraints and resource-risk thresholds.
HOSTKEEP_WIDTH
| Kind | \define` (derived) |
| Hard rule | Must equal HOST_WIDTH/8 |
| RTL sites | top/HOLOLINK_top.sv:91,98; lib_axis/axis_pkg.sv:33,36,68 |
HOSTUSER_WIDTH
Width of the Host AXI-Stream tuser signal.
| Kind | \define` (integer) |
| HSB-documented value | 1 (fixed) |
| Hard rules | Must be 1 |
| RTL sites | top/HOLOLINK_top.sv:92,99 |
HOST_IF_INST
Number of Host (Ethernet) interfaces.
| Kind | \define` (integer) |
| HSB-documented range | 1–32 |
| Hard rules | 1 ≤ value ≤ 32 |
| RTL sites | top/HOLOLINK_top.sv:34,40,46,88-100,237-238,261,344 (sizes per-host signal arrays) |
HOST_MTU
Maximum Ethernet packet payload, in bytes. Applies to both directions (ingress and egress).
| Kind | \define` (integer) |
| Documented examples | 1500 (standard), 4096 (jumbo) |
| Hard rules | > 0 |
| Soft rules | The IP buffer scales via HOST_BUF_DEPTH = HOST_MTU * 2 / (HOST_WIDTH/8); larger MTUs cost more embedded RAM |
| RTL sites — RX (ingress) | eth_pkt/eth_pkt.sv:240 (host RX pkt_check); ptp/ptp_ingress.sv:194; top/HOLOLINK_top.sv:1703 (assert_sif_input_axis), :1778 (assert_hif_input_axis) |
| RTL sites — TX (egress) | eth_pkt/eth_pkt.sv:275 (host TX pkt_check); top/HOLOLINK_top.sv:1383 (packetizer), :1588 (TX stream buffer), :1741 (assert_sif_output_axis), :1808 (assert_hif_output_axis) |
| RTL sites — sizing | top/HOLOLINK_top.sv:1082 (HOST_BUF_DEPTH = HOST_MTU * 2 / (HOST_WIDTH/8)); :351, 412, 1170, 1448 (parameter passdown) |
| Practical impact | Set HOST_MTU to at least the largest packet either side sends. The RX pkt_check drops incoming packets larger than this value. Setting it higher than necessary wastes FPGA embedded RAM (buffer scales linearly). |
Peripherals
SPI_INST
Number of SPI controller instances. Defining or undefining gates the SPI port group.
| Kind | \define` (integer, OR undefined) |
| HSB-documented range | 1–8, OR undefined |
| RTL sites | top/HOLOLINK_top.sv:104-110 (gates ports o_spi_csn[], o_spi_sck[], i_spi_sdio[][3:0], o_spi_sdio[][3:0], o_spi_oen[]); top/HOLOLINK_top.sv:938 (instantiates the SPI block when defined) |
| Footgun | When undefined, the SPI port group is removed entirely. Forgetting to undef when SPI is unused leaves dangling 1-bit dummy logic. |
I2C_INST
Number of I²C controller instances.
| Kind | \define` (integer, OR undefined) |
| HSB-documented range | 1–8, OR undefined |
| RTL sites | top/HOLOLINK_top.sv:112-117 (gates ports); top/HOLOLINK_top.sv:988 (instantiation) |
UART_INST
Number of UART instances.
| Kind | \define` (integer, OR undefined) |
| HSB-documented range | 1, OR undefined (only one UART is currently supported) |
| RTL sites | top/HOLOLINK_top.sv:119 (gates ports o_uart_tx, i_uart_rx, o_uart_busy, i_uart_cts, o_uart_rts); top/HOLOLINK_top.sv:1038-1040 (instantiation) |
GPIO_INST
Number of bidirectional GPIO bits.
| Kind | \define` (integer) |
| HSB-documented range | 1–255 |
| Hard rules | 1 ≤ value ≤ 255 |
| RTL sites | top/HOLOLINK_top.sv:128-130 (port widths i_gpio[GPIO_INST-1:0], o_gpio[GPIO_INST-1:0], o_gpio_dir[GPIO_INST-1:0]); top/HOLOLINK_top.sv:686-687 (passed as N_GPIO parameter) |
GPIO_RESET_VALUE
Reset value of GPIO output bits.
| Kind | localparam of width [GPIO_INST-1:0] |
| Default | 0 |
| Hard rules | Must be sized exactly [GPIO_INST-1:0] |
| RTL sites | top/HOLOLINK_top.sv:687 (passed as GPIO_RST_VAL) |
PTP
EXT_PTP
Toggle. When defined, the user provides PTP timestamps externally via i_ptp_sec[47:0] and i_ptp_nanosec[31:0]. When undefined, the IP generates timestamps internally and exposes o_ptp_sec[47:0], o_ptp_nanosec[31:0], and o_pps.
| Kind | \define` toggle |
| RTL sites | top/HOLOLINK_top.sv:141 (gates port direction — \ifndef EXT_PTPexposeso_ptp_*outputs;`elseexposesi_ptp_*inputs);top/HOLOLINK_top.sv:599` (gates internal PTP generator instantiation) |
| Effect when defined | Internal PTP generator is omitted; user must drive PTP timestamps |
| Effect when undefined | Internal PTP generator is instantiated; IP outputs PPS pulse and PTP timestamps |
Clock synchronization (not in HSB public docs)
SYNC_CLK_HIF_APB and SYNC_CLK_HIF_PTP are advanced CDC-tightening toggles. See advanced-macros.md for canonical behavior, safety caveats, and RTL citations.
User registers and system init
REG_INST
Number of user-accessible APB register interfaces exposed by the IP.
| Kind | \define` (integer) |
| HSB-documented range | 1–8 |
| Hard rules | 1 ≤ value ≤ 8 |
| RTL sites | top/HOLOLINK_top.sv:34,39-41,531 (sizes APB switch arrays o_apb_psel[REG_INST-1:0], i_apb_pready[REG_INST-1:0], i_apb_prdata[REG_INST-1:0], i_apb_pserr[REG_INST-1:0]) |
N_INIT_REG
Number of entries in the init_reg[] boot-time write sequence.
| Kind | \define` (integer) |
| Hard rules | > 0; must equal the actual init_reg[] array length |
| RTL sites | top/HOLOLINK_top.sv:479-481 (gates sys_init instantiation — \ifdef N_INIT_REG); sys_init/sys_init.sv:22 (parameter N_REG); sys_init/sys_init.sv:62-64` (per-entry write loop) |
| Footgun | Mismatch between N_INIT_REG and init_reg array length is an elaboration error in some tools and a silent truncation in others. Validator hard-errors. |
init_reg[]
The boot-time register write sequence. The IP loops over the entries on rising edge of i_init, issuing APB writes; asserts o_init_done when complete.
| Kind | localparam logic [63:0] array, sized [N_INIT_REG] |
| Per-entry encoding | [63:32] = 32-bit APB address; [31:0] = 32-bit data |
| Tuple syntax | {32'h<addr>, 32'h<data>} per entry |
| Hard rules | Array length = N_INIT_REG; each entry exactly 64 bits |
| RTL sites | top/HOLOLINK_top.sv:479-481 (passed to sys_init); sys_init/sys_init.sv:30,57-58,62-64 (per-entry address/data extraction and APB write) |
| Cookbook | See init-reg-cookbook.md for address-space conventions |
Other
Advanced peripheral and dataplane macros
PERI_RAM_DEPTH and DISABLE_COE are advanced macros. See advanced-macros.md for canonical behavior, safety guidance, and RTL citations.
Module parameter (not a \define`)
BUILD_REV
48-bit Verilog parameter on the HOLOLINK_top module identifying the FPGA build revision. Not a \definemacro; cannot be set inHOLOLINK_def.svh`. Pass it via parameter override at instantiation:
HOLOLINK_top #(
.BUILD_REV(48'h2604_DEAD_BEEF)
) u_hololink (
...
);| Kind | Module parameter (NOT a \define`) |
| Width | 48 bits |
| Default | 48'h0 |
| Field encoding | [15:0] = patch version (packed with HOLOLINK_REV[15:0] to form full HSB version word); [47:16] = build date/timestamp (YYMMDDHH-style by team convention) |
| RTL sites | top/HOLOLINK_top.sv:24 (parameter declaration); top/HOLOLINK_top.sv:699-700 (used in status register: i_hsb_ver = {BUILD_REV[15:0], HOLOLINK_REV[15:0]}, i_hsb_date = BUILD_REV[47:16]) |
| Footgun | Writing \define BUILD_REV ...inHOLOLINK_def.svh` is meaningless — the macro is never read. The validator warns. |
Cross-cutting rules summary
The following rules span multiple macros. Per-rule details and the canonical rule IDs (HD-Exxx, HD-Wxxx, HD-Ixxx) are in validation-rules.md.
Wrapper required. File must be wrapped in
\ifndef HOLOLINK_def/`define HOLOLINK_def/package HOLOLINK_pkg;...endpackage; `endif`.Byte-alignment of widths. All width macros must be divisible by 8.
Derived equalities.
DATAKEEP_WIDTH = DATAPATH_WIDTH/8;HOSTKEEP_WIDTH = HOST_WIDTH/8. Mismatch is a hard error.Per-port width caps.
SIF_RX_WIDTH[i] ≤ DATAPATH_WIDTH;SIF_TX_WIDTH[i] ≤ DATAPATH_WIDTH.init_reg[]cardinality.N_INIT_REGmust equal the literal array length ofinit_reg[].Conditional dependencies.
EEPROM_REG_ADDR_BITSis only meaningful whenENUM_EEPROMis defined;SIF_RX_*[]arrays are only meaningful whenSENSOR_RX_IF_INSTis defined;SIF_TX_*[]arrays are only meaningful whenSENSOR_TX_IF_INSTis defined; the four packetizer "do not change" arrays are don't-cares for any element whereSIF_RX_PACKETIZER_EN[i] = 0.PTP / HIF clock ratio.
PTP_CLK_FREQ < HIF_CLK_FREQproduces shorter CDC buffers (ptp/ptp_timer.sv:106-119);>=produces deeper CDC. Both work; the latter has more latency.Silent peripheral fallback. Forgetting to define
SENSOR_RX_IF_INST,SENSOR_TX_IF_INST,SPI_INST,I2C_INST, orUART_INSTdoes not produce a compile error — the RTL falls back to dummy 1-bit logic. Validator emits a warning when a corresponding array (e.g.SIF_RX_WIDTH[]) is present but the gate macro is undefined.BUILD_REVis not a\define`. Set it via Verilog parameter override at module instantiation.Out-of-scope macros. A small set of macros that the IP and some workspace projects use are out of scope for this skill. The validator silently accepts them — never errors, warns, or names them. Consult your project's design owner if you encounter unfamiliar macros.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
The author says: Targets HSB IP rev 16'h2604; backward-compatible with 16'h2603 (the public release rev). Prefer live HSB IP source when available; warn on unknown revisions. Requires Python 3.9+ with PyYAML for the generator.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Holoscan Team
- Publisher
- NVIDIA (Official)
- Distributed by
- NVIDIA
- Source
- NVIDIA/skills · skills/hsb-ip-def · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Holoscan Team or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download hsb-ip-def.zip