Repository navigation
[zstd] Break combinational valid loops in FseTableCreator and MemReader - #5374
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_1018685727
branch
from
November 20, 2026 18:48
8959fcc to
2ac24cd
Compare
…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
Bot
force-pushed
the
test_1018685727
branch
from
November 20, 2026 19:25
2ac24cd to
7978375
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an accoun
60C6
t?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[zstd] Break combinational valid loops in FseTableCreator and MemReader
In
FseTableCreatorandMemReader/MemReaderAdv, internal channels declared withchan<T, DEPTH>lowered toFifoConfig(bypass=true, register_pop_outputs=false). BecauseFseTableCreator/FseTableIteratorandMemReaderInternal/AxiReaderboth receive and send across those internal channels in the same pipeline stage (active_inputs_validcouplingrecv_validtosend_valid),bypass=truecreated combinationalpush_valid -> pop_validloops across the container blocks infse_table_creator,mem_reader,mem_reader_adv,huffman_axi_reader, andhuffman_weights_dec.FseTableCreator, configure the once-per-table control channelit_ctrlwith#[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 streamingit_indexchannel with#[channel(depth=2, bypass=true, register_push_outputs=true, register_pop_outputs=false)]for full throughput.MemReaderandMemReaderAdv, configure only the single outgoing request channelreader_reqwith#[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.FSE_TABLE_CREATOR_CODEGEN_ARGSinxls/modules/zstd/BUILDand pass it to bothfse_table_creator_verilogandfse_table_creator_opt_ir_benchmarkso their codegen flags stay consistent.