Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules/zstd: Add Repacketizer #1314

Closed
wants to merge 34 commits into from
Closed

Conversation

lpawelcz
Copy link
Contributor

This PR adds Repacketizer proc. It is used at the end of the processing flow in the ZSTD decoder. It gathers the output of SequenceExecutor proc, removes the bits that are not marked as valid and creates new packets with payloads having only valid bits. Such packets are then send out to the output of the whole ZSTD decoder.

NOTE: this is based on #1295 , please ignore commits from that branch when reviewing.
This is part of #1211.

rw1nkler and others added 30 commits January 15, 2024 15:43
This commit adds a DSLX Buffer library that provides the Buffer struct,
and helper functions that can be used to operate on it. The Buffer
is meant to be a storage for data coming from the channel. It acts like
a FIFO, allowing data of any length to be put in or popped out of it.
Provided DSLX tests verify the correct behaviour of the library.

Internal-tag: [#50221]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds a simple test that shows, how one can use the Buffer
struct inside a Proc.

Internal-tag: [#50221]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds the library with functions for parsing a magic number and
tests that verify its correctness.

Internal-tag: [#50221]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds the library with functions for parsing a frame header.
The provided tests verify the correcness of the library.

Internal-tag: [#49967]
Co-authored-by: Roman Dobrodii <rdobrodii@antmicro.com>
Co-authored-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Required for expected_status inference in C++ tests for ZSTD decoder
components

Internal-tag: [#53465]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#50967]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds a binary that calls decoding to generate data and loads
it into a vector of bytes.

Internal-tag: [#50967]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#50967]
Co-authored-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#51343]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#51343]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Adds RleBlockDecoder responsible for decoding Blocks
of RLE_Block Block_Type as specified in RFC 8878, paragraph 3.1.1.2.2.
https://datatracker.ietf.org/doc/html/rfc8878#section-3.1.1.2.2

RleBlockDecoder communicates through BlockDataPacket channels.
It reuses existing RunLengthDecoder block which is interfaced through
two seprate procs:

 * RleDataPacker
 * BatchPacker

Which are responsible for converting input data into format accepted by
RLE decoder and for gathering RLE decoder output symbols into batches
which are then send out through BlockDataPacket.

Internal-tag: [#51473]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#51343]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This commit adds DecoderMux Proc, which collects data from specialized
Raw, RLE, and Compressed Block decoders and re-sends them in the correct order.

Internal-tag: [#51343]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This DSLX proc responsibility is to dispatch encoded blocks to a correct
decoder: RAW, RLE, COMPRESSED.

It tracks and assigns block IDs.
The ID counter is reset on the frame's last block on the last data packet.

Internal-tag: [#51736]
Co-authored-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This adds a decoder of block data. It decodes block header and
demuxes remaining input data into one of specific block decoders
depending on the type of the parsed block. Then it muxes outputs
from those decoders into single output channel.

Internal-tag: [#51873]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#53329]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This commit marks SimultaneousReadWriteBehavior enum and
num_partitions function as public to allow for creating
simpler tests that interact with RAM models.

Internal-tag: [#53241]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#54705]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds RAM printer block usefull for debugging
HistoryBuffer inside SequenceExecutor.

Internal-tag: [#54705]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Add Proc responsible for handling ZSTD Sequence Execution step,
which is described in:
https://datatracker.ietf.org/doc/html/rfc8878#name-sequence-execution

Internal-tag: [#54705]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
rw1nkler and others added 4 commits February 14, 2024 15:13
Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
lpawelcz added a commit to antmicro/xls that referenced this pull request Feb 21, 2024
google#1314

xls/modules/zstd: Add repacketizer

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/BUILD: Add repacketizer build rules

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/BUILD: benchmark repacketizer

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/repacketizer: fix the ordering of data in reorganized packets

Internal-tag: [#52186]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
lpawelcz added a commit to antmicro/xls that referenced this pull request Mar 7, 2024
google#1314

xls/modules/zstd: Add repacketizer

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/BUILD: Add repacketizer build rules

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/BUILD: benchmark repacketizer

Internal-tag: [#52954]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>

xls/modules/zstd/repacketizer: fix the ordering of data in reorganized packets

Internal-tag: [#52186]
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
@cdleary cdleary added the app Application level functionality (examples, uses of XLS stack) label Mar 27, 2024
@proppy
Copy link
Member

proppy commented Mar 29, 2024

should we close this and focus on reviewing #1315 ?

@lpawelcz
Copy link
Contributor Author

Closing. The review will take place in #1315

@lpawelcz lpawelcz closed this Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Application level functionality (examples, uses of XLS stack)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants