8000 [zstd] Break combinational valid loops in FseTableCreator and MemReader by copybara-service[bot] · Pull Request #5374 · google/xls · GitHub
[go: up one dir, main page]

Skip to content

[zstd] Break combinational valid loops in FseTableCreator and MemReader - #5374

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1018685727
Nov 20, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1018685727

Conversation

@copybara-service
Copy link
Copy Markdown

[zstd] Break combinational valid loops in FseTableCreator and MemReader

In FseTableCreator and MemReader/MemReaderAdv, internal channels declared with chan<T, DEPTH> lowered to FifoConfig(bypass=true, register_pop_outputs=false). Because FseTableCreator/FseTableIterator and MemReaderInternal/AxiReader both receive and send across those internal channels in the same pipeline stage (active_inputs_valid coupling recv_valid to send_valid), bypass=true created combinational push_valid -> pop_valid loops across the container blocks in fse_table_creator, mem_reader, mem_reader_adv, huffman_axi_reader, and huffman_weights_dec.

  • In FseTableCreator, configure the once-per-table control channel it_ctrl with #[channel(depth=1, bypass=false, register_push_outputs=true, register_pop_outputs=false)] to cut both valid and ready combinational paths across the loop, and configure the streaming it_index channel with #[channel(depth=2, bypass=true, register_push_outputs=true, register_pop_outputs=false)] for full throughput.
  • In MemReader and MemReaderAdv, configure only the single outgoing request channel reader_req with #[channel(depth=1, bypass=false, register_push_outputs=true, register_pop_outputs=false)] while keeping the downstream data and error channels (reader_err, axi_st_in, axi_st_remove, axi_st_out) as #[channel(depth=0)] direct connections.
  • Extract FSE_TABLE_CREATOR_CODEGEN_ARGS in xls/modules/zstd/BUILD and pass it to both fse_table_creator_verilog and fse_table_creator_opt_ir_benchmark so their codegen flags stay consistent.

…and MemReader

In `FseTableCreator` and `MemReader`/`MemReaderAdv`, internal channels declared with `chan<T, DEPTH>` lowered to `FifoConfig(bypass=true, register_pop_outputs=false)`. Because `FseTableCreator`/`FseTableIterator` and `MemReaderInternal`/`AxiReader` both receive and send across those internal channels in the same pipeline stage (`active_inputs_valid` coupling `recv_valid` to `send_valid`), `bypass=true` created combinational `push_valid -> pop_valid` loops across the container blocks in `fse_table_creator`, `mem_reader`, `mem_reader_adv`, `huffman_axi_reader`, and `huffman_weights_dec`.

* In `FseTableCreator`, configure the once-per-table control channel `it_ctrl` with `#[channel(depth=1, bypass=false, register_push_outputs=true, register_pop_outputs=false)]` to cut both valid and ready combinational paths across the loop, and configure the streaming `it_index` channel with `#[channel(depth=2, bypass=true, register_push_outputs=true, register_pop_outputs=false)]` for full throughput.
* In `MemReader` and `MemReaderAdv`, configure the single outgoing request channel `reader_req` with `#[channel(depth=1, bypass=false, register_push_outputs=true, register_pop_outputs=false)]` to cut both valid and ready paths across the cycle, and configure the downstream data and error channels (`reader_err`, `axi_st_in`, `axi_st_remove`, `axi_st_out`) as `#[channel(depth=0)]` direct connections. In `MemReader`, `CHANNEL_DEPTH` is kept in the parametric signature for caller compatibility because `#![feature(channel_attributes)]` forbids mixing `chan<T, CHANNEL_DEPTH>` and `#[channel(depth=...)]` currently only accepts integer literals.
* Extract `FSE_TABLE_CREATOR_CODEGEN_ARGS` in `xls/modules/zstd/BUILD` and pass it to both `fse_table_creator_verilog` and `fse_table_creator_opt_ir_benchmark` so their codegen flags stay consistent.

PiperOrigin-RevId: 1026622233
@copybara-service
copybara-service Bot merged commit 7978375 into main Nov 20, 2026
3 checks passed
@copybara-service
copybara-service Bot deleted the test_1018685727 branch November 20, 2026 19:25

This branch was previously deployed

1 inactive deployment
github-pages — 79783753 Deployed Nov 20, 2026 by copybara-service[bot] via deploy #14771
Sign up for free to join this conversation on GitHub. Already have an accoun 60C6 t? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0