Skip to content

User guide ​

中文说明

One User Kit represents one macro. Edit rtl/MacroTop.sv and connect your design directly, adapting its interface at this boundary when necessary. Tests instantiate the original top directly as dut and provide the external-drive enable vector test_io_oe[65:0].

make init creates a minimal macro.json containing a UID, optional description, and ordered RTL source list:

json
{
  "uid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "describe": "",
  "rtl": {"sources": ["rtl/MacroTop.sv"]}
}

The example UID is illustrative; retain the unique value generated by make init. List rtl.sources in dependency order; directories are not scanned automatically. Paths are relative to the project root, without whitespace or traversal outside it.

The source top defaults to MacroTop, and tests defaults to [{"name":"smoke","top":"MacroTb","sources":["tests/MacroTb.sv"]}]. When using the template, omit top and tests. Format defaults to 1 and interface to mpc66-v1. include_dirs, defines, and dependencies default to empty; omitting netlist means RTL only. Defaults are applied when reading, without rewriting the configuration.

Add top, rtl.include_dirs, rtl.defines, dependencies, or tests when needed. An explicit tests list replaces the default and must not be empty. Each entry has name, top, and sources and shares the RTL include/define settings. Tests must not redefine design modules.

sh
make check
make trace TEST=smoke
make export

make prepare expands includes and compilation macros while preserving module, interface, and package names. build/prepared/prepared.json records the top, definition list, and RTL fingerprint without a rename map.

make export produces complete RTL with the macro boundary. artifact.json.cell equals macro.json.top, defaulting to MacroTop. Before backend work, select a readable unique top such as UartMacro, update the RTL declaration, testbench instance type, and macro.json.top, then test and export again. Editing JSON alone does not rename RTL. Submit revisions from dist/. Declare external functional models such as standard cells and SRAMs in dependencies; their library names are preserved.

The current tools do not support bind/config/defparam, nested design declarations, UDPs, programs, virtual interfaces, or unconnected_drive directives. Put global types in packages and imports inside module/interface/package scopes. Use timescale directives or timeunit inside a named scope, rather than compilation-unit timeunit declarations. Unresolved cross-hierarchy references fail validation.

Tests must use self-contained SystemVerilog sources. External working directories, undeclared data files, DPI, dynamic libraries, and other-language sources are currently unsupported.

After changing the design, rerun tests and export. Retain the UID; the export digest changes with its contents.