google / google/xls

[enhancement] Block Conversion for New-Style Procs

Open
#1,652 0 comments 0 reactions 0 assignees View on GitHub
codegen enhancement stitching 🧦 sox
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 12h
Merged PRs (30d)
130

Description

### What's hard to do? (limit 100 words)

Currently, we don't block-convert new-style procs (e.g. those with proc-scoped channels and proc instances). This means that procs that are instantiated multiple times become uniquified blocks, which makes RTL less readable and much larger.

### Current best alternative workaround (limit 100 words)

Continue using old-style procs and accept the big, less readable RTL.

### Your view of the "best case XLS enhancement" (limit 100 words)

Block conversion converts new-style procs. Proc instantiations become block instantiations, so a multiply-instantiated proc only codegens one block implementation that is instantiated multiple times.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing block-conversion flow and how it handles new-style procs, including proc-scoped channels and proc instances. Determine how repeated proc instantiations are currently uniquified, then define tests showing that conversion emits one block implementation with multiple block instances and preserves readable RTL.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.