You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add initial values to primitive sequential models - #545
Primitive sequential models can now describe power-up state using init: 0 | 1 or init_from: {"parameter": "INIT_VAL", "bit": 0}. Both static models and parameter-selected tables support these fields, and C++/Python instance resolvers read current instance overrides or design defaults. Unknown or missing values remain free; missing parameter declarations are rejected when the model is defined.
Sequential models were previously kept only in memory. This change saves their expressions, state/output order, parameter tables, and initial-value metadata through a versioned NajaIF dumpable property, including restoration in a fresh process. Snapshot writing rejects models with missing or foreign terminals while retaining existing in-memory consumer diagnostics. The built-in Xilinx flip-flop models now declare their INIT sources, and the raw Python API documentation describes the new fields and resolver.
Validation
CMake modeling and Cap'n Proto round-trip regressions, including foreign-terminal rejection.
Raw Python model tests (32 passing) and primitive-library tests (8 passing).
Full determinism contract and the new five-process sequential-model snapshot regression.
Sphinx HTML build with the built-in theme and reuse lint.
git diff --check.
Bazel was not run locally; no build-system or dependency revisions change in this PR.
Follow-up scope
The kepler-formal SEC consumer, its end-to-end regressions, and its documentation are tracked separately in keplertech/kepler-formal#319, after this Naja API is available.
An RTL register without an initial value remains free even when synthesis chooses a fixed power-up value. Automatically equating undefined RTL initial values with the netlist is outside this change. Reset bootstrap (sec_reset) remains the workflow for designs initialized by reset.
Merging this PR will degrade performance by 18.54%
3 warnings
⚠️13 benchmarks are dominated by system calls
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
⚠️2 benchmarks with a significant change ran on different hardware
Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.
⚠️2 benchmarks with a significant change ran in a different software environment
Their base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the changes might come from this difference rather than from the code. Open an affected benchmark to see what changed.
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
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.
Primitive sequential models can now describe power-up state using
init: 0 | 1orinit_from: {"parameter": "INIT_VAL", "bit": 0}. Both static models and parameter-selected tables support these fields, and C++/Python instance resolvers read current instance overrides or design defaults. Unknown or missing values remain free; missing parameter declarations are rejected when the model is defined.Sequential models were previously kept only in memory. This change saves their expressions, state/output order, parameter tables, and initial-value metadata through a versioned NajaIF dumpable property, including restoration in a fresh process. Snapshot writing rejects models with missing or foreign terminals while retaining existing in-memory consumer diagnostics. The built-in Xilinx flip-flop models now declare their
INITsources, and the raw Python API documentation describes the new fields and resolver.Validation
reuse lint.git diff --check.Bazel was not run locally; no build-system or dependency revisions change in this PR.
Follow-up scope
The kepler-formal SEC consumer, its end-to-end regressions, and its documentation are tracked separately in keplertech/kepler-formal#319, after this Naja API is available.
An RTL register without an initial value remains free even when synthesis chooses a fixed power-up value. Automatically equating undefined RTL initial values with the netlist is outside this change. Reset bootstrap (
sec_reset) remains the workflow for designs initialized by reset.