Repository navigation
merge queue: merged #4221: chore(develop): sync master - #4447
Closed
mergify[bot] wants to merge 315 commits into
Closed
mergify[bot] wants to merge 315 commits into
mergify[bot] wants to merge 315 commits into
Conversation
The elements of an array parameter were not published as constants when an
item of its pattern is a member of an enumeration, such as
`'{variant: Buffered, ...}` for a structure member of an enumeration type,
or `'{Blue, Red}` for an array of one: the constant context that folds the
array's value had the members' values but not their types, so a member was
taken for a plain vector and rejected as not assignment compatible with the
enumeration (IEEE 1800-2023 6.19.3). The context now has the types of the
enumeration constants of the scope and of the packages it uses.
Found with the RTLMeter design OpenTitan (otp_ctrl_part_pkg `PartInfo`).
Change-Id: Ifda4d7dac93a363ad048d9ad7f074c4deba9ca70
…ues unsupported Whether such an argument changed apart from time has no exact answer from buffers of its parts: a time-dependent condition selects which part matters, and a set of `inside` may hold any of them. Time-only arguments stay exempt from triggering (IEEE 1800-2023 21.2.3). Change-Id: I0cc7db6f4894e7f22c3b595bf7646635adf2ac0e
An implicit member whose value is wider than the numeric environment holds now keeps its literal, so a later member that names it is compared with it. Change-Id: I8ff50c3e2bf7a9c3ec0f6a52ac14ff2f652e9dd7
…ater pass
A parameter whose initializer names an earlier parameter of the scope that
the first pass over the parameters cannot evaluate yet, such as Ariane's
localparam NB_PERIPHERALS = Debug + 1; // Debug: an enumeration member
localparam logic [NrRegion-1:0][NB_PERIPHERALS-1:0] ValidRule =
{{NrRegion * NB_PERIPHERALS}{1'b1}};
was rejected as an unsupported "replication count": in the first pass the
enumeration members are not known, so the count, a concatenation, has an
operand of unknown width.
Such an initializer is now left to the pass that has the enumeration
members, as the earlier parameter itself is and as initializers with
selects already were, when the unknown parameters are all it misses: it is
deferred only if it is a constant once they are given a value, so an initializer
that is invalid for another reason, such as a replication of a variable,
is still rejected. What is still unknown after the last pass is rejected
as before.
Change-Id: I7d61276ad850286e38dc166c83e630f581c066f0
An instance of a sequential user-defined primitive (IEEE 1800-2023 29.5-29.7) keeps its state and the previous values of its inputs in variables of its scope. A continuous assignment of the instance's delay drives its output with the state. A process takes each change of an input, also the inputs leaving x at its start, and sets the state to the next state of the first matching level-sensitive entry, else of the first edge-sensitive entry of that change, else to x. The state starts with the initial value of the primitive, or x. Change-Id: I8103e92ece63c30c6ff3d82a1498ec551ba715a2
Change-Id: I9eb37b004c3d0d4552ab848ebc0b5cd7b09b9dfa
A continuous assignment or declaration initializer gave an unpacked
array a value that is not one, and was accepted:
wire [1:0] x[1:0]; reg [1:0] y; wire a[1:0];
assign x = y; // a vector to an unpacked array
assign a = x[0]; // an element to the whole array
assign out[3:0] = in[j]; // a slice from a packed element
IEEE 1800-2023 7.6 makes only unpacked arrays of a compatible type
assignment compatible with a fixed-size unpacked array. A name, select,
member, number or operator whose value is integral, real or a string is
now reported as `NotUnpackedArray`. Assignment patterns, concatenations,
streams, calls and string literals, which fill an unpacked array of
bytes (5.9), are not affected.
sv-tests imported (ivtest), rejected in 2state and 4state:
sv_array_cassign_fail{6,7,8,9}, pr1735724.
Change-Id: I7765eff266a9b8ac4a03eeb1fb4ab58f94dbf0f2
Celox assigns a fixed-size unpacked array a packed value exactly as wide as the array, bit for bit, and fills it with an unbased unsized literal such as '0, which the integration tests rely on; such values are no longer rejected, and both are documented as deviations from 7.6. A packed value of another width, a real or a string is still rejected, also as the operand of a cast such as int'(1'b1). Change-Id: If0b1bc34e85179cc27dc889795dc5dd22838f1ee
…rays `null` is no value of a fixed-size unpacked array, and a user function whose result is a packed value of another width than the array is now checked as other packed values are; system functions such as `$cast` are not. Change-Id: I030adae4dcacdf9d749fae21e546c1f42ee702e8
An explicitly named port `.p(expr)` now has the self-determined type of its expression and a continuous connection to it (IEEE 1800-2023 23.2.2.2); it was a separate, unconnected variable before. A non-ANSI header port that is a part-select, a concatenation, an explicitly named port, an empty port or a name several ports share becomes the explicit port of its expression, and the port declarations of the objects it references declare those objects (23.2.2.1). Port expressions of inout ports, or of inputs and outputs together, stay unsupported. Change-Id: I4ada4fbb2cb22aefbd4333c9f280789d0e3c3a9d
IEEE 1800-2023 6.12, 7.4: an element of an unpacked array of `real` or
`shortreal` values is a real. Celox read such an element through a select,
which carried no floating-point precision, so every use treated the IEEE
payload as an integer: after `real v[2]; v[0] = 2.5;`, `k = v[0]` left `k`
at 0, `v[1] + 0.5` added to the bit pattern, and `$display("%f", v[0])`
printed the payload as a huge number. Writes stored the right bits.
A select of an array whose elements are reals now has the element's
precision, and the floating-point lowering reads its payload through the
ordinary select, at a constant or a run-time index. Comparisons, arithmetic,
conversions and $display of the elements follow.
Found from a review of #4137 (`repeat (values[i])`).
Test: shared case floating_point::unpacked_real_array_elements_are_reals
(passes on Icarus 13.0 and Verilator 5.054 as well).
Change-Id: Ia95ec9cd19300b66e004b683782de8ebb95f84e4
`Type` and `VariableShape` lose the `class` field. A class handle type names its class by its element type (IEEE 1800-2023 8.4), which every producer binds and changes of unpacked dimensions keep: - `Type::class_in` and `VariableDimensions::class_in` read the class from the binding or, for a shape whose dimensions are not formed, from the element type. - The IR type's class (`ir::Type::class`) is named from the semantic type in the session's table. - Equality and hashing of `Type` and `VariableDimensions` tell handles of two classes apart by the element's `Identity::Class`, the class name the retained type records from its table, so tables that declared a class on their own agree on it. Shapes of handles skip the closed-shape cache, which keys on the shape alone. - `Function::return_class`, which nothing read, is gone. BREAKING CHANGE: `Type::class` is removed. Change-Id: I1b40e296500bd1275ae0792a7cad1d9b6a9d83c5
A parameter whose declared range selected a member of an earlier parameter of the same list, such as OpenTitan's `parameter part_info_t Info = PartInfoDefault, parameter logic [Info.size*8-1:0] DataDefault = '0`, was rejected as an unresolved hierarchical reference `Info.size`. The range was bound without the parameters before it, so the member select had no constant and was taken as a select of a variable. It is now bound with them: a member of a parameter is a constant expression (IEEE 1800-2023 11.2.1) that the declared type of a later parameter may use (6.20.2). Change-Id: Ia283eef0232fe8191c81c04027264df7c27b81e4
A name after the end of a block was not compared with the block's name:
initial begin : named_begin ... end : wrong_name
initial fork : f ... join : g
module test(); ... endmodule : test_bad
initial begin ... end : label // unnamed block
IEEE 1800-2023 9.3.4 makes it an error if the name at the end differs
from the block name at the beginning, for `begin`, `fork` and generate
blocks (a statement label before `begin` names the block too), and for
the end keywords of design elements, functions and tasks. Such a label
is now a parse error at the label.
sv-tests imported (ivtest), rejected in 2state and 4state:
named_begin_fail, named_fork_fail, sv_end_labels_bad,
sv_end_labels_unnamed.
Change-Id: Ieca1770ebfb78607a786b3ae26c07c1c5e50e80d
An interface body flattened into the module that instantiates it now resolves a hierarchical name it does not declare by LRM 23.8: the instance's enclosing generate blocks (innermost first), then the parent module, then upward through the instance tree, and rooted names by 23.6. A name that starts at `$root` resolves through the root-path code that module bodies use (23.3.1). Two instances of one interface in different parents resolve the same name to different objects. The analyzer hands the frontend the generate blocks that hold the instance as a list, so an escaped block name with a `.` stays one scope. A name from the top that reaches the only instance of the module that writes it, such as `$root.Top.sig` in `Top` or in an interface body of it, names the module's own signal like `Top.sig`, and two spellings of one object in an interface body are one signal: a process that writes through both is one writer. The analyzer reports such a name with its parsed components and the interface instance; the frontend resolves it from the instance's parent and hands it back as a placeholder signal keyed by the instance and the components (a VirtualInterfaceSignal DefinitionId), which the body binds instead of renaming it. Every name the body holds for an object of the scope is such a placeholder, also one that aliases the module's own signal, so it never collides with a member of the body: an interface that declares `data` and reads `Top.data` reads both. A body reached through an interface port, the tasks and functions of an interface that a virtual interface names (built apart from its instances), and an interface instance nested in an interface still reject the name, with a message that says so instead of reporting it as unresolved. Change-Id: I28d3b609cb367fc65e256f83165b67bb6652a1be
Change-Id: I61f844b8d23676113e7b394cbc1fce34a969aef4
The key of an assignment pattern item names a member or a type: a
parameter of that name is not read there, so `parameter T X = '{A: 1};
parameter A = X.A;` is no cycle.
Change-Id: I2afb5f269c24d450550c4ddd98b1b6a6532da145
The parser accepted these items, which the grammar of IEEE 1800-2023
does not admit there:
for (var [7:0] i = 0; ...) // no data type (12.7.1, Syntax 12-5)
generate ... generate ... endgenerate endgenerate // nested (27.3)
if (A) begin specparam x = 10; end // specparam in a generate block
A for-loop variable declaration names its data type, also after `var`;
generate regions do not nest; and a generate block holds generate items,
which a specparam declaration is not (Syntax 27-1). Each is now a parse
error at the item.
sv-tests imported (ivtest), rejected in 2state and 4state:
sv_var_for_fail, br_gh1117, generate_specparam.
Change-Id: I85af8958287d8185f683018b2af308e91ef16fc1
…ope that binds it A scope that binds an interface instance lowers the instance's processes and the subroutines they call, and with them the dispatchers of virtual methods (IEEE 1800-2023 8.20). Those covered only the classes the binding scope sees itself, through its own imports. When the interface's file imports a package that the binding scope does not, a virtual call from the instance's code on an object of one of that package's classes found no arm and did nothing. In uvm_use_models_pipelined_get_put, top_hdl binds the driver BFM, whose put_response through the driver to the sequence never reached the sequence, so the test stalled at 110 ns. get_name() returned an empty string there too. An interface's symbols now carry the classes it sees, and a scope that binds an instance of it counts their objects among those its dispatchers, casts and constraint programs cover. Its own source still does not see their names. Change-Id: If8bcc56fdf7343dafa21073ef95c96a41d7fd8bf
uvm_use_models_pipelined_get_put passes in both state modes since named events of interfaces trigger through virtual interfaces (#4326) and the scope that binds the driver BFM dispatches to the sequence classes it sees. Change-Id: I3c41665049663f01ad4a8821172c373d91932ba3
…ope that binds it (#4357)
…laration Readers of the unpacked structure type (IEEE 1800-2023 7.2) a type or shape is, or whose elements it has, read the declaration it keeps instead of the unpacked_struct field: - Type::unpacked_struct and VariableDimensions::structure_declaration return the kept declaration, and debug builds check it against the field, which the next change removes. - The fallbacks of Type/VariableDimensions::is_unpacked_struct_in and unpacked_struct_in, for holders without a semantic type yet, take it from there, as do struct_of, the chandle, array-parameter, bound-pattern and layout predicates, the leaves and storage of a structure, and the element of a container. Change-Id: Ib32a5f51720355fa051871e4b010dab82825ac9d
…ports A noncontext DPI-C import cannot call exported subroutines (IEEE 1800-2023 35.5.3) or reach the design through VPI (H.10), so a call whose arguments are inputs passed by value reads and writes nothing of the design but those and its result. Mark such functions isolated: a call of one is no opaque call of the unit that makes it. In the settle, such calls and non-fatal records come only from guarded always @* processes, which run when what they read changed (9.2.2.2, 9.4.2.2). A settle whose inputs did not change makes none of them, so it may be skipped. They remain effects to the plans that run part of a settle or defer it, which would drop the calls the stores they keep do not need. Change-Id: I39d89595dd30226736300b9629ff71e0c625c6d0
…ctions of their own The compiled scheduler of a native image inlined every body it runs, the settle, the FF domains and the kernels, into one function, whose compilation takes time and memory that grow faster than its size: on RTLMeter VeeR-EH1 that one function took 49 s of a 58 s build, 35 s of it in the merged-chain optimization, while the same settle compiled on its own in 2.5 s; on OpenTitan and XuanTie-C910 it holds 7 to 11 million instructions and exhausts memory in register allocation. A native image's scheduler now calls each body of at least 256 SIR instructions as a callee of its own, once however many times the schedule runs it (`LaidOutProgram::scheduler_callees`); the backend compiles the callees in parallel and binds the calls to their kernel slots. A callee that is a unit of the settle calls the settle's own code, so the settle is not compiled twice. The bodies are judged for dirty tracking, records and `$finish` before they are outlined, as before. Smaller bodies stay inline, where a call costs more than the body. A design with a testbench scheduler, which reads the units the compiled scheduler runs from its unit, keeps them inline. `SirPass::SchedulerCallees` selects it, on at every level; `-sir:scheduler_callees` inlines the bodies again. Change-Id: I187ff0ab4f748b105638132ba57b2421123ea341
…y read The width of a run-time part-select of a variable, as `v[i*4 +: 4]`, is found by evaluating its bounds with the run-time operands at zero. Each such select copied the module's whole table of constants and added every variable of the module at zero to the copy, so a module with many selects and many variables paid for both in every select: Caliptra's lowering spent about a third of its instance glue in it. A checked single-bit select copied the constants likewise to bind its index. The bounds are now evaluated with a table of only the names they read, each a constant of the module or a variable at zero; a bound that calls a function, whose body may read other names, still gets the whole table. On a module of 3,000 variables and 2,000 run-time part-selects, the build takes 12.1% fewer instructions (21.20 G to 18.63 G, perf stat instructions:u) and 12.9% fewer cycles, with the same output; VeeR-EL2, whose modules have few such selects, is unchanged (362.80 G to 362.74 G). Change-Id: Id65630055556b8964032a5689b5c33d66eb52fea
A partitioned settle was rejected for the whole design as soon as one path held a captured value or a pre-lowered node, which every combinational deferred assertion or `$display` in an `always_comb` makes: the observer's statement positions lower its guard and arguments once and the capture event reuses them through the lowering cache, which a partition boundary clears. BlackParrot has eight such assertions (`bsg_circular_ptr`) and so never got a partitioned settle. No partition now starts within the work from the first to the last that lowers such a node, so the reuse stays within one partition and only those partitions grow; the rest of the design is partitioned as before. RTLMeter BlackParrot 1x1 cmark (native, O2, two-state, +partitioned_settle, 20k cycles, interleaved, min of 2): 397 -> 116 us per cycle; peak RSS 7.4 -> 1.7 GB. Change-Id: Ieaae6b96319c2fb520305f10ca6c5fdf13e6aed6
…ctions of their own (#4364)
The types of a scope's constants were a shared `Arc<HashMap>` that every scope snapshot holds, and the discovery of each parameter removed and inserted its own type with `Arc::make_mut`: while a snapshot shared the table, that copied every type in it, once per parameter. A design whose packages and modules declare many parameters, as BlackParrot's configuration does, paid for the whole table in each of them; the copies were the largest single cost of its discovery. The table is now persistent, as the tables of constant values and type aliases of a scope already are (`ConstEnv`, `TypeAliases`): a scope that binds or hides a few types copies only the paths to them. The helpers that hide and bind types in both kinds of table take either. BlackParrot (1x1 cmark) builds with 9.3% fewer instructions (4,482.3 G to 4,066.7 G, perf stat instructions:u, the same in two runs per side); its cycles move with the machine's load by more than that (the same build measured 1,984 G and 2,499 G), and in the second pair they were 2.7% lower. VeeR-EL2, whose scopes declare few parameters, is unchanged. Change-Id: If09915a7641bc897b91f79b52f1cef8edac035a2
The unpacked structure type (IEEE 1800-2023 7.2) of a type was recorded twice: in the declaration the type keeps, and in the unpacked_struct field of its shape, which conversion and readers no longer need. The fields go: - TypeShape and VariableShape lose unpacked_struct. keep_structure sets only the kept declaration, and shapes made from other shapes take it through VariableDimensions::derived. - Two types, or two shapes, are equal only if they keep the same structure, by its identity (6.22.1); the closed-shape cache, which keys on the shape alone, skips shapes that keep one, as before. - An aggregate store's flat value forgets the structure with Type::forget_structure instead of clearing the field. - Conversion and the readers drop their debug cross-checks against the field. Change-Id: Ifcce69864cf55144cac9fa2f398a776ea0ba3526
A dispatcher of a virtual method has an arm for each class the scope that lowers it sees (IEEE 1800-2023 8.20). An object of another class, which code of that scope can still hold, matched no arm and fell through to the null check, so the call did nothing and a function returned its default value: get_name() returned an empty string. Such a call is now a fatal error that names the method, the scope that dispatched it and the object's class identifier, until the dispatchers cover every class of the design (#4358). Change-Id: Ia577f0533213786f7e0b0566483eb9fd92270dc3
Resolve conflicts: keep master's execution-time memory file loading (drop develop's file_dependencies plumbing), keep develop's Veryl HEAD reset_type plumbing and reset_edge_cases test, and adapt the readmem destination index to Veryl HEAD's VarIndex::indices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is a merge queue draft opened by Mergify. Its pull request has merged, and nobody needs to act on it.
Mergify opened it for batch sacred-chabichou-dv0vrz of the
integrationqueue, to test #4221 before it merged intodevelop.🎉 What landed
Mergify merged its pull request into
develop, then closed this draft:c7f1278This draft's code was built in this order:
developat70d6636Metadata for CI tooling, read by
mergify ci1 scope
coreRequired conditions of queue rule
integrationfor mergecheck-success = Conventional Commit titlecheck-success = Queue validationcheck-success = Verify workflow lockfiledevelop]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatdevelop]:check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)check-success = @github-actions/NAPI Build (Linux ARM64 GNU)develop]:check-skipped = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-success = @github-actions/NAPI Build (Windows)develop]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Builddevelop]:check-success = @github-actions/JS Test (Ubuntu)check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)develop]:check-skipped = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-success = @github-actions/JS Test (Windows)develop]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit titledevelop]:check-success = @github-actions/Verify workflow lockfilecheck-neutral = @github-actions/Verify workflow lockfilecheck-skipped = @github-actions/Verify workflow lockfileRequired conditions to stay in the queue
-conflict-draft-label = release:holdbase ~= ^(master|develop)$head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)head != release-please--branches--master--components--celoxlabel = merge-readydevelop]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatdevelop]:check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)check-success = @github-actions/NAPI Build (Linux ARM64 GNU)develop]:check-skipped = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-success = @github-actions/NAPI Build (Windows)develop]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Builddevelop]:check-success = @github-actions/JS Test (Ubuntu)check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)develop]:check-skipped = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-success = @github-actions/JS Test (Windows)develop]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit titledevelop]:check-success = @github-actions/Verify workflow lockfilecheck-neutral = @github-actions/Verify workflow lockfilecheck-skipped = @github-actions/Verify workflow lockfile