Skip to content

feat(sv): support the $swrite family - #2403

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764

Conversation

@tignear

@tignear tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Implement $swrite, $swriteb, $swriteo and $swriteh (IEEE 1800-2023
21.3.3). Like $write, a string literal that no conversion consumes is a
format, a later one included, and each value without a conversion of its own
is written in the task's radix, a string as text and a real as $write writes
it. $display, $write, $fdisplay and $fwrite now also treat a later
unconsumed string literal as a further format, as Verilator, Icarus and xezim
do (21.2.1.1), instead of printing its conversions literally. The analyzer
builds that format and binds the call as the $sformatf string operation,
then assigns the result to the output, a string variable, a function's return
variable or a string class property.

The shared swrite_matches_write case compares each form with $write of the
same arguments; Verilator 5.052, Icarus 13.0 and xezim 0.11.3 pass it.

Depends-On: #2402

@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(sv): support $sformatf and $sformat #2402
2 feat(sv): support the $swrite family #2403 👈
3 feat(sv): support %p for integral, string, handle and container values #2423

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T19:17:39.301282Z 0e81942 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.

@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: 3daf51501f

ℹ️ 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 merge-ready Request merging through Mergify after required checks and removed merge-ready Request merging through Mergify after required checks labels Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from 290e018 to 27e5a3d Compare October 28, 2026 08:40
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from 3daf515 to b940cca Compare October 28, 2026 08:40
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3daf515 2026-10-28 08:40 UTC
2 content 3daf515 → b940cca Address Codex review on #2402: include omitted-argument defaults in host-request detection; keep runtime format bytes instead of lossy UTF-8 decoding. 2026-10-28 08:40 UTC
3 content b940cca → 0ed3f7e 2026-10-28 10:18 UTC
4 content 0ed3f7e → 91edc39 2026-10-28 11:31 UTC
5 content 91edc39 → b2997d3 (raw) 2026-10-28 12:53 UTC
6 content b2997d3 → 8f07632 2026-10-28 13:52 UTC
7 content 8f07632 → ce4dbef 2026-10-28 16:23 UTC
8 content ce4dbef → 5edf99e (raw) 2026-10-28 17:51 UTC
9 rebase 5edf99e → 0e81942 (rebase only) 2026-10-28 19:14 UTC

@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from b940cca to 0ed3f7e Compare October 28, 2026 10:19
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from 27e5a3d to d484bec Compare October 28, 2026 10:19

@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: 0ed3f7ebcc

ℹ️ 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".

@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: 0ed3f7ebcc

ℹ️ 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 force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from d484bec to 3703011 Compare October 28, 2026 11:32
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from 0ed3f7e to 91edc39 Compare October 28, 2026 11:32
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from 3703011 to f7aeb22 Compare October 28, 2026 12:54
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from 91edc39 to b2997d3 Compare October 28, 2026 12:54
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 28, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from b2997d3 to 8f07632 Compare October 28, 2026 13:52
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from f7aeb22 to 5ab0f09 Compare October 28, 2026 13:52

@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: 8f076321cc

ℹ️ 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".

@mergify mergify Bot added the queued Mergify queue entry label Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

22 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Wed 28 Oct, 14:51 · rule changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue 15:13 · 8f07632

Reason

Pull request #2403 has been dequeued

Queue conditions are not satisfied:

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 28, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from 8f07632 to ce4dbef Compare October 28, 2026 16:23
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from 5ab0f09 to bfa9061 Compare October 28, 2026 16:23
@mergify mergify Bot removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 28, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from ce4dbef to 5edf99e Compare October 28, 2026 17:52
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from bfa9061 to 242cd1f Compare October 28, 2026 17:52
@mergify mergify Bot added the queued Mergify queue entry label Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

2 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Wed 28 Oct, 18:17 · rule changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue 18:19 · 5edf99e

Reason

Pull request #2403 has been dequeued

Queue conditions are not satisfied:

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 28, 2026
Implement `$swrite`, `$swriteb`, `$swriteo` and `$swriteh` (IEEE 1800-2023
21.3.3). Like `$write`, a string literal that no conversion consumes is a
format, a later one included, and each value without a conversion of its own
is written in the task's radix, a string as text and a real as `$write` writes
it. `$display`, `$write`, `$fdisplay` and `$fwrite` now also treat a later
unconsumed string literal as a further format, as Verilator, Icarus and xezim
do (21.2.1.1), instead of printing its conversions literally. The analyzer
builds that format and binds the call as the `$sformatf` string operation,
then assigns the result to the output, a string variable, a function's return
variable or a string class property.

The shared swrite_matches_write case compares each form with `$write` of the
same arguments; Verilator 5.052, Icarus 13.0 and xezim 0.11.3 pass it.

Change-Id: Ie03af76400361cd0410abcac91959d1c272c56a1
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc branch from 242cd1f to 85f9c72 Compare October 28, 2026 19:15
@tignear
tignear force-pushed the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch from 5edf99e to 0e81942 Compare October 28, 2026 19:15
@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as ce7228e at 20:59 UTC

1 h 10 min in the queue, 42 min of it CI.

So far

Merge conditions: 8 of 8 met

This pull request

Condition
✅ depends-on = celox-sim/celox#2402

The batch, tested on draft #2488

Condition Required by
✅ check-success = Conventional Commit title —
✅ check-success = Queue validation —
✅ any of: check-success = @github-actions/Lint & Format, check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Rust Test & NAPI Build, check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/JS Test (Ubuntu), check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Conventional Commit title, check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Queue validation, check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation GitHub repository ruleset rule master

Times in UTC · dashboard · how the merge queue works

Base automatically changed from stack/tignear/feat/sv-uvm-string-format/support-sformatf-sformat--fe5fd5bc to master October 28, 2026 20:55
@mergify
mergify Bot merged commit ce7228e into master Oct 28, 2026
25 of 44 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-uvm-string-format/support-swrite-family--e03af764 branch October 28, 2026 20:59
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 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.

1 participant