ZipCPU / axidmacheck

AXI DMA Check: A utility to measure DMA speeds in simulation
12 stars 7 forks source link

Hide OPT_SKIDBUFFER Declaration Unless FORMAL is Defined #2

Closed bobnewgard closed 3 years ago

bobnewgard commented 3 years ago

Verilator v4.212 (and v4.202) fails with unconnected OPT_SKIDBUFFER when FORMAL is undefined. I fixed this and pushed the change to https://github.com/bobnewgard/axidmacheck (see Details below). The diff is:

--- a/rtl/streamcounter.v
+++ b/rtl/streamcounter.v
@@ -58,7 +58,9 @@ module        streamcounter #(
                parameter       C_AXI_ADDR_WIDTH = 4,
                localparam      C_AXI_DATA_WIDTH = 32,
                parameter       C_AXIS_DATA_WIDTH = 32,
+`ifdef FORMAL
                parameter [0:0] OPT_SKIDBUFFER = 1'b1,
+`endif
                parameter [0:0] OPT_LOWPOWER = 0,
                localparam      ADDRLSB = $clog2(C_AXI_DATA_WIDTH)-3
                // }}}

Regards, Bob Newgard

Details:

ZipCPU commented 3 years ago

Thank you. Let me double check this, but I seem to recall this is a necessary update.

ZipCPU commented 3 years ago

Ok, I looked into this. OPT_SKIDBUFFER is a relic of an older design that's now being outlined by the newer Verilator. It needs to be removed entirely. The FORMAL section also needs to be adjusted under the assumption that OPT_SKIDBUFFER is true since the skid buffers are being used.

There are more changes required to work with the newer Verilator, those'll be posted soon as well.

However, before fixing this ... I need to fix the DMA. The CSYS* parameters were just a pain, the documentation was never quite right for them, etc. So, I'm likely to remove them entirely, but I'll still need to test the replacement before posting it.

ZipCPU commented 3 years ago

This and the AXIDMA issue have now been fixed as of d65b46a.

Dan