nvdla / hw

RTL, Cmodel, and testbench for NVDLA
Other
1.68k stars 561 forks source link

nv_small verilator not building (missing fles) #293

Open nganjehloo opened 5 years ago

nganjehloo commented 5 years ago

Hello. I am trying to build nv_small with verilator. I've gotten two errors. The first was RAMPDP_80X17_GL_M2_D2 which i found and added to the verilator file list in the verif folder/ However I cannot find the which is the new error /NV_NVDLA_SDP_MRDMA_EG_lat_fifo_8x65 Is nv_small and verilator currently supported?

nganjehloo commented 5 years ago

I ended up using nvdlav1 as that seemed a bit more stable along with nv_full. Still had issues. A -Wno flag needs to be changed because of some changes in clang. Also a compiler flag also needs to be added because of linker issues. Once you are finished building, most tests will run and pass except googlenet and alexnet. The provided test expects a particular value at some point from the csb despite the hardware actually handling that operation differently than what the test expects. The hardware returns a 1 when a 0 is expected. Check for details #219.

After fixing that, the default nv_full design should work through verilator. Hope this helps someone.

dian-lun-lin commented 3 years ago

I had the same issue and it turns out those missing modules are in the /fifos directory. I end up adding these lines in my veriator makefile and it works:

-I../../outdir/nv_small/vmod/rams/model
-I../../outdir/nv_small/vmod/fifos
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_NRDMA_cq_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_BRDMA_cq_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_MRDMA_cq_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_PDP_WDMA_DAT_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_PDP_RDMA_lat_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_PDP_RDMA_ro_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_DP_intpinfo_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_DP_data_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_DP_sumpd_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_RDMA_lat_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_NRDMA_lat_fifo_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_BRDMA_lat_fifo_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_SDP_MRDMA_EG_lat_fifo_lib.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_RDMA_ro_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDMA_WT_8ATMM_fifo.v
-v ../../outdir/nv_small/vmod/fifos/NV_NVDLA_CDP_WDMA_dat_fifo.v