Repository navigation
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