Skip to content

feat(cli)!: share SystemVerilog compilation units across ordered source files - #2724

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-shared-unit/share-systemverilog-compilation-units-across--9acd28e8
Oct 31, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-shared-unit/share-systemverilog-compilation-units-across--9acd28e8

Conversation

@tignear

@tignear tignear commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T11:43:50.699164Z c1b6cdb New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/celox-sv-analyzer/src/syntax.rs Resolved
@tignear tignear added release:hold Prevent the release pull request from merging and removed merge-ready Request merging through Mergify after required checks labels Oct 31, 2026
@tignear

tignear commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 8d70e3b 2026-10-31 11:19 UTC
2 content 8d70e3b → 180f0cb Preserve serialized preprocessing token boundaries after review discussion_r4431486006; cover unary operators, numeric macro fragments and explicit token pasting. 2026-10-31 11:19 UTC
3 content 180f0cb → c1b6cdb Terminate expanded escaped identifiers before comments after discussion_r4431531132; also preserve slash/comment boundaries and included-file EOF line comments. 2026-10-31 11:40 UTC

@tignear
tignear force-pushed the stack/tignear/feat/sv-shared-unit/share-systemverilog-compilation-units-across--9acd28e8 branch from 8d70e3b to 180f0cb Compare October 31, 2026 11:19
@tignear tignear removed the release:hold Prevent the release pull request from merging label Oct 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@tignear tignear added the release:hold Prevent the release pull request from merging label Oct 31, 2026
…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
@tignear
tignear force-pushed the stack/tignear/feat/sv-shared-unit/share-systemverilog-compilation-units-across--9acd28e8 branch from 180f0cb to c1b6cdb Compare October 31, 2026 11:41
@tignear tignear added merge-ready Request merging through Mergify after required checks and removed release:hold Prevent the release pull request from merging labels Oct 31, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 31, 2026
@mergify

mergify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as eb7afe2 at 12:19 UTC

13 min in the queue, 11 min of it CI.

So far

9 merge conditions met
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • check-success = Verify workflow lockfile
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Queue validation
    • check-neutral = @github-actions/Queue validation
    • check-skipped = @github-actions/Queue validation
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Verify workflow lockfile
    • check-neutral = @github-actions/Verify workflow lockfile
    • check-skipped = @github-actions/Verify workflow lockfile

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit eb7afe2 into master Oct 31, 2026
29 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-shared-unit/share-systemverilog-compilation-units-across--9acd28e8 branch October 31, 2026 12:19
@mergify mergify Bot removed the queued Mergify queue entry label Oct 31, 2026
@github-actions github-actions Bot mentioned this pull request Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SV: macros from one source file are not visible in later files of the same compilation (blocks rtlmeter VeeR-EL2/EH1)

1 participant