Skip to content

modules/dbe - Lz4 decoder#1075

Closed
rdob-ant wants to merge 7 commits into
google:mainfrom
antmicro:47137-lz4-decoder
Closed

modules/dbe - Lz4 decoder#1075
rdob-ant wants to merge 7 commits into
google:mainfrom
antmicro:47137-lz4-decoder

Conversation

@rdob-ant

Copy link
Copy Markdown
Contributor

This is an implementation of Lz4 decoder in DSLX and accompanying cocotb testsuite. Since Lz4 encoder reuses much of the code from this PR, I'd like to prepare it after this one is reviewed.

Some notes:

  1. This relies on cocotb, so includes commits from Add cocotb framework #1057 . Once that is merged, this branch will be rebased.
  2. DSLX implementation of decoder uses 1R1W RAM with 1 partition. Such configuration triggers a small bug (missing mask expansion) in examples/ram.x that this PR fixes.
  3. It also includes reference decoder implementation in Python which is not used by the tests in the current PR, but will be needed for the upcoming Lz4 encoder PR.

rw1nkler and others added 7 commits July 21, 2023 17:50
Temporary get improved version of the cocotb_test() rule from
a forked repository.

Internal-tag: [#44586]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Internal-tag: [#46586]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
The library contains the XLSChannelDriver and XLSChannelMonitor classes,
which can be used to send or receive data from an XLS channel in
a Cocotb simulation, respectively.

Internal-tag: [#46586]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit adds an example that uses the Cocotb framework to validate
behavior of the Verilog file converted from a simple DSLX code

Internal-tag: [#46586]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Creates cocotb_xls_test macro that generates a file with the
timestamp specified in the rule definition. The macro is required to
generate the timestamp for Icarus Verilog smulation in Cocotb.

Internal-tag: [#46586]
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
Decoder for Lz4 - a dictionary-based data compression algorithm.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
@rw1nkler rw1nkler mentioned this pull request Jul 21, 2023
@proppy proppy mentioned this pull request Jul 23, 2023
6 tasks
@proppy

proppy commented Jul 23, 2023

Copy link
Copy Markdown
Member

Related to #995.

@proppy

proppy commented Jul 24, 2023

Copy link
Copy Markdown
Member

Such configuration triggers a small bug (missing mask expansion) in examples/ram.x that this PR fixes.

can we get a separate PR for that (so that we can merge it earlier)

@proppy

proppy commented Jul 24, 2023

Copy link
Copy Markdown
Member

This relies on cocotb, so includes commits from #1057 . Once that is merged, this branch will be rebased.

Maybe we could move this to a separate PR, as it is not strictly required by the implementation (and not to block this being merged on the resolution of the discussions happening in #1057)

@proppy

proppy commented Jul 24, 2023

Copy link
Copy Markdown
Member

It also includes reference decoder implementation in Python which is not used by the tests in the current PR, but will be needed for the upcoming Lz4 encoder PR.

Do you plan to validate the dslx/ir/codegen versions against the python reference impl?

@proppy

proppy commented Jul 24, 2023

Copy link
Copy Markdown
Member

Lz4 encoder reuses much of the code from this PR, I'd like to prepare it after this one is reviewed.

I'd be good to get the encoder and the decoder in the same PR, in order to be able to more effectively cross-review them. If it's challenging to send both at the same time, I think it'd be easier to review the encoder first.

@rdob-ant

Copy link
Copy Markdown
Contributor Author

can we get a separate PR for that (so that we can merge it earlier)

Opened #1078

@rdob-ant

Copy link
Copy Markdown
Contributor Author

Maybe we could move this to a separate PR, as it is not strictly required by the implementation (and not to block this being merged on the resolution of the discussions happening in #1057)

We can, but since I wrote most of the tests in cocotb, I'm afraid without them the implementation may look "incomplete".

@rdob-ant

Copy link
Copy Markdown
Contributor Author

Do you plan to validate the dslx/ir/codegen versions against the python reference impl?

Yes, at least in one test I'm using Python decoder to decode (and thus validate) the output of DSLX encoder.

@rdob-ant

Copy link
Copy Markdown
Contributor Author

Superseded by #1079 that includes both encoder and decoder.

@rdob-ant rdob-ant closed this Jul 25, 2023
@tmichalak tmichalak deleted the 47137-lz4-decoder branch April 29, 2025 08:42
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.

3 participants