Core Requirements
This document tracks all functional and non-functional requirements for the Axion-HDL core tool.
Testing and verification are automated via make test, which maps tests back to these requirement IDs.
Requirement Categories
Prefix |
Category |
Definition |
|---|---|---|
AXION |
Core Protocol |
Core AXI4/AXI4-Lite register interaction and compliance. |
AXI-LITE |
Bus Protocol |
Specific AXI4-Lite handshake and signaling rules. |
PARSER |
VHDL Parsing |
Parsing of VHDL entities, signals, and |
XML-INPUT |
XML Parsing |
Parsing of XML register definition files. |
YAML-INPUT |
YAML Parsing |
Parsing of YAML register definition files. |
JSON-INPUT |
JSON Parsing |
Parsing of JSON register definition files. |
GEN |
Code Generation |
Generation of VHDL register wrappers, C headers, and data formats. |
ERR |
Error Handling |
Detection and reporting of invalid configurations or conflicts. |
CLI |
Interface |
Command-line interface arguments and behavior. |
CDC |
Clock Crossing |
Clock Domain Crossing synchronization logic. |
ADDR |
Addressing |
Automatic and manual register address assignment. |
STRESS |
Performance |
Handling of large modules, wide signals, and massive generation. |
SUB |
Subregisters |
Support for packed registers (multiple fields in one 32-bit word). |
DEF |
Default Values |
Support for reset values via |
VAL |
Validation |
Validation of inputs, error visibility, and diagnostics. |
EQUIV |
Format Equivalence |
Cross-format parsing and output equivalence. |
AXION-TYPES |
Typed AXI Ports |
Optional typed AXI4-Lite port generation using |
HIER |
Hierarchy |
Centralized base address assignment and multi-instance generation via |
1. Core Protocol (AXION)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
AXION-001 |
Read-Only Register Read Access |
A read transaction to a RO register address must return the signal value. |
VHDL Simulation ( |
AXION-002 |
Read-Only Register Write Protection |
A write transaction to a RO register address must be ignored (no signal change). |
VHDL Simulation ( |
AXION-003 |
Write-Only Register Write Access |
A write transaction to a WO register address must update the signal value. |
VHDL Simulation ( |
AXION-004 |
Write-Only Register Read Protection |
A read transaction to a WO register address must return 0x00000000 (or predictable value). |
VHDL Simulation ( |
AXION-005 |
Read-Write Register Full Access |
RW registers must be readable (return current value) and writable (update value). |
VHDL Simulation ( |
AXION-006 |
Register Address Mapping |
Registers must be mapped to their assigned offset addresses relative to base. |
VHDL Simulation ( |
AXION-007 |
Base Address Offset Calculation |
The module base address must be added to the register offset for final addressing. |
VHDL Simulation ( |
AXION-008 |
Module Address Space Isolation |
Transactions outside the module’s address range must be ignored or pass-through. |
VHDL Simulation ( |
AXION-009 |
AXI Write Response Error Signaling |
Write errors (e.g. invalid address) must assert BRESP with SLVERR. |
VHDL Simulation ( |
AXION-010 |
AXI Read Response Error Signaling |
Read errors must assert RRESP with SLVERR. |
VHDL Simulation ( |
AXION-011 |
AXI Write Transaction Handshake |
AWVALID/AWREADY, WVALID/WREADY, BVALID/BREADY handshakes must complete correctly. |
VHDL Simulation ( |
AXION-012 |
AXI Read Transaction Handshake |
ARVALID/ARREADY, RVALID/RREADY handshakes must complete correctly. |
VHDL Simulation ( |
AXION-013 |
Read Strobe Signal Generation |
Read strobe must assert for 1 cycle when a register is read. |
VHDL Simulation ( |
AXION-014 |
Write Strobe Signal Generation |
Write strobe must assert for 1 cycle when a register is written. |
VHDL Simulation ( |
AXION-015 |
Write Enable Signal Generation |
Write enable must assert on valid write data. |
VHDL Simulation ( |
AXION-016 |
Byte-Level Write Strobe Support |
Partial writes (via WSTRB) must update only appropriate bytes. |
VHDL Simulation ( |
AXION-017 |
Synchronous Reset |
Signal reset must occur synchronously on rising clock edge when reset_n is low. |
VHDL Simulation ( |
AXION-018 |
Clock Domain Crossing |
Signals crossing domains must pass through synchronizers (if enabled). |
VHDL Simulation ( |
AXION-019 |
Documentation Generation |
Helper documentation must be generated for register map. |
VHDL Simulation ( |
AXION-020 |
Unaligned Address Access |
Access to unaligned addresses (not 4-byte boundaries) should error or align. |
VHDL Simulation ( |
AXION-021 |
Out-of-Range Address Access |
Access to undefined offsets within base range returns SLVERR or DECERR. |
VHDL Simulation ( |
AXION-022 |
Concurrent Read and Write Operations |
Simultaneous Read and Write channels must operate independently. |
VHDL Simulation ( |
AXION-023 |
Default Register Values |
Registers must initialize to defined default values on reset. |
VHDL Simulation ( |
AXION-024 |
Register Bit Field Support |
Partial field updates must preserve other bits in the register. |
VHDL Simulation ( |
AXION-025 |
Wide Signal Support |
Signals >32 bits must span multiple consecutive registers. |
VHDL Simulation ( |
AXION-026 |
Multi-register access |
Reads/Writes to parts of wide signals must correctly update specific bits. |
VHDL Simulation ( |
AXION-027 |
Existing File Overwrite |
The tool must overwrite existing files in the output directory. |
Python Unit Test ( |
2. Bus Protocol (AXI-LITE)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
AXI-LITE-001 |
Reset State Requirements |
On reset, outgoing valid/ready signals must be deasserted. |
VHDL Simulation ( |
AXI-LITE-002 |
Single Transfer Per Transaction |
AXI-Lite does not support burst; burst length is always 1. |
VHDL Simulation ( |
AXI-LITE-003 |
VALID Before READY Dependency |
VALID signals must not depend on READY signals to be asserted. |
VHDL Simulation ( |
AXI-LITE-004 |
VALID Stability Rule |
Once VALID is asserted, it must remain high until READY is asserted. |
VHDL Simulation ( |
AXI-LITE-005 |
Write Address/Data Independence |
Core must accept Address and Data phases in any order. |
VHDL Simulation ( |
AXI-LITE-006 |
Back-to-Back Transaction Support |
Core handles transactions arriving immediately after previous one completes. |
VHDL Simulation ( |
AXI-LITE-007 |
Write Response Timing |
BRESP must not be asserted until both WVALID and AWVALID have arrived. |
VHDL Simulation ( |
AXI-LITE-008 |
Read Response Timing |
RVALID must not be asserted until ARVALID has arrived. |
VHDL Simulation ( |
AXI-LITE-014 |
Response Code Compliance |
OKAY for success, SLVERR/DECERR for errors. |
VHDL Simulation ( |
AXI-LITE-015 |
Clock Edge Alignment |
All outputs change on rising clock edge. |
VHDL Simulation ( |
AXI-LITE-016 |
Delayed READY Handling |
Core waits indefinitely for READY to be asserted by master/slave. |
VHDL Simulation ( |
AXI-LITE-017 |
Early READY Handling |
Core can assert READY before VALID is asserted. |
VHDL Simulation ( |
3. VHDL Parsing (PARSER)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
PARSER-001 |
Basic entity name extraction and whitespace handling |
Parser correctly identifies |
Python Unit Test ( |
PARSER-002 |
Parse std_logic and std_logic_vector types |
Correctly identifies signal width (1 for std_logic, N for vector). |
Python Unit Test ( |
PARSER-003 |
Parse Access Modes and strobe flags |
extracts RW/RO/WO and R_STROBE/W_STROBE from |
Python Unit Test ( |
PARSER-004 |
Parse Attributes |
Extracts |
Python Unit Test ( |
PARSER-005 |
Parse Hex/Decimal addresses |
Handles |
Python Unit Test ( |
PARSER-006 |
Parse Descriptions |
Extracts description string from comments, handling quotes. |
Python Unit Test ( |
PARSER-007 |
Exclude directories |
Skips directories specified in exclude list. |
Python Unit Test ( |
PARSER-008 |
Recursive scanning |
Recursively finds |
Python Unit Test ( |
PARSER-009 |
signal_type Format Compatibility |
The |
Python Unit Test ( |
4. Code Generation (GEN)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
GEN-001 |
VHDL Entity Naming and File Generation |
Output file is named |
Python Unit Test ( |
GEN-002 |
Architecture RTL and Signal Declarations |
Defines |
Python Unit Test ( |
GEN-003 |
AXI Channel Signal Generation |
Generates all standard AXI4-Lite interface ports. |
Python Unit Test ( |
GEN-004 |
Register Direction (IN/OUT) |
RO signals mapped to inputs, internal regs mapped to outputs. |
Python Unit Test ( |
GEN-005 |
Read Strobe Port Generation |
Generates output port |
Python Unit Test ( |
GEN-006 |
Write Strobe Port Generation |
Generates output port |
Python Unit Test ( |
GEN-007 |
State Machine Logic |
Includes AXI state machine (Idle, Read, Write, Resp). |
Python Unit Test ( |
GEN-008 |
Address Decoder Logic |
Generates |
Python Unit Test ( |
GEN-009 |
C Header Generation |
Generates valid |
Python Unit Test ( |
GEN-010 |
C Struct Definition |
Generates typedef struct representing register map. |
Python Unit Test ( |
GEN-011 |
XML Map Generation |
Generates |
Python Unit Test ( |
GEN-012 |
Markdown Documentation Generation |
Generates |
Python Unit Test ( |
GEN-013 |
YAML Map Generation |
Generates |
Python Unit Test ( |
GEN-014 |
JSON Map Generation |
Generates |
Python Unit Test ( |
GEN-015 |
HTML Documentation Generation |
Generates styled |
Python Unit Test ( |
GEN-016 |
PDF Documentation Generation |
Generates |
Python Unit Test ( |
GEN-017 |
Address Range Calculation |
Calculates and displays address range (start-end) for each module. |
Python Unit Test ( |
GEN-018 |
Base Address Generic |
VHDL entity includes |
Python Unit Test ( |
GEN-019 |
C Header Width Propagation (YAML) |
|
Python Unit Test ( |
GEN-020 |
C Header Width Propagation (VHDL Annotation) |
Same as GEN-019 but for |
Python Unit Test ( |
GEN-021 |
C Header Struct Layout for Wide Signals |
Registers wider than 32 bits must appear as multiple |
Python Unit Test ( |
GEN-022 |
Markdown Width Column Accuracy (YAML) |
The Width column in the generated |
Python Unit Test ( |
GEN-023 |
Markdown Width Column Accuracy (VHDL Annotation) |
Same as GEN-022 but for registers defined via VHDL |
Python Unit Test ( |
GEN-024 |
Packed Register MASK/SHIFT Macros (YAML) |
For packed (subregister) fields defined via YAML, the generated header must contain correct MASK and SHIFT |
Python Unit Test ( |
GEN-025 |
Packed Register MASK/SHIFT Macros (VHDL Annotation) |
Same as GEN-024 but for packed fields defined via VHDL |
Python Unit Test ( |
GEN-026 |
Packed Register Container is 32-bit |
A packed register container must appear as exactly one |
Python Unit Test ( |
GEN-027 |
VHDL Entity Port Width – YAML source |
For registers defined via YAML, the generated VHDL entity port must use the declared width (e.g. |
Python Unit Test ( |
GEN-028 |
VHDL Entity Port Width – VHDL-annotation source |
Same as GEN-027 but for registers defined via VHDL |
Python Unit Test ( |
5. Error Handling (ERR)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
ERR-001 |
Address Conflict Detection |
Raises |
Python Unit Test ( |
ERR-002 |
Non-VHDL/Binary File Handling |
Gracefully skips non-text files without crashing. |
Python Unit Test ( |
ERR-003 |
Skipped Files |
Skips files missing |
Python Unit Test ( |
ERR-004 |
Invalid Hex Address Reporting |
Reports error for malformed hex strings. |
Python Unit Test ( |
ERR-005 |
No Entity Declaration Handling |
Handles files missing entity declarations. |
Python Unit Test ( |
ERR-006 |
Duplicate Signal Detection |
Detects and reports duplicate signal names within a module. |
Python Unit Test ( |
ERR-007 |
Address Overlap Detection |
Warns when multiple modules have overlapping address ranges. |
Python Unit Test ( |
6. Command Line Interface (CLI)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
CLI-001 |
Help Options (-h, –help) |
Prints usage information and exits with 0. |
Python Unit Test ( |
CLI-002 |
Version Option (–version) |
Prints tool version and exits with 0. |
Python Unit Test ( |
CLI-003 |
Source Path Options (-s, –source) |
Accepts source files (.vhd, .vhdl, .xml, .yaml, .yml, .json) or directories with auto-detection by extension. |
Python Unit Test ( |
CLI-004 |
Multiple Source Paths |
Accepts multiple |
Python Unit Test ( |
CLI-005 |
Output Directory Options (-o, –output) |
Accepts output path argument. |
Python Unit Test ( |
CLI-006 |
Exclude Options (-e) |
Excludes matching patterns from processing. |
Python Unit Test ( |
CLI-009 |
Invalid Source Handling |
Returns error code if source path invalid. |
Python Unit Test ( |
CLI-010 |
Output Directory Creation |
Creates output directory if it doesn’t exist. |
Python Unit Test ( |
CLI-011 |
YAML Output Flag (–yaml) |
|
Python Unit Test ( |
CLI-012 |
JSON Output Flag (–json) |
|
Python Unit Test ( |
CLI-013 |
Configuration File Support (-c, –config) |
|
Python Unit Test ( |
CLI-014 |
Save Configuration to Persistent File |
The tool must provide a mechanism to save the current configuration to a persistent file (e.g., |
GUI Integration Test |
CLI-015 |
Auto-load Configuration |
The tool must automatically load configuration from |
Python Unit Test ( |
[!NOTE] The
-x/--xml-sourceoption is deprecated but still supported for backward compatibility. Use-s/--sourcefor all source types instead.
7. Clock Domain Crossing (CDC)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
CDC-001 |
Configurable Stage Count |
|
Python Unit Test ( |
CDC-002 |
Default Stage Count |
Defaults to 2 stages if not specified. |
Python Unit Test ( |
CDC-003 |
Sync Signal Declaration |
Internal sync signals declared in VHDL. |
Python Unit Test ( |
CDC-004 |
Module Clock Port Generation |
Generates |
Python Unit Test ( |
CDC-005 |
CDC Disable Behavior |
No sync logic generated if |
Python Unit Test ( |
CDC-006 |
Read-Only (RO) Path Synchronization |
RO inputs synced to AXI clock domain. |
Python Unit Test ( |
CDC-007 |
Read-Write (RW) Path Synchronization |
RW outputs synced to module clock domain. |
Python Unit Test ( |
8. Address Management (ADDR)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
ADDR-001 |
Auto-assign Sequential Addresses |
Assigns 0x00, 0x04, 0x08… automatically if unspecified. |
Python Unit Test ( |
ADDR-002 |
Manual Address Assignment |
|
Python Unit Test ( |
ADDR-003 |
Mixed Auto/Manual Assignment |
Auto assignment skips manually assigned addresses. |
Python Unit Test ( |
ADDR-004 |
Address Alignment |
All addresses must be 4-byte aligned. |
Python Unit Test ( |
ADDR-005 |
Conflict Detection |
Manual assignment collision raises error. |
Python Unit Test ( |
ADDR-006 |
Wide Signal Address Reservation |
Signals >32 bits reserve multiple 4-byte slots. |
Python Unit Test ( |
ADDR-007 |
Gap Preservation |
Gaps created by manual addressing are preserved. |
Python Unit Test ( |
ADDR-008 |
Base Address Offset Addition |
Manual addresses are relative to module base. |
Python Unit Test ( |
9. Stress Testing (STRESS)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
STRESS-001 |
Support High Register Count |
Can generate module with 100+ registers. |
Python Unit Test ( |
STRESS-002 |
Support Very Wide Signals |
Can handle 256-bit+ signals correctly. |
Python Unit Test ( |
STRESS-003 |
Repeated Analysis Stability |
Multiple runs produce consistent results. |
Python Unit Test ( |
STRESS-004 |
Repeated Generation Stability |
Generation is deterministic. |
Python Unit Test ( |
STRESS-005 |
Random Address Patterns |
Handles non-sequential manual addressing without error. |
Python Unit Test ( |
STRESS-006 |
Boundary Value Handling |
Robust to min/max address and width values. |
Python Unit Test ( |
10. Subregisters (SUB)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
SUB-001 |
Parse |
Parser identifies |
Python Unit Test ( |
SUB-002 |
Parse |
Parser identifies start bit for fields. |
Python Unit Test ( |
SUB-003 |
Group signals by |
Signals with same |
Python Unit Test ( |
SUB-004 |
Auto-calculate Register Width |
Register width determined by fields (always 32-bit container). |
Python Unit Test ( |
SUB-005 |
Detect Bit Overlaps |
Overlapping bit ranges raise |
Python Unit Test ( |
SUB-006 |
Auto-pack signals |
Fields without |
Python Unit Test ( |
SUB-007 |
Subregister Field Width in Header (VHDL) |
MASK and SHIFT macros generated for packed fields defined via VHDL |
Python Unit Test ( |
SUB-008 |
Subregister Field Width in Header (YAML) |
MASK and SHIFT macros generated for packed fields defined via YAML |
Python Unit Test ( |
SUB-011 |
Backward Compatibility |
Standard signals still processed correctly mixed with subregs. |
Python Unit Test ( |
11. Default Values (DEF)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
DEF-001 |
Parse |
|
Python Unit Test ( |
DEF-002 |
Parse |
|
Python Unit Test ( |
DEF-003 |
Validate Default fits Width |
Value larger than signal width raises error/warning. |
Python Unit Test ( |
DEF-004 |
Default to 0 if unspecified |
Signals default to 0x0 if no attribute. |
Python Unit Test ( |
DEF-009 |
Combine Subregister Defaults |
Packed register default is OR-combination of field defaults. |
Python Unit Test ( |
DEF-010 |
Backward Compatibility |
Existing modules unaffected. |
Python Unit Test ( |
12. Validation & Diagnostics (VAL)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
VAL-001 |
Required Field Validation |
Missing ‘module’ or other required fields in source files (YAML/JSON/XML) must be reported as Errors. |
Python Unit Test ( |
VAL-002 |
Format Error Visibility |
Parsing errors (malformed syntax) must be visible in Rule Check results. |
Python Unit Test ( |
VAL-003 |
Logical Integrity Check |
Validates integrity of loaded modules (e.g. non-empty register lists). |
Python Unit Test ( |
VAL-004 |
Description Presence |
Warns if registers are missing descriptions/documentation. |
Python Unit Test ( |
VAL-005 |
Duplicate Module Name |
Error if multiple modules share the same name. |
Python Unit Test ( |
VAL-006 |
Numeric Attribute Validation |
Invalid numeric values for |
Python Unit Test |
VAL-007 |
Generation Safety Lock |
The tool must block all code and documentation generation if any analyzed module contains parsing errors. |
Python Unit Test |
13. XML Input (XML-INPUT)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
XML-INPUT-001 |
XML File Detection |
Parser detects and loads |
Python Unit Test ( |
XML-INPUT-002 |
Module Name Extraction |
Correctly extracts |
Python Unit Test ( |
XML-INPUT-003 |
Base Address Parsing |
Parses |
Python Unit Test ( |
XML-INPUT-004 |
Register Definition Parsing |
Parses |
Python Unit Test ( |
XML-INPUT-005 |
Access Mode Support |
Handles RO, RW, WO access modes (case-insensitive). |
Python Unit Test ( |
XML-INPUT-006 |
Strobe Signal Support |
Parses |
Python Unit Test ( |
XML-INPUT-007 |
CDC Configuration Parsing |
Parses |
Python Unit Test ( |
XML-INPUT-008 |
Description Support |
Parses |
Python Unit Test ( |
XML-INPUT-009 |
Address Auto-Assignment |
Assigns sequential 4-byte addresses if |
Python Unit Test ( |
XML-INPUT-010 |
Error Handling |
Returns None for malformed XML or missing files, populates errors list. |
Python Unit Test ( |
XML-INPUT-011 |
CLI Integration |
Works with |
Python Unit Test ( |
XML-INPUT-012 |
Output Equivalence |
XML with same content as VHDL produces equivalent VHDL output. |
Python Unit Test ( |
XML-INPUT-013 |
Generator Compatibility |
Parses XML files generated by XMLGenerator (SPIRIT format). |
Python Unit Test ( |
XML-INPUT-014 |
Roundtrip Integrity |
Parse → Generate → Parse produces identical module dictionary. |
Python Unit Test ( |
XML-INPUT-015 |
Unified Attribute Naming |
Uses consistent attribute names between parser and generator. |
Python Unit Test ( |
14. YAML Input (YAML-INPUT)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
YAML-INPUT-001 |
YAML File Detection |
Parser detects and loads |
Python Unit Test ( |
YAML-INPUT-002 |
Module Name Extraction |
Correctly extracts |
Python Unit Test ( |
YAML-INPUT-003 |
Hex Base Address Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-004 |
Decimal Base Address Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-005 |
Register List Parsing |
Parses registers array with name, addr, access, width. |
Python Unit Test ( |
YAML-INPUT-006 |
Access Mode Support |
Handles RO, RW, WO (case-insensitive). |
Python Unit Test ( |
YAML-INPUT-007 |
Strobe Signal Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-008 |
CDC Configuration Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-009 |
Description Field |
Parses register description string. |
Python Unit Test ( |
YAML-INPUT-010 |
Auto Address Assignment |
Assigns sequential 4-byte addresses when |
Python Unit Test ( |
YAML-INPUT-011 |
Invalid YAML Handling |
Returns None for malformed YAML syntax. |
Python Unit Test ( |
YAML-INPUT-012 |
Missing Module Name |
Returns None when |
Python Unit Test ( |
YAML-INPUT-013 |
Packed Register Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-014 |
Default Value Parsing |
Parses |
Python Unit Test ( |
YAML-INPUT-015 |
Wide Signal Width Storage |
Stores |
Python Unit Test ( |
YAML-INPUT-016 |
signal_type Format Compatibility |
The |
Python Unit Test ( |
15. SystemVerilog Generation (SV-GEN)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
SV-GEN-001 |
Valid SystemVerilog Output |
Generates syntactically correct |
Syntax Test ( |
SV-GEN-002 |
Reset Value Support |
Registers initialize to |
SystemVerilog Test ( |
SV-GEN-003 |
Wide Register Access |
Registers >32 bits are mapped to multiple 32-bit addresses for full access. |
SystemVerilog Test ( |
SV-GEN-004 |
Native Struct Support |
Packed registers are generated as |
SystemVerilog Test ( |
SV-GEN-005 |
Functional Verification |
Generated modules support signal driving/sampling in Cocotb simulation. |
Cocotb Test ( |
SV-GEN-006 |
Lint Compliance |
Generated code passes |
Lint Test ( |
SV-GEN-007 |
Equivalence with VHDL |
SystemVerilog behavior (address map, reset, strobe) matches VHDL implementation. |
Equivalence Test ( |
SV-GEN-008 |
Bare Annotation Support |
A bare |
SystemVerilog Test ( |
SV-GEN-009 |
Address Conflict Recovery |
When two signals are manually assigned the same address, the conflicting register is reassigned to the next available address instead of being dropped. A warning is recorded in |
SystemVerilog Test ( |
16. Enumerated Values Requirements
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
ENUM-001 |
BitField Data Model |
|
Python Unit Test ( |
ENUM-002 |
VHDL Annotation Parsing |
|
Python Unit Test ( |
ENUM-003 |
SV Annotation Parsing |
|
Python Unit Test ( |
ENUM-004 |
YAML Field Enum |
YAML field |
Python Unit Test ( |
ENUM-005 |
JSON Field Enum |
JSON field |
Python Unit Test ( |
ENUM-006 |
TOML Field Enum |
TOML field |
Python Unit Test ( |
ENUM-007 |
XML Flat Enum Attribute |
Flat XML |
Python Unit Test ( |
ENUM-008 |
XML Nested Enum Elements |
|
Python Unit Test ( |
ENUM-009 |
XML SPIRIT Enum |
|
Python Unit Test ( |
ENUM-010 |
Markdown/HTML Enum Column |
Doc generator adds “Enum Values” column to packed register field table when any field has enum_values. |
Python Unit Test ( |
ENUM-011 |
C Header Enum Macros |
C header generator emits |
Python Unit Test ( |
ENUM-012 |
YAML Export Round-Trip |
YAML generator includes |
Python Unit Test ( |
ENUM-013 |
JSON Export Round-Trip |
JSON generator includes |
Python Unit Test ( |
ENUM-014 |
XML SPIRIT Export |
XML generator emits |
Python Unit Test ( |
ENUM-015 |
VHDL Comment Annotation |
VHDL generator appends |
Python Unit Test ( |
ENUM-016 |
SV Comment Annotation |
SV generator appends |
Python Unit Test ( |
ENUM-018 |
No-Enum Regression |
Modules without enum_values generate identical output to pre-feature baseline. |
Python Unit Test ( |
ENUM-019 |
Numeric Notations |
Enum values expressed as decimal, hex ( |
Python Unit Test ( |
ENUM-020 |
VHDL Pkg Constants |
|
Python Unit Test ( |
ENUM-021 |
SV Pkg Typedef |
|
Python Unit Test ( |
ENUM-022 |
Value Overflow Validation |
|
Python Unit Test ( |
ENUM-023 |
One-Bit Field |
1-bit fields with |
Python Unit Test ( |
ENUM-024 |
Rule Checker Overflow |
|
Python Unit Test ( |
ENUM-025 |
Rule Checker Standalone Overflow |
|
Python Unit Test ( |
ENUM-026 |
VHDL Standalone Overflow E2E |
A VHDL annotation with an overflowing enum value on a standalone signal triggers a rule-check error in the full parse pipeline. |
Python Unit Test ( |
ENUM-027 |
SV Standalone Overflow E2E |
An SV annotation with an overflowing enum value on a standalone signal triggers a rule-check error in the full parse pipeline. |
Python Unit Test ( |
ENUM-028 |
All Overflows Reported |
|
Python Unit Test ( |
ENUM-029 |
Negative Value Rejected (BitField) |
|
Python Unit Test ( |
ENUM-030 |
Negative Value Rejected (RuleChecker) |
|
Python Unit Test ( |
ENUM-031 |
YAML Field Invalid Enum Key |
YAML parser records a parsing error when a field-level enum key cannot be parsed as an integer. |
Python Unit Test ( |
ENUM-032 |
YAML Standalone Invalid Enum Key |
YAML parser records a parsing error when a standalone-register enum key cannot be parsed as an integer. |
Python Unit Test ( |
ENUM-033 |
VHDL Pkg Identifier Sanitization |
|
Python Unit Test ( |
ENUM-034 |
SV Pkg Identifier Sanitization |
|
Python Unit Test ( |
ENUM-035 |
C Header Identifier Sanitization |
C header generator sanitizes enum labels to valid C identifiers in |
Python Unit Test ( |
ENUM-036 |
VHDL Pkg Returns None (No Enum) |
|
Python Unit Test ( |
ENUM-037 |
SV Pkg Returns None (No Enum) |
|
Python Unit Test ( |
ENUM-038 |
VHDL Port Comment No Double Dash |
VHDL generator enum port comment uses parentheses format rather than embedding |
Python Unit Test ( |
ENUM-039 |
generate_module Co-generates Pkg |
|
Python Unit Test ( |
ENUM-040 |
XML Simple Invalid Enum Value Reported |
XML parser records an error when a simple-format |
Python Unit Test ( |
ENUM-041 |
XML SPIRIT Invalid Enum Value Reported |
XML parser records an error when a SPIRIT |
Python Unit Test ( |
ENUM-042 |
VHDL Identifier Adjacent Underscores |
|
Python Unit Test ( |
Typed AXI Ports (AXION-TYPES)
Covers optional generation of typed t_axi_lite_m2s / t_axi_lite_s2m record ports (VHDL) and struct ports (SystemVerilog) from axion_common_pkg, instead of the default flat individual signals.
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
AXION-TYPES-001 |
YAML Config Parsing |
|
Python Unit Test ( |
AXION-TYPES-002 |
TOML Config Parsing |
|
Python Unit Test ( |
AXION-TYPES-003 |
XML Config Parsing |
|
Python Unit Test ( |
AXION-TYPES-004 |
JSON Config Parsing |
|
Python Unit Test ( |
AXION-TYPES-005 |
Default Disabled |
When |
Python Unit Test ( |
AXION-TYPES-006 |
CLI Flag Override |
|
Python Unit Test ( |
AXION-TYPES-007 |
VHDL Library Clause |
When |
Python Unit Test ( |
AXION-TYPES-008 |
VHDL Entity Typed Ports |
When |
Python Unit Test ( |
AXION-TYPES-009 |
VHDL No Flat AXI Ports |
When |
Python Unit Test ( |
AXION-TYPES-010 |
VHDL Intermediate Signal Declarations |
When |
Python Unit Test ( |
AXION-TYPES-011 |
VHDL M2S Unpack Assignments |
When |
Python Unit Test ( |
AXION-TYPES-012 |
VHDL S2M Pack Assignments |
When |
Python Unit Test ( |
AXION-TYPES-013 |
VHDL Default Unchanged |
When |
Python Unit Test ( |
AXION-TYPES-014 |
SV Package Import |
When |
Python Unit Test ( |
AXION-TYPES-015 |
SV Module Typed Ports |
When |
Python Unit Test ( |
AXION-TYPES-016 |
SV No Flat AXI Ports |
When |
Python Unit Test ( |
AXION-TYPES-017 |
SV Intermediate Signal Declarations |
When |
Python Unit Test ( |
AXION-TYPES-018 |
SV M2S Unpack Assigns |
When |
Python Unit Test ( |
AXION-TYPES-019 |
SV S2M Pack Assigns |
When |
Python Unit Test ( |
AXION-TYPES-020 |
SV Default Unchanged |
When |
Python Unit Test ( |
AXION-TYPES-021 |
Per-Module Independence |
Setting |
Python Unit Test ( |
18. Hierarchy File Support (HIER)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
HIER-001 |
CLI |
|
Python Unit Test ( |
HIER-002 |
YAML hierarchy parse |
A YAML-format hierarchy file is parsed correctly into a list of instance dicts. |
Python Unit Test ( |
HIER-003 |
TOML hierarchy parse |
A TOML-format hierarchy file is parsed correctly into a list of instance dicts. |
Python Unit Test ( |
HIER-004 |
JSON hierarchy parse |
A JSON-format hierarchy file is parsed correctly into a list of instance dicts. |
Python Unit Test ( |
HIER-005 |
XML hierarchy parse |
An XML-format hierarchy file is parsed correctly into a list of instance dicts. |
Python Unit Test ( |
HIER-006 |
base_addr override (single instance) |
When |
Python Unit Test ( |
HIER-007 |
Single-instance output naming |
When a module appears only once in the hierarchy and no |
Python Unit Test ( |
HIER-008 |
Multi-instance output naming |
When a module appears more than once in the hierarchy, each instance generates separate output files named after the |
Python Unit Test ( |
HIER-009 |
|
When the same module appears more than once in the hierarchy file and more than one entry omits the |
Python Unit Test ( |
HIER-010 |
Duplicate instance name rejected |
When the same instance name appears more than once in the hierarchy file, |
Python Unit Test ( |
HIER-011 |
Address overlap detection |
When two instances have overlapping address ranges, |
Python Unit Test ( |
HIER-012 |
Unknown module error |
When a module name in the hierarchy file is not found in the analyzed sources, |
Python Unit Test ( |
HIER-013 |
address_map.html generation |
When |
Python Unit Test ( |
HIER-014 |
address_map.html table correctness |
The generated |
Python Unit Test ( |
HIER-015 |
Backward compatibility |
When |
Python Unit Test ( |
HIER-016 |
Unsupported format error |
|
Python Unit Test ( |
HIER-017 |
Canonical entry allowed alongside named instances |
When a module appears in the hierarchy with exactly one entry that has no |
Python Unit Test ( |
HIER-018 |
Canonical entry register space generation |
The canonical entry generates its own register-space output files (VHDL, SV, C header, etc.) using the original module name and the canonical base address from the hierarchy. |
Python Unit Test ( |
HIER-019 |
Named instance register space generation |
Each named instance entry generates its own register-space output files named after the |
Python Unit Test ( |
HIER-020 |
HTML/MD docs show only named instances |
When canonical + named instances exist for a module, |
Python Unit Test ( |
HIER-021 |
address_map.html excludes canonical entries |
|
Python Unit Test ( |
20. Python Register Model (REG-MODEL)
ID |
Definition |
Acceptance Criteria |
Test Method |
|---|---|---|---|
REG-MODEL-001 |
FieldModel constructed correctly |
name, bit_low, bit_high, width, mask, default_value match field dict |
Python Unit Test ( |
REG-MODEL-002 |
FieldModel.value bit masking read |
Correct bits extracted from parent raw_value via mask and shift |
Python Unit Test ( |
REG-MODEL-003 |
FieldModel.value setter bit masking |
Only field bits updated; other register bits are preserved |
Python Unit Test ( |
REG-MODEL-004 |
RO field write raises ReadOnlyError |
FieldModel.value.setter raises ReadOnlyError for RO fields |
Python Unit Test ( |
REG-MODEL-005 |
FieldModel.enum_name lookup |
Returns string from enum_values table for current value; None if no mapping |
Python Unit Test ( |
REG-MODEL-006 |
FieldModel.reset() bypasses RO |
Restores default value via _force_write_field without RO check |
Python Unit Test ( |
REG-MODEL-010 |
RegisterModel construction |
name, address, access_mode, default_value, width correctly set |
Python Unit Test ( |
REG-MODEL-011 |
RW/RO/WO .value read semantics |
WO returns 0; RO and RW return raw_value |
Python Unit Test ( |
REG-MODEL-012 |
RO write() raises ReadOnlyError |
write() raises ReadOnlyError for RO registers |
Python Unit Test ( |
REG-MODEL-013 |
WO read() returns 0 |
read() returns 0 for WO registers (bus read semantics) |
Python Unit Test ( |
REG-MODEL-014 |
RegisterModel.reset() |
_raw_value restored to default_value; no callback, no RO check |
Python Unit Test ( |
REG-MODEL-015 |
Packed register fields dict |
is_packed registers have fields dict with correct FieldModel entries |
Python Unit Test ( |
REG-MODEL-016 |
RegisterModel attribute access |
reg.fieldname returns reg.fields[‘fieldname’] |
Python Unit Test ( |
REG-MODEL-017 |
RegisterModel.dump() format |
Returns non-empty string containing register name and access mode |
Python Unit Test ( |
REG-MODEL-018 |
Write strobe callback fires |
on_write() callback triggered exactly once when write_strobe=True |
Python Unit Test ( |
REG-MODEL-019 |
Write strobe callback silent |
on_write() callback not triggered when write_strobe=False |
Python Unit Test ( |
REG-MODEL-020 |
Read strobe callback fires |
on_read() callback triggered when read_strobe=True and read() called |
Python Unit Test ( |
REG-MODEL-021 |
Callback argument correctness |
Callback receives (register_name: str, value: int) with correct values |
Python Unit Test ( |
REG-MODEL-022 |
raw_value WO bypass |
raw_value always returns _raw_value regardless of WO access mode |
Python Unit Test ( |
REG-MODEL-030 |
RegisterSpaceModel construction |
from_module_dict() loads all registers; name and base_address correct |
Python Unit Test ( |
REG-MODEL-031 |
Bus read by address |
space.read(addr) returns register value at absolute address |
Python Unit Test ( |
REG-MODEL-032 |
Bus write by address |
space.write(addr, val) updates register raw value |
Python Unit Test ( |
REG-MODEL-033 |
RO bus write raises |
space.write() to RO register address raises ReadOnlyError |
Python Unit Test ( |
REG-MODEL-034 |
Unknown address read raises |
space.read() at unregistered address raises AddressError |
Python Unit Test ( |
REG-MODEL-035 |
Unknown address write raises |
space.write() at unregistered address raises AddressError |
Python Unit Test ( |
REG-MODEL-036 |
Space reset restores defaults |
space.reset() restores all registers to their default_value |
Python Unit Test ( |
REG-MODEL-037 |
Space attribute access |
space.regname returns correct RegisterModel instance |
Python Unit Test ( |
REG-MODEL-038 |
Field chain access |
space.status.fields[‘ready’] returns correct FieldModel |
Python Unit Test ( |
REG-MODEL-039 |
Space on_write() callback |
space.on_write(name, cb) attaches callback; fires on next write |
Python Unit Test ( |
REG-MODEL-040 |
Space dump output |
dump() returns multi-line string covering header and all registers |
Python Unit Test ( |
REG-MODEL-041 |
Space registers property |
registers property returns Dict[str, RegisterModel] |
Python Unit Test ( |
REG-MODEL-042 |
Space iteration in address order |
Iterating space yields RegisterModels sorted by address |
Python Unit Test ( |
REG-MODEL-050 |
get_model() before analyze raises |
RuntimeError raised if analyze() not called before get_model() |
Python Unit Test ( |
REG-MODEL-051 |
get_model() unknown name raises |
KeyError raised for module name not found in analyzed_modules |
Python Unit Test ( |
REG-MODEL-052 |
get_model() success |
Returns RegisterSpaceModel with matching name after analyze() |
Python Unit Test ( |
REG-MODEL-053 |
get_models() all modules |
Returns dict mapping all module names to RegisterSpaceModel instances |
Python Unit Test ( |
REG-MODEL-054 |
YAML round-trip |
YAML → analyze → get_model → write → read returns correct value |
Python Unit Test ( |
REG-MODEL-055 |
get_model() entity_name fallback |
Finds module when ‘entity_name’ key used instead of ‘name’ |
Python Unit Test ( |
REG-MODEL-060 |
PythonGenerator creates file |
generate() creates *_regs.py in output directory |
Python Unit Test ( |
REG-MODEL-061 |
Generated file importable |
Generated *_regs.py imports without error via importlib |
Python Unit Test ( |
REG-MODEL-062 |
Generated symbol is RegisterSpaceModel |
Uppercase symbol in generated file is a RegisterSpaceModel instance |
Python Unit Test ( |
REG-MODEL-063 |
Generated model functional |
Generated model supports write/read returning correct values |
Python Unit Test ( |
REG-MODEL-064 |
generate_python() API |
AxionHDL.generate_python() produces *_regs.py files for all modules |
Python Unit Test ( |
REG-MODEL-065 |
Packed register in generated file |
Generated model correctly exposes packed registers and their fields |
Python Unit Test ( |