Skip to content

Commit 7eb0f80

Browse files
committed
modules/zstd/memory/README: Describe verilog simulation
Signed-off-by: Pawel Czarnecki <[email protected]>
1 parent 42b7089 commit 7eb0f80

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

xls/modules/zstd/memory/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,43 @@ The list below shows the usage of the `MemWriter` proc:
8787

8888
3. Wait for the response submitted on the `resp_s` channel, which indicates
8989
if the write operation was successful or an error occurred.
90+
91+
# Cocotb Simulation
92+
93+
This directory also contains Verilog simulations of the created modules,
94+
which test their interaction with RAM attached to the AXI bus. These Verilog
95+
simulations provide insight into the design's latency and achievable throughput.
96+
97+
The simulation interacts with verilog file generated from the particular DSLX proc
98+
through a verilog wrapper. The wrapper is used to create an interface that is
99+
compliant with the AXI specification so that the cocotb testbench can interact
100+
with the DUT with the help of an extension tailored for handling the AXI bus.
101+
102+
## Usage
103+
104+
1. Run the simulation with the following command:
105+
106+
```
107+
bazel run -c opt //xls/modules/zstd/memory:<module_name>_cocotb_test -- --logtostderr
108+
```
109+
110+
2. Observe simulation results, e.g. for `mem_writer_cocotb_test`:
111+
112+
```
113+
*************************************************************************************************************************************************************
114+
** TEST STATUS SIM TIME (ns) REAL TIME (s) RATIO (ns/s) **
115+
*************************************************************************************************************************************************************
116+
** mem_writer_cocotb_test.ram_test_single_burst_1_transfer PASS 1970000.00 0.05 40004933.01 **
117+
** mem_writer_cocotb_test.ram_test_single_burst_2_transfers PASS 2140000.00 0.04 52208013.80 **
118+
** mem_writer_cocotb_test.ram_test_single_burst_almost_max_burst_transfer PASS 42620000.00 1.00 42734572.11 **
119+
** mem_writer_cocotb_test.ram_test_single_burst_max_burst_transfer PASS 43380000.00 1.03 42245987.95 **
120+
** mem_writer_cocotb_test.ram_test_multiburst_2_full_bursts PASS 85940000.00 2.00 42978720.13 **
121+
** mem_writer_cocotb_test.ram_test_multiburst_1_full_burst_and_single_transfer PASS 44510000.00 1.02 43487911.16 **
122+
** mem_writer_cocotb_test.ram_test_multiburst_crossing_4kb_boundary PASS 3740000.00 0.06 60190612.91 **
123+
** mem_writer_cocotb_test.ram_test_multiburst_crossing_4kb_boundary_with_perfectly_aligned_full_bursts PASS 21440000.00 0.50 42469371.00 **
124+
** mem_writer_cocotb_test.ram_test_multiburst_crossing_4kb_boundary_with_2_full_bursts_and_1_transfer PASS 87070000.00 2.01 43348812.05 **
125+
** mem_writer_cocotb_test.ram_test_random PASS 4491230000.00 109.05 41184670.96 **
126+
*************************************************************************************************************************************************************
127+
** TESTS=10 PASS=10 FAIL=0 SKIP=0 4824040000.01 116.82 41296261.92 **
128+
*************************************************************************************************************************************************************
129+
```

0 commit comments

Comments
 (0)