Skip to content

v0.2.0

Choose a tag to compare

@mtravaillard mtravaillard released this 06 Nov 16:02
· 3 commits to main since this release

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 raises ValueError with the file, line and source line, instead of importing a partially
    parsed module:
    bad.sv:2:25: error: expected ','
    
  • New include option: directories to search for `include files, in addition to the .sv
    file's own directory (--option include=rtl/include,rtl/pkg).
  • define now accepts a comma-separated string (CLI) or a list of strings (Python):
    define=["SYM1", "SYM2=4"].
  • New module option: 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 A after a localparam is no longer exported as overridable.
  • A module with no parameter port list now gets the parameter declarations of its body.
  • A parameter without a default value (parameter int N, parameter type T) raises
    NotImplementedError, instead of getting a made-up value 0.
  • dataType keeps 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]) become arrays on both the parameter and the
    moduleParameter.

Ports (#4)

  • Built-in integer types get their width: byte [7:0], shortint [15:0], int and
    integer [31:0], longint and time [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) raises NotImplementedError.

Metadata file (#5)

  • New memoryMap key 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), mirroredSystem and monitor, plus
    initiator and target. Two new keys go with them: group for a system mode, and
    monitoredMode for a monitor.
  • An unknown or misspelled key, at the top level or in a busInterfaces entry, 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: in input logic [7:0] a, b, b is [7:0] (it was a 1-bit wire). This also works for
    integer, struct and interface ports.
  • componentInstantiation now has language systemverilog.
  • A metadata file that is not a JSON object gives a clear error instead of a TypeError.
  • Spaces in --option include=a, b are 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.0 is required (the code never worked with pyslang 10).
  • Files that imported before may now be rejected:
    • files with SystemVerilog errors, including an `include that is not found: pass its
      directory with include;
    • files with several modules: pass module;
    • parameters without a default value;
    • ports of type real, string, chandle or event;
    • metadata files with unknown keys.
  • 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 localparam in #(...) are no longer exported, and body
      parameters are;
    • some dataType values change, for example bit [3:0] to bit signed [3:0];
    • a lone target interface now references the lone memory map.
  • defines=[...], shown in the old README, never worked: use define=[...].

Full Changelog: v0.1.2...v0.2.0