Fix pre-layout simulation with 4K SRAM blocks.
[soc-cocotb-sim.git] / ls180 / pre_pnr / run_iverilog_ls180.sh
index 68bb2663e5b63daf74027b1dcbc55f27dcb8792a..1d5c42dd08517e1a6f590614c831a267cb56e10b 100755 (executable)
@@ -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" \