From ebdac1a9d0422e7ca41de5709ee54cb25544e081 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Sun, 18 Dec 2022 16:24:26 -0600 Subject: [PATCH] Updated tests for fpga and BP. --- pipelined/regression/wally-pipelined.do | 4 ++-- pipelined/testbench/testbench.sv | 8 ++++---- pipelined/testbench/tests.vh | 12 +++++++++--- tests/{testsBP => custom}/crt0/Makefile | 0 tests/{testsBP => custom}/crt0/isr.s | 0 tests/{testsBP => custom}/crt0/pcnt_driver.h | 0 tests/{testsBP => custom}/crt0/pcnt_driver.s | 0 tests/{testsBP => custom}/crt0/pre_main.c | 0 tests/{testsBP => custom}/crt0/start.s | 0 tests/{testsBP => custom}/fpga-blink-led/Makefile | 0 tests/{testsBP => custom}/fpga-blink-led/blink-led.s | 0 tests/{testsBP => custom}/fpga-test-dram/Makefile | 0 tests/{testsBP => custom}/fpga-test-dram/blink-led.s | 0 tests/{testsBP => custom}/fpga-test-sdc/Makefile | 4 ++-- tests/{testsBP => custom}/fpga-test-sdc/bios.s | 0 tests/{testsBP => custom}/fpga-test-sdc/copyFlash.c | 0 tests/{testsBP => custom}/fpga-test-sdc/old.asm | 0 tests/{testsBP => custom}/fpga-test-sdc/sdcDriver.c | 0 tests/{testsBP => custom}/fpga-test-sdc/sdcDriver.h | 0 tests/{testsBP => custom}/fpga-test-sdc/test-sdc.asm | 0 tests/{testsBP => custom}/james_mm/Makefile | 0 tests/{testsBP => custom}/james_mm/james_mm.c | 0 tests/{testsBP => custom}/linker.x | 0 tests/{testsBP => custom}/linker1000.x | 0 tests/{testsBP => custom}/makefile.inc | 0 tests/{testsBP => custom}/mibench_qsort/LICENSE | 0 tests/{testsBP => custom}/mibench_qsort/Makefile | 0 .../{testsBP => custom}/mibench_qsort/qsort_small.c | 0 tests/{testsBP => custom}/sieve/Makefile | 0 tests/{testsBP => custom}/sieve/sieve.c | 0 tests/{testsBP => custom}/simple/Makefile | 2 +- tests/{testsBP => custom}/simple/fail.s | 0 tests/{testsBP => custom}/simple/global_hist_test.s | 0 tests/{testsBP => custom}/simple/header.h | 0 tests/{testsBP => custom}/simple/lbu_test.s | 0 tests/{testsBP => custom}/simple/main.c | 0 tests/{testsBP => custom}/simple/sample.s | 0 tests/{testsBP => custom}/zsbl/Makefile | 0 tests/{testsBP => custom}/zsbl/bios.s | 0 tests/{testsBP => custom}/zsbl/copyFlash.c | 0 tests/{testsBP => custom}/zsbl/gpt.c | 0 tests/{testsBP => custom}/zsbl/gpt.h | 0 tests/{testsBP => custom}/zsbl/main.c | 0 tests/{testsBP => custom}/zsbl/sdcDriver.c | 0 tests/{testsBP => custom}/zsbl/sdcDriver.h | 0 tests/{testsBP => custom}/zsbl/smp.h | 0 tests/{testsBP => custom}/zsbl/uart.c | 0 tests/{testsBP => custom}/zsbl/uart.h | 0 48 files changed, 18 insertions(+), 12 deletions(-) rename tests/{testsBP => custom}/crt0/Makefile (100%) rename tests/{testsBP => custom}/crt0/isr.s (100%) rename tests/{testsBP => custom}/crt0/pcnt_driver.h (100%) rename tests/{testsBP => custom}/crt0/pcnt_driver.s (100%) rename tests/{testsBP => custom}/crt0/pre_main.c (100%) rename tests/{testsBP => custom}/crt0/start.s (100%) rename tests/{testsBP => custom}/fpga-blink-led/Makefile (100%) rename tests/{testsBP => custom}/fpga-blink-led/blink-led.s (100%) rename tests/{testsBP => custom}/fpga-test-dram/Makefile (100%) rename tests/{testsBP => custom}/fpga-test-dram/blink-led.s (100%) rename tests/{testsBP => custom}/fpga-test-sdc/Makefile (96%) rename tests/{testsBP => custom}/fpga-test-sdc/bios.s (100%) rename tests/{testsBP => custom}/fpga-test-sdc/copyFlash.c (100%) rename tests/{testsBP => custom}/fpga-test-sdc/old.asm (100%) rename tests/{testsBP => custom}/fpga-test-sdc/sdcDriver.c (100%) rename tests/{testsBP => custom}/fpga-test-sdc/sdcDriver.h (100%) rename tests/{testsBP => custom}/fpga-test-sdc/test-sdc.asm (100%) rename tests/{testsBP => custom}/james_mm/Makefile (100%) rename tests/{testsBP => custom}/james_mm/james_mm.c (100%) rename tests/{testsBP => custom}/linker.x (100%) rename tests/{testsBP => custom}/linker1000.x (100%) rename tests/{testsBP => custom}/makefile.inc (100%) rename tests/{testsBP => custom}/mibench_qsort/LICENSE (100%) rename tests/{testsBP => custom}/mibench_qsort/Makefile (100%) rename tests/{testsBP => custom}/mibench_qsort/qsort_small.c (100%) rename tests/{testsBP => custom}/sieve/Makefile (100%) rename tests/{testsBP => custom}/sieve/sieve.c (100%) rename tests/{testsBP => custom}/simple/Makefile (90%) rename tests/{testsBP => custom}/simple/fail.s (100%) rename tests/{testsBP => custom}/simple/global_hist_test.s (100%) rename tests/{testsBP => custom}/simple/header.h (100%) rename tests/{testsBP => custom}/simple/lbu_test.s (100%) rename tests/{testsBP => custom}/simple/main.c (100%) rename tests/{testsBP => custom}/simple/sample.s (100%) rename tests/{testsBP => custom}/zsbl/Makefile (100%) rename tests/{testsBP => custom}/zsbl/bios.s (100%) rename tests/{testsBP => custom}/zsbl/copyFlash.c (100%) rename tests/{testsBP => custom}/zsbl/gpt.c (100%) rename tests/{testsBP => custom}/zsbl/gpt.h (100%) rename tests/{testsBP => custom}/zsbl/main.c (100%) rename tests/{testsBP => custom}/zsbl/sdcDriver.c (100%) rename tests/{testsBP => custom}/zsbl/sdcDriver.h (100%) rename tests/{testsBP => custom}/zsbl/smp.h (100%) rename tests/{testsBP => custom}/zsbl/uart.c (100%) rename tests/{testsBP => custom}/zsbl/uart.h (100%) diff --git a/pipelined/regression/wally-pipelined.do b/pipelined/regression/wally-pipelined.do index 9b978911..9d61511b 100644 --- a/pipelined/regression/wally-pipelined.do +++ b/pipelined/regression/wally-pipelined.do @@ -67,8 +67,8 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} { } elseif {$2 eq "fpga"} { echo "hello" - vlog -work work_fpga +incdir+../config/fpga +incdir+../config/shared ../testbench/testbench.sv ../testbench/sdc/*.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv ../../fpga/sim/*.sv -suppress 8852,12070,3084,3829,2583,7063 - vopt +acc work_fpga.testbench -G TEST=$2 -G DEBUG=0 -o workopt + vlog -work work +incdir+../config/fpga +incdir+../config/shared ../testbench/testbench.sv ../testbench/sdc/*.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv ../../fpga/sim/*.sv -suppress 8852,12070,3084,3829,2583,7063 + vopt +acc work.testbench -G TEST=$2 -G DEBUG=0 -o workopt vsim workopt +nowarn3829 -fatal 7 do fpga-wave.do diff --git a/pipelined/testbench/testbench.sv b/pipelined/testbench/testbench.sv index 2fe2212d..5060ec9e 100644 --- a/pipelined/testbench/testbench.sv +++ b/pipelined/testbench/testbench.sv @@ -159,7 +159,7 @@ logic [3:0] dummy; assign UARTSin = 1; if(`EXT_MEM_SUPPORTED) begin - ram #(.BASE(`EXT_MEM_BASE), .RANGE(`EXT_MEM_RANGE)) + ram_ahb #(.BASE(`EXT_MEM_BASE), .RANGE(`EXT_MEM_RANGE)) ram (.HCLK, .HRESETn, .HADDR, .HWRITE, .HTRANS, .HWDATA, .HSELRam(HSELEXT), .HREADRam(HRDATAEXT), .HREADYRam(HREADYEXT), .HRESPRam(HRESPEXT), .HREADY, .HWSTRB); @@ -226,9 +226,9 @@ logic [3:0] dummy; else memfilename = {pathname, tests[test], ".elf.memfile"}; if (`FPGA) begin string romfilename, sdcfilename; - romfilename = {"../../tests/testsBP/fpga-test-sdc/bin/fpga-test-sdc.memfile"}; - sdcfilename = {"../testbench/sdc/ramdisk2.hex"}; - $readmemh(romfilename, dut.wallypipelinedsoc.uncore.uncore.bootrom.bootrom.memory.RAM); + romfilename = {"../../tests/custom/fpga-test-sdc/bin/fpga-test-sdc.memfile"}; + sdcfilename = {"../testbench/sdc/ramdisk2.hex"}; + $readmemh(romfilename, dut.uncore.uncore.bootrom.bootrom.memory.ROM); $readmemh(sdcfilename, sdcard.sdcard.FLASHmem); // force sdc timers force dut.uncore.uncore.sdc.SDC.LimitTimers = 1; diff --git a/pipelined/testbench/tests.vh b/pipelined/testbench/tests.vh index 9bd99aee..8c596071 100644 --- a/pipelined/testbench/tests.vh +++ b/pipelined/testbench/tests.vh @@ -29,6 +29,7 @@ `define MYIMPERASTEST "3" `define COREMARK "4" `define EMBENCH "5" +`define CUSTOM "6" // *** remove MYIMPERASTEST cases when ported string tvpaths[] = '{ @@ -37,7 +38,8 @@ string tvpaths[] = '{ "../../tests/riscof/work/wally-riscv-arch-test/", "../../tests/imperas-riscv-tests/work/", "../../benchmarks/coremark/work/", - "../../addins/embench-iot/" + "../../addins/embench-iot/", + "../../tests/custom/work/" }; string coremark[] = '{ @@ -874,7 +876,6 @@ string imperas32f[] = '{ string testsBP64[] = '{ `IMPERASTEST, - "rv64BP/floating-point-bug", "rv64BP/simple" // "rv64BP/mmm", // "rv64BP/linpack_bench", @@ -1927,10 +1928,15 @@ string imperas32f[] = '{ }; string fpga[] = '{ - `WALLYTEST, + `CUSTOM, "NULL" }; + string custom[] = '{ + `CUSTOM, + "simple" + }; + string ahb[] = '{ `RISCVARCHTEST, "rv64i_m/F/src/fadd_b11-01.S" diff --git a/tests/testsBP/crt0/Makefile b/tests/custom/crt0/Makefile similarity index 100% rename from tests/testsBP/crt0/Makefile rename to tests/custom/crt0/Makefile diff --git a/tests/testsBP/crt0/isr.s b/tests/custom/crt0/isr.s similarity index 100% rename from tests/testsBP/crt0/isr.s rename to tests/custom/crt0/isr.s diff --git a/tests/testsBP/crt0/pcnt_driver.h b/tests/custom/crt0/pcnt_driver.h similarity index 100% rename from tests/testsBP/crt0/pcnt_driver.h rename to tests/custom/crt0/pcnt_driver.h diff --git a/tests/testsBP/crt0/pcnt_driver.s b/tests/custom/crt0/pcnt_driver.s similarity index 100% rename from tests/testsBP/crt0/pcnt_driver.s rename to tests/custom/crt0/pcnt_driver.s diff --git a/tests/testsBP/crt0/pre_main.c b/tests/custom/crt0/pre_main.c similarity index 100% rename from tests/testsBP/crt0/pre_main.c rename to tests/custom/crt0/pre_main.c diff --git a/tests/testsBP/crt0/start.s b/tests/custom/crt0/start.s similarity index 100% rename from tests/testsBP/crt0/start.s rename to tests/custom/crt0/start.s diff --git a/tests/testsBP/fpga-blink-led/Makefile b/tests/custom/fpga-blink-led/Makefile similarity index 100% rename from tests/testsBP/fpga-blink-led/Makefile rename to tests/custom/fpga-blink-led/Makefile diff --git a/tests/testsBP/fpga-blink-led/blink-led.s b/tests/custom/fpga-blink-led/blink-led.s similarity index 100% rename from tests/testsBP/fpga-blink-led/blink-led.s rename to tests/custom/fpga-blink-led/blink-led.s diff --git a/tests/testsBP/fpga-test-dram/Makefile b/tests/custom/fpga-test-dram/Makefile similarity index 100% rename from tests/testsBP/fpga-test-dram/Makefile rename to tests/custom/fpga-test-dram/Makefile diff --git a/tests/testsBP/fpga-test-dram/blink-led.s b/tests/custom/fpga-test-dram/blink-led.s similarity index 100% rename from tests/testsBP/fpga-test-dram/blink-led.s rename to tests/custom/fpga-test-dram/blink-led.s diff --git a/tests/testsBP/fpga-test-sdc/Makefile b/tests/custom/fpga-test-sdc/Makefile similarity index 96% rename from tests/testsBP/fpga-test-sdc/Makefile rename to tests/custom/fpga-test-sdc/Makefile index 348a67cd..32affba8 100644 --- a/tests/testsBP/fpga-test-sdc/Makefile +++ b/tests/custom/fpga-test-sdc/Makefile @@ -108,5 +108,5 @@ $(TARGET).memfile: $(TARGET) @echo 'Making memory file' riscv64-unknown-elf-elf2hex --bit-width 64 --input $^ --output $@ extractFunctionRadix.sh $<.objdump - mkdir -p ../../imperas-riscv-tests/work/rv64BP/ - cp -f $(TARGETDIR)/* ../../imperas-riscv-tests/work/rv64BP/ + mkdir -p ../work/ + cp -f $(TARGETDIR)/* ../work/ diff --git a/tests/testsBP/fpga-test-sdc/bios.s b/tests/custom/fpga-test-sdc/bios.s similarity index 100% rename from tests/testsBP/fpga-test-sdc/bios.s rename to tests/custom/fpga-test-sdc/bios.s diff --git a/tests/testsBP/fpga-test-sdc/copyFlash.c b/tests/custom/fpga-test-sdc/copyFlash.c similarity index 100% rename from tests/testsBP/fpga-test-sdc/copyFlash.c rename to tests/custom/fpga-test-sdc/copyFlash.c diff --git a/tests/testsBP/fpga-test-sdc/old.asm b/tests/custom/fpga-test-sdc/old.asm similarity index 100% rename from tests/testsBP/fpga-test-sdc/old.asm rename to tests/custom/fpga-test-sdc/old.asm diff --git a/tests/testsBP/fpga-test-sdc/sdcDriver.c b/tests/custom/fpga-test-sdc/sdcDriver.c similarity index 100% rename from tests/testsBP/fpga-test-sdc/sdcDriver.c rename to tests/custom/fpga-test-sdc/sdcDriver.c diff --git a/tests/testsBP/fpga-test-sdc/sdcDriver.h b/tests/custom/fpga-test-sdc/sdcDriver.h similarity index 100% rename from tests/testsBP/fpga-test-sdc/sdcDriver.h rename to tests/custom/fpga-test-sdc/sdcDriver.h diff --git a/tests/testsBP/fpga-test-sdc/test-sdc.asm b/tests/custom/fpga-test-sdc/test-sdc.asm similarity index 100% rename from tests/testsBP/fpga-test-sdc/test-sdc.asm rename to tests/custom/fpga-test-sdc/test-sdc.asm diff --git a/tests/testsBP/james_mm/Makefile b/tests/custom/james_mm/Makefile similarity index 100% rename from tests/testsBP/james_mm/Makefile rename to tests/custom/james_mm/Makefile diff --git a/tests/testsBP/james_mm/james_mm.c b/tests/custom/james_mm/james_mm.c similarity index 100% rename from tests/testsBP/james_mm/james_mm.c rename to tests/custom/james_mm/james_mm.c diff --git a/tests/testsBP/linker.x b/tests/custom/linker.x similarity index 100% rename from tests/testsBP/linker.x rename to tests/custom/linker.x diff --git a/tests/testsBP/linker1000.x b/tests/custom/linker1000.x similarity index 100% rename from tests/testsBP/linker1000.x rename to tests/custom/linker1000.x diff --git a/tests/testsBP/makefile.inc b/tests/custom/makefile.inc similarity index 100% rename from tests/testsBP/makefile.inc rename to tests/custom/makefile.inc diff --git a/tests/testsBP/mibench_qsort/LICENSE b/tests/custom/mibench_qsort/LICENSE similarity index 100% rename from tests/testsBP/mibench_qsort/LICENSE rename to tests/custom/mibench_qsort/LICENSE diff --git a/tests/testsBP/mibench_qsort/Makefile b/tests/custom/mibench_qsort/Makefile similarity index 100% rename from tests/testsBP/mibench_qsort/Makefile rename to tests/custom/mibench_qsort/Makefile diff --git a/tests/testsBP/mibench_qsort/qsort_small.c b/tests/custom/mibench_qsort/qsort_small.c similarity index 100% rename from tests/testsBP/mibench_qsort/qsort_small.c rename to tests/custom/mibench_qsort/qsort_small.c diff --git a/tests/testsBP/sieve/Makefile b/tests/custom/sieve/Makefile similarity index 100% rename from tests/testsBP/sieve/Makefile rename to tests/custom/sieve/Makefile diff --git a/tests/testsBP/sieve/sieve.c b/tests/custom/sieve/sieve.c similarity index 100% rename from tests/testsBP/sieve/sieve.c rename to tests/custom/sieve/sieve.c diff --git a/tests/testsBP/simple/Makefile b/tests/custom/simple/Makefile similarity index 90% rename from tests/testsBP/simple/Makefile rename to tests/custom/simple/Makefile index f85aedd5..729c3b4e 100644 --- a/tests/testsBP/simple/Makefile +++ b/tests/custom/simple/Makefile @@ -6,7 +6,7 @@ LIBRARY_FILES := crt0 MARCH :=-march=rv64imfdc MABI :=-mabi=lp64d -LINKER := ${ROOT}/linker8000-0000.x +LINKER := ${ROOT}/linker1000.x LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2 diff --git a/tests/testsBP/simple/fail.s b/tests/custom/simple/fail.s similarity index 100% rename from tests/testsBP/simple/fail.s rename to tests/custom/simple/fail.s diff --git a/tests/testsBP/simple/global_hist_test.s b/tests/custom/simple/global_hist_test.s similarity index 100% rename from tests/testsBP/simple/global_hist_test.s rename to tests/custom/simple/global_hist_test.s diff --git a/tests/testsBP/simple/header.h b/tests/custom/simple/header.h similarity index 100% rename from tests/testsBP/simple/header.h rename to tests/custom/simple/header.h diff --git a/tests/testsBP/simple/lbu_test.s b/tests/custom/simple/lbu_test.s similarity index 100% rename from tests/testsBP/simple/lbu_test.s rename to tests/custom/simple/lbu_test.s diff --git a/tests/testsBP/simple/main.c b/tests/custom/simple/main.c similarity index 100% rename from tests/testsBP/simple/main.c rename to tests/custom/simple/main.c diff --git a/tests/testsBP/simple/sample.s b/tests/custom/simple/sample.s similarity index 100% rename from tests/testsBP/simple/sample.s rename to tests/custom/simple/sample.s diff --git a/tests/testsBP/zsbl/Makefile b/tests/custom/zsbl/Makefile similarity index 100% rename from tests/testsBP/zsbl/Makefile rename to tests/custom/zsbl/Makefile diff --git a/tests/testsBP/zsbl/bios.s b/tests/custom/zsbl/bios.s similarity index 100% rename from tests/testsBP/zsbl/bios.s rename to tests/custom/zsbl/bios.s diff --git a/tests/testsBP/zsbl/copyFlash.c b/tests/custom/zsbl/copyFlash.c similarity index 100% rename from tests/testsBP/zsbl/copyFlash.c rename to tests/custom/zsbl/copyFlash.c diff --git a/tests/testsBP/zsbl/gpt.c b/tests/custom/zsbl/gpt.c similarity index 100% rename from tests/testsBP/zsbl/gpt.c rename to tests/custom/zsbl/gpt.c diff --git a/tests/testsBP/zsbl/gpt.h b/tests/custom/zsbl/gpt.h similarity index 100% rename from tests/testsBP/zsbl/gpt.h rename to tests/custom/zsbl/gpt.h diff --git a/tests/testsBP/zsbl/main.c b/tests/custom/zsbl/main.c similarity index 100% rename from tests/testsBP/zsbl/main.c rename to tests/custom/zsbl/main.c diff --git a/tests/testsBP/zsbl/sdcDriver.c b/tests/custom/zsbl/sdcDriver.c similarity index 100% rename from tests/testsBP/zsbl/sdcDriver.c rename to tests/custom/zsbl/sdcDriver.c diff --git a/tests/testsBP/zsbl/sdcDriver.h b/tests/custom/zsbl/sdcDriver.h similarity index 100% rename from tests/testsBP/zsbl/sdcDriver.h rename to tests/custom/zsbl/sdcDriver.h diff --git a/tests/testsBP/zsbl/smp.h b/tests/custom/zsbl/smp.h similarity index 100% rename from tests/testsBP/zsbl/smp.h rename to tests/custom/zsbl/smp.h diff --git a/tests/testsBP/zsbl/uart.c b/tests/custom/zsbl/uart.c similarity index 100% rename from tests/testsBP/zsbl/uart.c rename to tests/custom/zsbl/uart.c diff --git a/tests/testsBP/zsbl/uart.h b/tests/custom/zsbl/uart.h similarity index 100% rename from tests/testsBP/zsbl/uart.h rename to tests/custom/zsbl/uart.h