Repository navigation
xezim-bin 0.11.1
Automated build of xezim-bin 0.11.1.
Upstream: https://github.com/aionhw/xezim/releases/tag/0.11.1
Upstream changes
0.11.1 — complete VPI, faster memory models, IEEE 1800 conformance fixes (October 2026)
Correctness
- A loop variable declared in
for (int i = ...)orforeach (arr[k])no
longer binds to a same-named variable in a child instance: the loop runs on
its own storage. It used to read the child's x and run zero iterations, or
step the child's counter. A bare name also no longer follows an earlier
hierarchical reference such asu.x = 1down into that child. (#195, from
PR #196 by Ganesh T S) - A member access through a struct no longer lands on an unrelated class
object whose handle number happens to equal the struct's value: the path is
chosen from the declared type. This covers struct variables, collections of
structs, hierarchical references,refformals and part-selects, a
module-level struct holding a class handle, and class handles declared
through a typedef (including a parameterized one). (#193, from PR #194 by
Ganesh T S) - Members of a struct-typed class property resolve at any depth: indexed and
part-selected members, nested structs, and queue, dynamic and associative
array members, in methods and at module scope. (#197, from PR #198 by
Ganesh T S) - A class that extends a parameterized class without giving all its
parameters (class d extends base;) gets their declared defaults, in
functions and tasks alike. A type parameter used to read as a 1-bit
logic, so a UVM base test built this way created null objects and drove
nothing. (PR #199 by eenky) +incdir+directories in a-Fargs file resolve against the file's own
directory first, so+incdir+.means that directory. (PR #200 by Francesco
Urbani)--dpi-liblibraries are loaded into the global symbol scope, as the DPI
guide says, so one library can call another, in either command-line order.
A call into a second library used to end the run withsymbol lookup error. (#202)- A
--dpi-liblibrary that cannot be loaded stops the run before it starts
(exit 1), and calling a DPI import that no loaded library defines is a
Fatal. Both used to continue, with the import returning 0, and exit 0.
(#201) $displayoutput from a testbench that prints rarely appears as it is
printed, not only at exit. (xezim-core #49)- A task enabled without parentheses through a hierarchical path or a
package scope (u.t;,a.b.t;,pkg::t;) is called. It used to be
dropped inside a task, so analwayscalling that task spun at time 0
and the run hung, and directly in analwaysit was rejected as having no
timing control. A three-level enable inside a task (a.b.t();) also kept
advancing time after$finish. - An exported task called from C returns only when it has finished:
fork ... join,join_any,wait fork,wait(...)and@(...)inside it
now wait, with the rest of the simulation running meanwhile.fork ... join
used to drop the rest of the task and return, and the others returned at
once. (#204) wait(ev)on a named event waits for a new trigger every time. After the
event's first trigger it used to fall straight through.- VPI:
vpi_mcd_open,vpi_mcd_close,vpi_mcd_flush,vpi_mcd_name,
vpi_mcd_vprintf,vpi_flush,vpi_compare_objectsandvpi_get64are
available, andvpi_mcd_printfwrites to files opened withvpi_mcd_open
or$fopeninstead of only stdout. The DPI guide lists the VPI calls that
are still missing. (#205) vpi_get(vpiTimeUnit, ...)andvpi_get(vpiTimePrecision, ...)return a
module's own timescale for a module handle (the two names are now defined in
vpi_user.h), andsvGetTime,svGetTimeUnitandsvGetTimePrecision
give the same answers from DPI code. (#206)- Gate primitives,
#(rise, fall)gates, UDP instances with parameter
delays andwire #d w = expr;inside sub-module instances keep their
delays, resolved per instance in the child's timeunit; a sub-modulebuf
turns z into x as at top level. always @(m[i])fires in designs that also declare an array of more than
100,000 elements; every array allocated after the large one used to lose
element sensitivity.- Ports with no data type, and ANSI
input logic/inout logicports, are
nets (§23.2.2.3); a hierarchicalassign dut.u.clk = ...onto a net-typed
port chain drives it. A continuous assign that only reads an unpacked-array
element no longer creates a phantom 1-bit net named after the array. - The one-time notes for ignored system tasks (such as
$dumpfilewithout
--wave) are written to stderr as one piece, so$displayoutput going to
the same file can no longer land inside one and hide a UVM message from log
parsers. - Continuous assigns to a bit or part of an unpacked-array element
(assign r[i][j] = ...,.out(r[i][j])) drive the array inside
instantiated modules. They used to be dropped silently there, which left
the c906 interrupt controller's gated clocks dead. Writes to a bit of a
2-D or deeper array element (m[i][j][k] = ...) are no longer dropped
either, at the top level or in procedural code. - A net delay (
wire #2 w;,#(rise, fall, off),#(P)) delays every
driver of the net: separate assigns, ports, gates and UDPs. It acts after
the drivers' own delays and after resolution, bit by bit on a vector. A
declaration assignment's delay stays that assignment's own. A port bound to
a net takes the external net's delay. Each of several drivers on one net
keeps its own delay, and driventri0/tri1nets start at x. - An undriven output port with no data type (
output o,output [3:0] o,
non-ANSIoutput o;) floats at z. It used to start at x. @(mem[5]),@(mem[i])and@(posedge mem[i][0])on a large memory wake,
inalwaysblocks and in procedural waits alike, and continuous assigns and
always_combblocks reading an element follow writes to it. The event was
dropped. An event on a select (v[3],v[5:4],m[i]) is an event on the
selected value: edges are judged on the selected bit, and a changed index
re-selects the element.posedge v[P-1]with a parameter index watches the
right bit.- A class parameter default is evaluated in the class's own scope, so
int D = W*2andtype U = Tfollow the parameters before them in every
specialization, including typedefs, extends clauses, parameterized
subclasses and static calls. Specializations that differ only in defaulted
parameters share statics. Named class parameter assignment (C #(.W(5)))
binds by name,$typenamelists every parameter, and a class variable
declared in an instantiated module keeps its specialization. - A virtual interface reached through any receiver works: class-handle chains
(cfg.vif,a.cfg.vif,this.cfg.vif), local and formal handles,
module-scope chains, inherited, parameterized, static and typedef'd
properties, and vif arrays and queues. This holds for reads, writes,
nonblocking writes,@(...),wait(...), clocking blocks, interface task
and function calls, and binding. They used to read 0 or x, drop writes and
never wake.@(vif.cb)in a class method resumes after the clocking block
samples. (From PR #207 by eenky) - A call in receiver position (
get_obj().x,q.pop_front().addr) runs
once. It used to run up to 12 times, andq.pop_front().addrdrained the
queue. - Unpacked-struct members with two or more unpacked dimensions
(bit [7:0] m [2][2]) survive whole-struct copies (module, block-local,
nested, array, queue and associative-array elements, class properties),
struct formals of every direction, function returns, assignment patterns and
%p. Only the first dimension used to be seen, so the member read as x
or 0. A nonblocking whole-struct assignmentb <= aupdates every member;
it used to get even scalar members wrong. Struct input ports and struct
continuous assigns carry array members, patterns and%pfollow a
descending dimension's declared order, 2-state array members default to 0,
num()on an associative array of structs counts keys, and
$size/$bitswork on a member sub-array such ass.mm[1]. - A UVM DPI library built from
include/uvm_dpi_xezim.ccloads. The UVM
sources it compiles call the SV exportm__uvm_report_dpi, and built as
C++ that call was mangled, so--dpi-libstopped withundefined symbol.
The driver now gives everything C linkage, as the referenceuvm_dpi.cc
does, and also builds as C. (#208) - An input port whose connection computes something (
.p(a & b)) is a net
of its own (§23.3.3), so@(p)no longer wakes when an operand changes
whilea & bstays the same. A child reached through a select
(.wl(wl[1])) whose own port has the same name latches again. - Inlined task bodies no longer see the caller's local variables, an output
argument is copied back into the caller's own variable,disableof a task
insideforeachends the task, and integer values written toreallocals
and formals convert. /and%size both operands to the wider one (§11.6.1); a narrow dividend
used to narrow a ternary divisor and read x.- A two-state variable no longer stores x or z when a value with x or z bits
is written to it from compiled code. - A member write through a class property whose type is a type parameter
(class p #(type CFG = cfg_c); CFG a; ... a.x = 1;) reaches the object.
It used to be dropped without a diagnostic, along with compound,
nonblocking and nested writes through such a property. (PR #209 by eenky) - A module path or SDF delay that rounds to zero ticks is no delay: the
change it carries happens in the same Active region as its cause. A clock
passed through a zero-delay library cell ((posedge A => (Y:1'b1)) = (0.01, 100.0)at 1ps precision) clocked its flops after that time step's
nonblocking assignments had committed, so they sampled the new values. - A class whose base class is a type parameter
(class wrap_c #(type BASE = base_c) extends BASE) gets that base in every
specialization, including one that passes its parameter on
(extends wrap_c #(B)). It used to get no base at all:super.new()did not
run the base constructor, inherited properties read x, inherited methods and
super.calls returned nothing, and$castupcasts failed. UVM's
uvm_port_baseanduvm_reg_sequenceextend a type parameter, so a$cast
from a TLM port to its interface base failed and register sequences never ran
theirbody. (#210) - A static property read or written through an object handle (
h.count)
reaches the static of the handle's declared class and specialization, also
through a null handle. It used to read x unless the static had been used
through the class name first, and writes through a specialized handle were
lost. $castto a variable declared with a class specialization
(pbase #(8, byte) x;) checks the parameters wherever the variable is
declared: module scope, class property, local, formal or typedef. Outside
procedural locals it used to accept an object of any specialization.- An interface class that extends a type parameter is an error in every mode,
as IEEE 1800 requires, including as a second base (extends ic_a, B). - Class properties take the width of the object's specialization:
bit [W-1:0] pv = '1inpbase #(8)is8'hff, not the default width's
fill, and the same holds for member arrays, queues, statics and class-local
typedefs. A type parameter bound by an ancestor'sextends comp_base #(byte)
gives inherited properties, locals and function returns that type's width
and signedness. A ranged type argument (#(bit [5:0])) in a typedef keeps
its range. - Variables declared inside functions, tasks, class methods,
begin/fork
blocks, loops andalwaysblocks keep their full declared type (IEEE 1800
§6.8). A 2-state local no longer holds x or z, an initializer is converted to
the declared type (byte unsigned v = 200used to read -56,int unsigned v = -1compared as negative), and struct literals, strings, virtual
interfaces and tagged unions initialize correctly. Packed multi-dimensional
array locals keep their dimensions. - 2-state members of an unpacked struct (
int,byte, ...) start at 0
wherever the struct lives; they used to read x until first written. Member
defaults (int a = 3;) apply to block-local and class-property structs too. - Bit-stream casts to and from unpacked arrays, dynamic arrays and queues
(barr_t'(32'h01020304),int'(barr)) unpack and pack the elements in
declared order (§6.24.3); they used to give zeros. - A base-class handle to a derived object reads and writes the base's copy
of a property the derived class redeclares (§8.14). Writing through the
base handle used to change the derived copy. - A class fixed array sized by a value parameter (
int items[N]) has each
specialization's own size, and a static method called through a handle to a
specialized class sees that specialization's parameters (§8.25). - Elements of class
byte,shortintand signed-vector queues and dynamic
arrays keep their sign (-1used to read as255). - Writes through a chain of handles of any depth (
n.next.next = new(3),
a.b.c.x = 5) are no longer lost (§8.15). - A class property no longer resolves to a same-named member of an unrelated
struct variable elsewhere in the design, which used to leave handles null
and their members x.%sof a string read through two handles prints the
text without padding. q.min() == q.max()on a class queue property no longer crashes.- Same-named variables in different packages, or in a package and a module
that imports it, are separate variables (§26.3). They used to share storage. - Queue, dynamic-array and associative-array arguments follow §13.5: an
inputis a copy (it used to alias the caller's variable), anoutput
starts empty and is copied back on return, and arefaliases the actual,
so concurrently forked tasks see each other's writes. @(posedge x)and other event controls on arefargument wait for the
actual to change; they used to return at once.- A queue slice passed directly as an argument (
f(q[1:$])) passes exactly
the slice; it used to pass one element, and a recursive function over
slices overflowed the stack.q[a:b]witha > bis empty. - Clocking blocks (§14):
#1step,#0and#Ninput skews sample the
Preponed, Observed and time-minus-N values (inputs used to return the value
after the clock edge), output skews including#1stepare honored,inout
clockvars can be driven, and an@(cb)reached right after the raw clock
edge sees that edge's samples.#1stepused to be read as#1, which also
dropped the rest of adefaultclocking item. disableof a named block or task from a process forked inside it ends the
whole block, kills the processes forked in it and resumes the block's owner
after it (§9.6.2). The sibling branches used to keep running.forceandreleaseon bit- and part-selects of nets hold against the
net's drivers and hand back only the released bits (§10.6.2). Forces also
hold on gate-driven nets.- A level-sensitive
alwaysblock in an instance runs at time 0 when an
input port's actual has a declaration-initialized value; its outputs used to
stay x.
Performance
- Combinational logic re-evaluates only when a bit it actually reads
changes (assign lo = bus[3:0]stays idle whilebus[7:4]moves;
XEZIM_BIT_SENS=0restores whole-signal sensitivity), and the two-state
executors and the settle loop do less bookkeeping. - Class method calls cache a per-method call plan and save the formals'
type metadata only when it is rewritten; instantiation reuses a per-class
template. - Startup is much cheaper: the design is preprocessed once per run instead
of two or three times, elaboration and the bytecode compiler allocate far
less, and a warm--cacherun loads the stored design about twice as
fast.XEZIM_EXIT_AFTER_COMPILE=1stops right after compile, for measuring
startup. - Together, host instructions fall 7% on a C906 CoreMark run and on the
AXI4 AVIP and 11% on a C910 memcpy run, with identical output; a UVM
testbench reaches time 0 with about a third of the previous work. - Designs built from many small instances, such as a cell-level memory:
input ports that nothing can observe by name are left out
(XEZIM_KEEP_PORTS=1keeps them; waveform dumps, VPI, DPI and hierarchical
references keep them automatically), AND/OR gates whose other input holds
the controlling value skip clock-driven evaluation (XEZIM_CTL_MASK=0turns
it off), andacc = acc | x[k]reduction loops compile straight-line. A
64k-cell DRAM model simulates with 1.0 G instead of 11.7 G host
instructions; a C906 CoreMark run uses 4% fewer. - Behavioural memory models: a task call from compiled code no longer copies
the task, and a statement that still needs the interpreter runs inside its
compiled block instead of sending the whole block to the interpreter. A
DDR4-style behavioural model runs 4 to 6 times faster. - Large flat designs start faster: elaboration skips passes that cannot apply,
and dependency ordering joins nets with very many writers and readers
(XEZIM_TOPO_JOIN=0turns that off). The 64k-cell DRAM model elaborates and
compiles in about 3.5 s instead of 8.2 s.
Memory
- Large memories live in a packed arena by default (integral elements up to
64 bits in arrays of more than 100,000 cells;XEZIM_PACKED_MEM=0turns it
off), and arrays of 257 or more elements no longer store a name per
element (XEZIM_VIRTUAL_NAME_MIN_CELLSsets the cut-off).force/release,
$readmemh/$writememh, DPI array arguments anduvm_hdl_forcework on
arena memories. A C906 CoreMark run peaks at 0.6 GB instead of 2.6 GB.
XEZIM_RSS_TRACE=1prints resident and peak memory at every phase. - Instantiated
alwaysblocks stay in their shared form until they compile
(XEZIM_LAZY_ALWAYS=0turns it off), compiled blocks drop their statement
trees when nothing needs them, and freed memory is returned after
compilation. The 64k-cell DRAM model peaks at 0.58 GB instead of 1.6 GB, and
a 256k-cell one at 2.1 GB instead of 7 GB.
VPI
- Every routine of IEEE 1800-2017 clause 38 is implemented: user data per
call instance,vpi_get_systf_infowithvpiUserSystfhandles,
vpi_handle_by_multi_index,vpi_handle_multi(vpiInterModPath),
vpi_get_value_array/vpi_put_value_array,vpi_get_delays/
vpi_put_delays(nets, module paths, timing checks, intermodule paths) and
vpi_get_data/vpi_put_data(always 0: xezim has no$save/$restart).
vpiStrengthVal, the short/long integer, shortreal and raw value formats
andvpiTimeValputs work;vpiObjTypeValfollows §38.15. vpi_register_cbaccepts every §38.36 reason. Simulation-time callbacks
run in their region order within each time step;cbValueChangereports
every change, including continuous assignments (cocotb edge triggers on
such nets no longer hang); force, release, assign, deassign, disable,
statement, error, timing-violation, signal and unresolved-systf callbacks
are new;vpi_get_cb_infoandvpi_remove_cbwork for all of them.
cbReadOnlySynchfires once at the end of a time step.- A VPI application can walk the whole design (IEEE 1800-2017 chapter 37):
instances of every kind, packages, generate scopes, named blocks, tasks and
functions, processes, continuous assignments, gate/switch/UDP primitives,
specify paths and timing checks, modports,bindinstances and ports, each
withvpiFile/vpiLineNo;vpiTypeis the declared type through
typedefs, with ranges and typespecs. Ports iterate in port-list order and
SystemVerilog unpacked arrays reportvpiRegArray.
Assertions
- A failing assertion with no
elseclause (immediate, deferred or
concurrent,assumeincluded) reports** Error: Assertion error.with its
time and scope, as §16.3 requires. It used to print nothing. - Property and sequence local variables (§16.10) are supported: declarations
with initializers, match-item assignments(seq, v = e)andlocal input
formals, with a separate copy per attempt. Subroutine calls in match items
(§16.11) run at each match. - A concurrent assertion inside an
alwaysprocedure takes its clock from the
procedure's event control and starts only when the procedure reaches it, so
an enclosingif,caseor loop gates it (§16.14.6). default disable iff(§16.15) applies to the assertions of its scope; an
explicitdisable iffstill wins.- An
always_comboralways @*whose only reads are inside an assertion
re-runs when those values change; it used to run once at time 0. a ##1 b == cdelays the comparison, as the operator precedence requires.
Each copy of an assertion in a generate loop runs (only the first used to),
and%min its action names the generate block. A named property without a
clock uses the default clocking.
DPI
- Imported DPI tasks that wait through exported tasks suspend and resume
independently (§35.5.2, Linux with glibc), so concurrent callers no longer
return in last-in first-out order. Each active call reserves its own stack,
256 MiB by default;XEZIM_DPI_STACK_MBchanges the size. - The §35.9 disable protocol is implemented:
svIsDisabledState()reports a
call whose process was disabled, a disabled exported task returns 1, and
protocol violations are fatal. The C side of imported and exported tasks
returnsint. export "DPI-C"declared in an instantiated module works. Each instance's
copy is called according to the current DPI scope (svSetScope, or the
calling context import).- Packed struct and union arguments pass as
svBitVecValor
svLogicVecValin every direction; they used to arrive and return as 0. Multi-dimensional
open arrays are supported, and output and inout arguments of exported
functions and tasks are written back to C.
Tests
- A new
lrmtest group checks 409 subclauses of IEEE 1800-2023, chapters 3
to 38 and Annexes D and E, against values taken from the reference
simulator (169 tests). The test suite has no ignored tests.
Removed
- The experimental multikernel / PDES code: the
--multikernel-scope,
--pdes-c910-stuband--pdes-c910-ticksoptions, the
XEZIM_DISPATCHER=pdes/perlpmodes and theXEZIM_PDES_*/
XEZIM_PERLP_*variables. The library functionsimulate_multino longer
takes amultikernel_scopeargument. Partition-based parallel dispatch
(--load-partition,XEZIM_PARTITION_*) is unchanged.