Skip to content

Optimize RTL for synthesis and strictly comply with Verilator linting#3

Open
RafailDD wants to merge 2 commits into
jules-experimentingfrom
feat/optimize-rtl-synthesis-18043434795401579258
Open

Optimize RTL for synthesis and strictly comply with Verilator linting#3
RafailDD wants to merge 2 commits into
jules-experimentingfrom
feat/optimize-rtl-synthesis-18043434795401579258

Conversation

@RafailDD
Copy link
Copy Markdown
Owner

@RafailDD RafailDD commented May 1, 2026

Optimizes the packet_handler.v RTL to better support Block RAM synthesis and strictly comply with Verilator lint checking. Includes safety patches to array indexing and register resets.


PR created automatically by Jules for task 18043434795401579258 started by @RafailDD

- Updated packetTracker reset logic using SYNTHESIS guards to enable BRAM inference instead of 1024 registers.
- Corrected o_data width to 296 bits in asynchronous reset and default conditions.
- Added synchronous reset logic for o_packetLostReg during standard resets and non-active states.
- Handled out-of-bounds indexing risk for packetTracker using index truncation on streamId (5-bits for 32 elements array).
- Fixed missing EOF newline.
- Masked expected UNUSEDSIGNAL warnings using Verilator lint pragmas.
- Ensured all tests via cocotb pass successfully.

Co-authored-by: RafailDD <123392637+RafailDD@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Add synchronous read/write Block RAM structure for `packetTracker` explicitly bound to the `SYNTHESIS` macro.
- Add index address preparation in cycle 1 (`IN_W1`) and synchronous execution in cycle 2 (`IN_W2`).
- Retain exact legacy simulation array behavior in non-synthesis block.
- Address linting errors (`UNUSEDSIGNAL`) cleanly with pragmas.
- Prevent regression out-of-bounds indexing by using correct 5-bit bounds mapping logic without hard overrides on 0 index.

Co-authored-by: RafailDD <123392637+RafailDD@users.noreply.github.com>
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