Skip to content

feat(sv): provide UVM's DPI-C functions - #2471

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552
Oct 31, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

sv-tests runs UVM without UVM_NO_DPI and without UVM's C library, so uvm_pkg imports 23 DPI-C functions that no library defines. Celox now provides them: an import with one of their C names and UVM's prototype binds to a builtin instead of a C function, needs no sv-dpi feature, and is lowered to heap operations on every backend. Other imports are unchanged.

uvm_re_comp, uvm_re_exec, uvm_re_free, uvm_re_compexec, uvm_re_compexecfree, uvm_re_buffer and uvm_re_deglobbed follow UVM's uvm_regex.cc, including its glob translation and error buffer; expressions are compiled with the regex crate and their handles are chandles that survive checkpoints as patterns. uvm_dpi_get_next_arg_c returns celox followed by the simulation's plusargs, and the tool name and version are Celox's. The uvm_hdl_* and uvm_polling_* imports bind too, but return 0 or null and leave their outputs unchanged until they are implemented, so UVM reports them as unavailable.

Depends-On: #2464

@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 the chandle type #2464
2 feat(sv): provide UVM's DPI-C functions #2471 👈

@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-31T10:33:03.816849Z 229f7a0 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: 2b9bd110da

ℹ️ 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/src/simulator.rs Resolved
Comment thread crates/celox-heap/src/uvm_dpi.rs Resolved
Comment thread crates/celox-heap/src/uvm_dpi.rs Resolved
@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-chandle/support-chandle-type--ad6401e7 branch from b611015 to 5f47b1f Compare October 28, 2026 18:53
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 2b9bd11 to ae2b6ed Compare October 28, 2026 18:53
@tignear

tignear commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 2b9bd11 2026-10-28 18:52 UTC
2 content 2b9bd11 → ae2b6ed Review fixes: the traced builder seeds the UVM arguments (set_plusargs); freed regex handles release their registry entries (maps keyed by never-reused handles); . matches newlines as without REG_N… 2026-10-28 18:52 UTC
3 content ae2b6ed → b68bd3d 2026-10-28 19:42 UTC
4 content b68bd3d → 39117e2 (raw) 2026-10-28 21:07 UTC
5 rebase 39117e2 → cd728ef (rebase only) 2026-10-28 22:33 UTC
6 content cd728ef → 4214606 Rebased onto master (#2423: ops.rs keeps both the %p container arms and the UVM op range; no op number overlap). 2026-10-29 01:13 UTC
7 rebase 4214606 → 2d3b27b (rebase only) 2026-10-29 02:13 UTC
8 rebase 2d3b27b → ce1635b (rebase only) 2026-10-29 03:12 UTC
9 rebase ce1635b → fbd410d (rebase only) 2026-10-29 08:21 UTC
10 content fbd410d → 9eb7d53 2026-10-29 09:07 UTC
11 rebase 9eb7d53 → 21e2b8b (rebase only) 2026-10-29 09:46 UTC
12 content 21e2b8b → c158086 2026-10-29 10:32 UTC
13 content c158086 → 1ddcaee 2026-10-29 10:53 UTC
14 content 1ddcaee → d35d130 (raw) 2026-10-29 11:45 UTC
15 content d35d130 → 0de3b37 2026-10-29 16:31 UTC
16 content 0de3b37 → 863533a (raw) 2026-10-29 18:25 UTC
17 rebase 863533a → 6b4df97 (rebase only) 2026-10-29 19:21 UTC
18 rebase 6b4df97 → 69197ab (rebase only) 2026-10-29 20:25 UTC
19 content 69197ab → 90ab48c 2026-10-29 22:24 UTC
20 rebase 90ab48c → 7b58ca6 (rebase only) 2026-10-29 23:26 UTC
21 rebase 7b58ca6 → c5ae9e0 (rebase only) 2026-10-30 00:13 UTC
22 rebase c5ae9e0 → 8b4a49d (rebase only) 2026-10-30 03:53 UTC
23 rebase 8b4a49d → 64582bd (rebase only) 2026-10-30 05:10 UTC
24 content 64582bd → f0feefa Codex rounds on 8b4a49d/64582bd: DPI-C output actuals are included in module-wide driver discovery (DriverScan, kernel window writes); builtin output actuals check their tagged union members. 2026-10-30 07:31 UTC
25 rebase f0feefa → c6b33d5 (rebase only) 2026-10-30 08:26 UTC
26 rebase c6b33d5 → 5f68ff1 (rebase only) 2026-10-30 10:08 UTC
27 rebase 5f68ff1 → c3f13a5 (rebase only) 2026-10-30 11:02 UTC
28 rebase c3f13a5 → 90347dd (rebase only) 2026-10-30 12:19 UTC
29 rebase 90347dd → 5b4cdcc (rebase only) 2026-10-30 13:40 UTC
30 rebase 5b4cdcc → 9543891 (rebase only) 2026-10-30 15:46 UTC
31 rebase 9543891 → 03ada79 (rebase only) 2026-10-30 16:57 UTC
32 rebase 03ada79 → 55d82fc (rebase only) 2026-10-30 18:02 UTC
33 rebase 55d82fc → e079841 (rebase only) 2026-10-30 18:58 UTC
34 rebase e079841 → 2283b09 (rebase only) 2026-10-30 19:35 UTC
35 rebase 2283b09 → c441a1c (rebase only) 2026-10-31 07:21 UTC
36 content c441a1c → 3d48c11 Builtin outputs forwarded from a reference formal bound to a class property are stored to the property, as for subroutine copy-out (Codex review). 2026-10-31 08:45 UTC
37 content 3d48c11 → 229f7a0 Rebased on master after #2695. 2026-10-31 10:29 UTC

@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: ae2b6edece

ℹ️ 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-heap/src/uvm_dpi.rs Resolved
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from ae2b6ed to b68bd3d Compare October 28, 2026 19:42
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 78b1990 to 43c3409 Compare October 28, 2026 21:07
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from b68bd3d to 39117e2 Compare October 28, 2026 21:07
@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-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 39117e2 to cd728ef Compare October 28, 2026 22:33
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from 43c3409 to dd6027d Compare October 28, 2026 22:33

@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: cd728ef0d6

ℹ️ 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-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from cd728ef to 4214606 Compare October 29, 2026 01:16
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 3578434 to 1240829 Compare October 29, 2026 02:13
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch 2 times, most recently from 2d3b27b to ce1635b Compare October 29, 2026 03:13
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 04aab86 to d2047ec Compare October 29, 2026 08:21
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from ce1635b to fbd410d Compare October 29, 2026 08:21

@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: fbd410d5fd

ℹ️ 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-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from fbd410d to 9eb7d53 Compare October 29, 2026 09:08
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 69eff2c to 40f0ba4 Compare October 29, 2026 09:47
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 9eb7d53 to 21e2b8b Compare October 29, 2026 09:47
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from c4efc63 to 02542ef Compare October 30, 2026 07:31
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from f0feefa to c6b33d5 Compare October 30, 2026 08:30
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from 02542ef to a58b08a Compare October 30, 2026 08:30
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from c6b33d5 to 5f68ff1 Compare October 30, 2026 10:09
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 9a01c12 to c329861 Compare October 30, 2026 11:08
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch 2 times, most recently from c3f13a5 to 90347dd Compare October 30, 2026 12:20
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from c329861 to 6e93e4c Compare October 30, 2026 12:20
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 90347dd to 5b4cdcc Compare October 30, 2026 13:40
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 6e76bf0 to e2fd8ca Compare October 30, 2026 15:47
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch 2 times, most recently from 9543891 to 03ada79 Compare October 30, 2026 16:58
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from e2fd8ca to 246b9db Compare October 30, 2026 16:58
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 03ada79 to 55d82fc Compare October 30, 2026 18:03
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from 246b9db to 42bdbc0 Compare October 30, 2026 18:03
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 55d82fc to e079841 Compare October 30, 2026 18:58
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch 2 times, most recently from 82d768f to e621b25 Compare October 30, 2026 19:35
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from e079841 to 2283b09 Compare October 30, 2026 19:35
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/support-chandle-type--ad6401e7 branch from e621b25 to ce03444 Compare October 31, 2026 07:22
@tignear
tignear force-pushed the stack/tignear/feat/sv-chandle/provide-uvm-s-dpi-c-funcs--2b0f2552 branch from 2283b09 to c441a1c Compare October 31, 2026 07:22

@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: c441a1c709

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

sv-tests runs UVM without `UVM_NO_DPI` and without UVM's C library, so `uvm_pkg` imports 23 DPI-C functions that no library defines. Celox now provides them: an import with one of their C names and UVM's prototype binds to a builtin instead of a C function, needs no `sv-dpi` feature, and is lowered to heap operations on every backend. Other imports are unchanged.

`uvm_re_comp`, `uvm_re_exec`, `uvm_re_free`, `uvm_re_compexec`, `uvm_re_compexecfree`, `uvm_re_buffer` and `uvm_re_deglobbed` follow UVM's `uvm_regex.cc`, including its glob translation and error buffer; expressions are compiled with the `regex` crate and their handles are chandles that survive checkpoints as patterns. `uvm_dpi_get_next_arg_c` returns `celox` followed by the simulation's plusargs, and the tool name and version are Celox's. The `uvm_hdl_*` and `uvm_polling_*` imports bind too, but return 0 or null and leave their outputs unchanged until they are implemented, so UVM reports them as unavailable.

Change-Id: I2b0f2552448c89bc9e36059a003751df77a6a5f7
@mergify

mergify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as e16ae75 at 11:33 UTC

Merged together with #2707. 14 min in the queue, 8 min of it CI.

So far

10 merge conditions met
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • check-success = Verify workflow lockfile
  • any of:
    • depends-on = celox-sim/celox#2464
    • number != 2471
  • 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

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