Repository navigation
feat(cli)!: share SystemVerilog compilation units across ordered source files - #2724
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d70e3bcf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Revision history
|
8d70e3b to
180f0cb
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 180f0cbed1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ce files `celox run -f rtlmeter.f` previously restarted preprocessing for every source, so macros defined in a configuration header disappeared before later RTL files. The CLI now treats its ordered source list as one compilation unit by default. Definitions, undefinitions, directives and unit declarations carry forward; relative includes resolve against their own source files. Lists accept .h, .vh and .svh headers alongside .v/.sv sources, including a leading header. Use --separate-units or single_unit = false in celox.toml to retain per-file isolation; --single-unit overrides a project setting. Both run and vpi build use the same selection. Rust source-list APIs keep their existing per-file contract; syntax::preprocess_sources explicitly preprocesses a shared unit. IEEE 1800-2023 3.12.1 requires both compilation models and leaves the default to tools. Preserve file boundaries in expanded text with line directives. Separate tokens introduced by expansions so a macro's unary minus followed by -1 remains - -1, rather than becoming the decrement --1. Explicit token pastes remain intact; macro substitution in based literals remains supported. Comments do not terminate escaped identifiers: expansion boundaries insert actual whitespace before comments, and EOF line comments end before an included file's caller. Closes #2128. Validation: project_cli (22 passed), syntax crate (137 passed), compilation_units (3 passed), analyzer syntax tests (7 passed), analyzer doctests, affected-crate clippy and cargo fmt. With #2133, RTLmeter hello passes in four-state on E902 (native, 5392 cycles) and E906 (native and tiered, 9816 cycles). After the token serialization fix, both designs retain their effective token streams (174054 and 497628 tokens; based-literal whitespace normalized per IEEE 5.7.1). Change-Id: I9acd28e899919795f02894d6fcc118ef68667d63
180f0cb to
c1b6cdb
Compare
✅ Merged into
|
celox run -f rtlmeter.fpreviously restarted preprocessing for every source,so macros defined in a configuration header disappeared before later RTL files.
The CLI now treats its ordered source list as one compilation unit by default.
Definitions, undefinitions, directives and unit declarations carry forward;
relative includes resolve against their own source files. Lists accept .h,
.vh and .svh headers alongside .v/.sv sources, including a leading header.
Use --separate-units or single_unit = false in celox.toml to retain per-file
isolation; --single-unit overrides a project setting. Both run and vpi build
use the same selection. Rust source-list APIs keep their existing per-file
contract; syntax::preprocess_sources explicitly preprocesses a shared unit.
IEEE 1800-2023 3.12.1 requires both compilation models and leaves the default
to tools. Preserve file boundaries in expanded text with line directives. Separate tokens
introduced by expansions so a macro's unary minus followed by -1 remains
intact; macro substitution in based literals remains supported. Comments do not
terminate escaped identifiers: expansion boundaries insert actual whitespace
before comments, and EOF line comments end before an included file's caller.
Closes #2128.
Validation: project_cli (22 passed), syntax crate (137 passed), compilation_units
(3 passed), analyzer syntax tests (7 passed), analyzer doctests, affected-crate
clippy and cargo fmt. With #2133, RTLmeter hello passes in four-state on E902
(native, 5392 cycles) and E906 (native and tiered, 9816 cycles). After the token
serialization fix, both designs retain their effective token streams (174054
and 497628 tokens; based-literal whitespace normalized per IEEE 5.7.1).