Repository navigation
Releases
v0.2.1
Update to XactFlow v0.4.0
Full Changelog: v0.2.0...v0.2.1
v0.2.0
XactFlow-sv v0.2.0
This release makes the importer stop on SystemVerilog errors, reads parameters and ports the way
the SystemVerilog standard (IEEE 1800) defines them, and adds memory map references, all bus
interface modes and stricter checks to the metadata file.
It contains breaking changes: see "Upgrading" below.
Input handling (#2)
- A SystemVerilog error found while parsing (syntax error, include file not found, unknown macro)
now raisesValueErrorwith the file, line and source line, instead of importing a partially
parsed module:bad.sv:2:25: error: expected ',' - New
includeoption: directories to search for`includefiles, in addition to the.sv
file's own directory (--option include=rtl/include,rtl/pkg). definenow accepts a comma-separated string (CLI) or a list of strings (Python):
define=["SYM1", "SYM2=4"].- New
moduleoption: the module to import. A file with several modules now needs it, instead
of the first module being used without any message.
Parameters (#3)
- A declaration without a keyword in
#(...)takes the keyword of the one before it, so
int Aafter alocalparamis no longer exported as overridable. - A module with no parameter port list now gets the
parameterdeclarations of its body. - A parameter without a default value (
parameter int N,parameter type T) raises
NotImplementedError, instead of getting a made-up value0. dataTypekeeps the signing and gives an implicit type its base type:bit signed [3:0],
logic signed [3:0],logic [7:0],int signed.- Unpacked dimensions (
parameter int A [2]) becomearrayson both theparameterand the
moduleParameter.
Ports (#4)
- Built-in integer types get their width:
byte[7:0],shortint[15:0],intand
integer[31:0],longintandtime[63:0]. They were exported as 1-bit wires. - A port with a type that has no bit width (
real,shortreal,realtime,string,
chandle,event) raisesNotImplementedError.
Metadata file (#5)
- New
memoryMapkey on a target bus interface: the memory map it gives access to, written as
memoryMapRef. When the component has exactly one target interface and one memory map, the
target references it by default. - All IEEE 1685-2022 bus interface modes are supported:
system,mirroredInitiator
(mirroredMaster),mirroredTarget(mirroredSlave),mirroredSystemandmonitor, plus
initiatorandtarget. Two new keys go with them:groupfor a system mode, and
monitoredModefor a monitor. - An unknown or misspelled key, at the top level or in a
busInterfacesentry, raises
ValueError."registerfile"used to be ignored, dropping the memory map.
Bug fixes
- A port without direction or type now takes them from the port before it, as the standard
defines: ininput logic [7:0] a, b,bis[7:0](it was a 1-bit wire). This also works for
integer, struct and interface ports. componentInstantiationnow haslanguagesystemverilog.- A metadata file that is not a JSON object gives a clear error instead of a
TypeError. - Spaces in
--option include=a, bare trimmed. - Two modules with the same name in one file raise an error, instead of one being dropped.
- README: new "Generated component" section, and updated options, metadata and limitations.
Upgrading
pyslang>=11.0.0is required (the code never worked with pyslang 10).- Files that imported before may now be rejected:
- files with SystemVerilog errors, including an
`includethat is not found: pass its
directory withinclude; - files with several modules: pass
module; - parameters without a default value;
- ports of type
real,string,chandleorevent; - metadata files with unknown keys.
- files with SystemVerilog errors, including an
- The generated component can change for the same input:
- integer ports and ports declared in a list (
a, b) get their real width; - parameters declared after a
localparamin#(...)are no longer exported, and body
parameters are; - some
dataTypevalues change, for examplebit [3:0]tobit signed [3:0]; - a lone target interface now references the lone memory map.
- integer ports and ports declared in a list (
defines=[...], shown in the old README, never worked: usedefine=[...].
Full Changelog: v0.1.2...v0.2.0
v0.1.2
Update to ipxact-compiler v0.2.0 and XactFlow v0.3.0
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Fixes (#1)
parameter: is now the only element with aparameterId.moduleParameter: has noparameterId, and its value now refers to the component parameter (for exampleBAUDRATE).
Allow to pass XSD validation and to properly overrides parameters values
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Initial release
First public release of xactflow-sv, a XactFlow importer plugin that reads a SystemVerilog module plus a JSON metadata file (and, optionally, a SystemRDL register map) and produces an ipxact.Component object, built on ipxact-compiler's IEEE 1685-2022 object model.
What's included
- SystemVerilog module header parsing (via
pyslang, no elaboration, no package loading, no symbol resolution) intoipxact.Component: wire, struct-typed, and SVinterface-typed ports, module and component parameters, all built directly againstipxact-compiler's dataclasses rather than XML. - Metadata-driven bus interface mapping: discrete port mappings, dotted
port.fieldreferences into struct-typed ports, and SVinterface-typed ports that already group their own signals. - SystemRDL register map conversion, via
systemrdl-compiler/peakrdl-ipxact, intoipxact.MemoryMap/AddressBlock/Register/Field. - Registered under the
xactflow.importersentry point assv, so it's usable end to end straight from XactFlow's CLI:xactflow sv module.sv --option metadata=... --then component --output out/(requiresxactflow>=0.1.2), chaining directly into an installed exporter such asxactflow-componentin the same process. - Fails loudly instead of silently dropping data: SystemVerilog or SystemRDL constructs this package doesn't yet support raise
NotImplementedError/ValueErrornaming exactly what's unsupported, rather than producing aComponentthat quietly leaves something out.
Status
This is an early, alpha-stage release. register_map.py reads peakrdl-ipxact's own XML output through a dedicated reader rather than ipxact-compiler's parser, a deliberate keep-it-simple choice, not necessarily a permanent one. A number of SystemVerilog and SystemRDL constructs are intentionally not supported yet: explicit ANSI ports and non-ANSI port lists, indexed part-selects ([base+:width]), register/register-file arrays, ispresent = false, and a few others. See the README for the full list of known limitations and what's planned next.
License
LGPL-3.0. See LICENSE.
Full Changelog: https://github.com/IP-XACT/XactFlow-sv/commits/v0.1.0