From 1868bc36d9c5fec2e831bcad318ae3e339e3e6ab Mon Sep 17 00:00:00 2001 From: Staf Verhaegen Date: Tue, 6 Apr 2021 20:33:58 +0200 Subject: [PATCH] Fix pre-layout simulation with 4K SRAM blocks. --- ls180/pre_pnr/Makefile | 1 + ls180/pre_pnr/run_iverilog_ls180.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ls180/pre_pnr/Makefile b/ls180/pre_pnr/Makefile index 4fbc60f..6a60bb4 100644 --- a/ls180/pre_pnr/Makefile +++ b/ls180/pre_pnr/Makefile @@ -7,6 +7,7 @@ TOPLEVEL_LANG := verilog # within soc repo, as submodule, this works after "make ls180" # is run inside the litex/florent subdirectory VERILOG_SOURCES := \ + ../SPBlock_512W64B8W.v \ ../../../litex/florent/libresoc.v \ ../../../litex/florent/ls180.v \ # END VERILOG_SOURCES diff --git a/ls180/pre_pnr/run_iverilog_ls180.sh b/ls180/pre_pnr/run_iverilog_ls180.sh index 68bb266..1d5c42d 100755 --- a/ls180/pre_pnr/run_iverilog_ls180.sh +++ b/ls180/pre_pnr/run_iverilog_ls180.sh @@ -1,10 +1,16 @@ #!/bin/sh +if grep -q ls180sram4k ../../../litex/florent/ls180.v; then + top=ls180sram4k +else + top=ls180 +fi + touch mem.init mem_1.init mem_2.init mem_3.init mem_4.init # Only run test in reset state as running CPU takes too much time to simulate make \ SIM=icarus \ - TOPLEVEL=ls180 \ + TOPLEVEL=$top \ COCOTB_RESULTS_FILE=results_iverilog_ls180.xml \ COCOTB_HDL_TIMEUNIT=100ps \ TESTCASE="idcode_reset,idcodesvf_reset,boundary_scan_reset,wishbone_basic" \ -- 2.30.2