Skip to content

rtl: integrate packetized LSC-1 on ULX3S#24

Merged
Th0rgal merged 19 commits into
fpga/ulx3s-smoke-uart-mincorefrom
agent/integrate-lsc1-packet-fpga
Jul 27, 2026
Merged

rtl: integrate packetized LSC-1 on ULX3S#24
Th0rgal merged 19 commits into
fpga/ulx3s-smoke-uart-mincorefrom
agent/integrate-lsc1-packet-fpga

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jul 26, 2026

Copy link
Copy Markdown
Member

What changed

  • connects the packet frontend to the existing 8-bit ready/valid MinCore datapath through an explicit stream adapter
  • makes lean_silicon_lsc1 the packetized product top while preserving a separate raw MinCore diagnostic top
  • expands packet reception to 256 bytes and implements NEGOTIATE, STATUS, SET/XOR/MUL, DEREF Cell/Pc/Fp, JUMP, staged RETIRE, transaction guards and atomic state updates
  • adds lsc1_field_encoder, reusing the streaming multiplier to verify encoded JUMP destinations
  • adds packet-safe UART BREAK abort/recovery and fixes false 0xff reception after framing errors
  • extends the host compiler/runtime and RTL↔Python differential tests through DEREF and JUMP
  • adds the physical packet UART driver, official-program runner, adversarial transport tests and reproducible ULX3S package recipe
  • incorporates the latest PR fpga: ULX3S v3.1.8 smoke + 1 Mbaud UART bridge to exact lean_silicon_lsc1 (MinCore) #16 foundation head c2ea7f1b299d5e293eaa1524335e671d78dc4999

Root causes fixed

The initial adapter deadlocked SET/XOR because those MinCore operations emit output during payload ingestion. The UART receiver also re-armed while BREAK was still low, producing a spurious 0xff and BAD_SOF. Finally, the 94-byte packet buffer could not hold the 103-byte JUMP request. These paths now have regression coverage.

Validation at head 33b4c81416d367e230b4ecb28b1c857d43f4bbab

  • 266 executable-model tests pass
  • 231 FPGA harness tests pass (one expected pyserial environment skip)
  • MinCore, legacy UART, packet UART, adversarial frontend, mutation and byte-exact RTL/Python differential simulations pass
  • DEREF Cell/Pc/Fp and JUMP taken/not-taken success vectors pass in RTL differential tests
  • BAD_POINTER, DEREF_MISMATCH, BAD_BRANCH_PROPOSAL and BAD_INVERSE recovery vectors pass
  • Yosys hierarchy/check and generic synthesis pass
  • latest completed route: 44.02 MHz PASS at 25 MHz; 18,262 LUT4 and 5,940 FF

Physical ULX3S evidence

SRAM-only validation was performed on LFE5U-85 IDCODE 0x41113043 at 1 Mbaud; no flash write was performed.

  • bitstream SHA-256: af78dcea8ac2a493b50f1a7fc293c20ed81f4052bdb58c6443c58e46da76d723
  • two builds produced byte-identical bit/config/SVF outputs
  • official assert_set_xor_mul completes all 13 records, including JUMP, reaches PC 15 and reports full MATCH
  • final 12 memory cells compare byte-for-byte with the frozen Rust artefact
  • physical DEREF Cell/Pc/Fp, BAD_POINTER and BAD_INVERSE pass
  • partial JUMP + UART BREAK emits no response or partial commit; STATUS reports the abort and a following SET/RETIRE succeeds

This physical image was produced before the final merge-only reconciliation commit. The interrupted exact-33b4c81 rebuild must be rerun on the new hardware host before claiming an authenticated exact-head package.

Current limits / handoff


Note

High Risk
Large RTL and protocol-surface change to the product top, transaction semantics, and host runtime; correctness relies on simulation/differential evidence rather than full formal refinement.

Overview
lean_silicon_lsc1 is now the packetized product top: it instantiates lsc1_packet_frontend instead of raw leanvm_b_stream_alu, with the old stream-ALU harness moved to lean_silicon_lsc1_mincore for diagnostics.

New RTL glue (lsc1_stream_adapter, lsc1_field_encoder) drives MinCore over the existing 8-bit stream and re-encodes pointer witnesses for DEREF/JUMP. The packet frontend grows to the full scalar subset—NEGOTIATE, STATUS, SET/XOR/MUL, DEREF Cell/Pc/Fp, JUMP, staged RETIRE—via the stream adapter instead of a dedicated GF128 multiplier block; RX payload storage widens to 256 bytes for JUMP frames.

Host and validation extend through DEREF/JUMP (frozen fixture now full MATCH), plus RTL↔Python byte-exact differential tests, packet UART sims, and a physical lsc1_packet_uart driver. FPGA adds packet-mode UART (BREAK abort, no 0x7f in-band abort), ulx3s_packet_top / build recipe, and CI Yosys closure over the packet RTL stack.

Reviewed by Cursor Bugbot for commit dcd6bf3. Bugbot is set up for automated code reviews on this repo. Configure here.

@Th0rgal
Th0rgal marked this pull request as ready for review July 26, 2026 20:32
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_d1092f2e-2494-4a9b-82cb-dd6320520f1d)

@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_819cf02f-505d-43aa-a8b4-99c5d85fc0ec)

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

ℹ️ 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 fpga_harness/host/lsc1_packet_uart.py Outdated
Comment thread fpga_harness/host/lsc1_packet_uart.py Outdated
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_5cfdfee5-b1d1-4031-8915-cae81c6fd2bf)

@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: 4c7f4a3e80

ℹ️ 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 fpga_harness/host/lsc1_packet_uart.py Outdated
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1602aa5e-fcfc-4d76-8c96-af8bbd6d0eb4)

@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: 1f9d185ade

ℹ️ 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 fpga_harness/host/lsc1_packet_uart.py
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_53be3f7d-c87f-4206-8342-a21ab7579a48)

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

ℹ️ 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 fpga_harness/host/lsc1_packet_uart.py Outdated
Comment thread fpga_harness/host/lsc1_packet_uart.py
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8d81ce6b-a54a-46dd-bc14-7e54b0bccfbe)

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

ℹ️ 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 fpga_harness/host/lsc1_packet_uart.py
Comment thread fpga_harness/host/lsc1_packet_uart.py Outdated
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1149c8f0-8ddf-4f80-b28e-b506fbd21e7b)

@Th0rgal
Th0rgal merged commit 79c7ff4 into fpga/ulx3s-smoke-uart-mincore Jul 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant