Skip to content

Commit a0412c7

Browse files
committed
[TEMP] Add RLE Block Decoder
google#1213 modules/zstd: Add rle block decoder 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 <[email protected]> modules/zstd/rle_block_dec: Specify fifo depths for internal channels Internal-tag: [#53329] Signed-off-by: Pawel Czarnecki <[email protected]> modules/zstd/rle_block_decoder: Add benchmarking rules Internal-tag: [#53329] Signed-off-by: Pawel Czarnecki <[email protected]>
1 parent a621202 commit a0412c7

File tree

2 files changed

+493
-0
lines changed

2 files changed

+493
-0
lines changed

xls/modules/zstd/BUILD

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,82 @@ place_and_route(
345345
synthesized_rtl = ":raw_block_dec_synth_asap7",
346346
target_die_utilization_percentage = "10",
347347
)
348+
349+
xls_dslx_library(
350+
name = "rle_block_dec_dslx",
351+
srcs = [
352+
"rle_block_dec.x",
353+
],
354+
deps = [
355+
":buffer_dslx",
356+
":common_dslx",
357+
"//xls/modules/rle:rle_common_dslx",
358+
"//xls/modules/rle:rle_dec_dslx",
359+
],
360+
)
361+
362+
xls_dslx_test(
363+
name = "rle_block_dec_dslx_test",
364+
library = ":rle_block_dec_dslx",
365+
)
366+
367+
xls_dslx_verilog(
368+
name = "rle_block_dec_verilog",
369+
codegen_args = {
370+
"module_name": "RleBlockDecoder",
371+
"delay_model": "asap7",
372+
"pipeline_stages": "3",
373+
"reset": "rst",
374+
"use_system_verilog": "false",
375+
},
376+
dslx_top = "RleBlockDecoder",
377+
library = ":rle_block_dec_dslx",
378+
# TODO: 2024-01-15: Workaround for https://github.com/google/xls/issues/869
379+
# Force proc inlining and set last internal proc as top proc for IR optimization
380+
opt_ir_args = {
381+
"inline_procs": "true",
382+
"top": "__rle_block_dec__RleBlockDecoder__BatchPacker_0_next",
383+
},
384+
verilog_file = "rle_block_dec.v",
385+
)
386+
387+
xls_benchmark_ir(
388+
name = "rle_block_dec_opt_ir_benchmark",
389+
src = ":rle_block_dec_verilog.opt.ir",
390+
benchmark_ir_args = {
391+
"pipeline_stages": "3",
392+
"delay_model": "asap7",
393+
},
394+
)
395+
396+
verilog_library(
397+
name = "rle_block_dec_verilog_lib",
398+
srcs = [
399+
":rle_block_dec.v",
400+
],
401+
)
402+
403+
synthesize_rtl(
404+
name = "rle_block_dec_synth_asap7",
405+
standard_cells = "@org_theopenroadproject_asap7sc7p5t_28//:asap7-sc7p5t_rev28_rvt",
406+
top_module = "RleBlockDecoder",
407+
deps = [
408+
":rle_block_dec_verilog_lib",
409+
],
410+
)
411+
412+
benchmark_synth(
413+
name = "rle_block_dec_benchmark_synth",
414+
synth_target = ":rle_block_dec_synth_asap7",
415+
)
416+
417+
place_and_route(
418+
name = "rle_block_dec_place_and_route",
419+
clock_period = "750",
420+
core_padding_microns = 2,
421+
min_pin_distance = "0.5",
422+
placement_density = "0.30",
423+
skip_detailed_routing = True,
424+
synthesized_rtl = ":rle_block_dec_synth_asap7",
425+
target_die_utilization_percentage = "10",
426+
)

0 commit comments

Comments
 (0)