diff --git a/riscv-target/serv/device/rv32i_m/C/Makefile.include b/riscv-target/serv/device/rv32i_m/C/Makefile.include deleted file mode 100644 index ed46241..0000000 --- a/riscv-target/serv/device/rv32i_m/C/Makefile.include +++ /dev/null @@ -1,26 +0,0 @@ -TARGET_SIM ?= server -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RUN_TARGET=\ - $(TARGET_SIM) \ - +timeout=100000000000 \ - +signature=$(*).signature.output \ - +firmware=$(<).hex 2> $@ - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles - -COMPILE_TARGET=\ - $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \ - -o $$@; \ - $$(RISCV_OBJCOPY) -O binary $$@ $$@.bin; \ - $$(RISCV_OBJDUMP) -D $$@ > $$@.objdump; \ - python3 $(TARGETDIR)/$(RISCV_TARGET)/makehex.py $$@.bin 524288 > $$@.hex; diff --git a/riscv-target/serv/device/rv32i_m/I/Makefile.include b/riscv-target/serv/device/rv32i_m/I/Makefile.include deleted file mode 100644 index ed46241..0000000 --- a/riscv-target/serv/device/rv32i_m/I/Makefile.include +++ /dev/null @@ -1,26 +0,0 @@ -TARGET_SIM ?= server -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RUN_TARGET=\ - $(TARGET_SIM) \ - +timeout=100000000000 \ - +signature=$(*).signature.output \ - +firmware=$(<).hex 2> $@ - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles - -COMPILE_TARGET=\ - $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \ - -o $$@; \ - $$(RISCV_OBJCOPY) -O binary $$@ $$@.bin; \ - $$(RISCV_OBJDUMP) -D $$@ > $$@.objdump; \ - python3 $(TARGETDIR)/$(RISCV_TARGET)/makehex.py $$@.bin 524288 > $$@.hex; diff --git a/riscv-target/serv/device/rv32i_m/M/Makefile.include b/riscv-target/serv/device/rv32i_m/M/Makefile.include deleted file mode 100644 index ed46241..0000000 --- a/riscv-target/serv/device/rv32i_m/M/Makefile.include +++ /dev/null @@ -1,26 +0,0 @@ -TARGET_SIM ?= server -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RUN_TARGET=\ - $(TARGET_SIM) \ - +timeout=100000000000 \ - +signature=$(*).signature.output \ - +firmware=$(<).hex 2> $@ - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles - -COMPILE_TARGET=\ - $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \ - -o $$@; \ - $$(RISCV_OBJCOPY) -O binary $$@ $$@.bin; \ - $$(RISCV_OBJDUMP) -D $$@ > $$@.objdump; \ - python3 $(TARGETDIR)/$(RISCV_TARGET)/makehex.py $$@.bin 524288 > $$@.hex; diff --git a/riscv-target/serv/device/rv32i_m/Zifencei/Makefile.include b/riscv-target/serv/device/rv32i_m/Zifencei/Makefile.include deleted file mode 100644 index ed46241..0000000 --- a/riscv-target/serv/device/rv32i_m/Zifencei/Makefile.include +++ /dev/null @@ -1,26 +0,0 @@ -TARGET_SIM ?= server -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RUN_TARGET=\ - $(TARGET_SIM) \ - +timeout=100000000000 \ - +signature=$(*).signature.output \ - +firmware=$(<).hex 2> $@ - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles - -COMPILE_TARGET=\ - $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \ - -o $$@; \ - $$(RISCV_OBJCOPY) -O binary $$@ $$@.bin; \ - $$(RISCV_OBJDUMP) -D $$@ > $$@.objdump; \ - python3 $(TARGETDIR)/$(RISCV_TARGET)/makehex.py $$@.bin 524288 > $$@.hex; diff --git a/riscv-target/serv/device/rv32i_m/privilege/Makefile.include b/riscv-target/serv/device/rv32i_m/privilege/Makefile.include deleted file mode 100644 index ed46241..0000000 --- a/riscv-target/serv/device/rv32i_m/privilege/Makefile.include +++ /dev/null @@ -1,26 +0,0 @@ -TARGET_SIM ?= server -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RUN_TARGET=\ - $(TARGET_SIM) \ - +timeout=100000000000 \ - +signature=$(*).signature.output \ - +firmware=$(<).hex 2> $@ - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles - -COMPILE_TARGET=\ - $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \ - -o $$@; \ - $$(RISCV_OBJCOPY) -O binary $$@ $$@.bin; \ - $$(RISCV_OBJDUMP) -D $$@ > $$@.objdump; \ - python3 $(TARGETDIR)/$(RISCV_TARGET)/makehex.py $$@.bin 524288 > $$@.hex; diff --git a/riscv-target/serv/link.ld b/riscv-target/serv/link.ld deleted file mode 100644 index db7be33..0000000 --- a/riscv-target/serv/link.ld +++ /dev/null @@ -1,18 +0,0 @@ -OUTPUT_ARCH( "riscv" ) -ENTRY(_start) - -SECTIONS -{ - . = 0x00000000; - .text.init : { *(.text.init) } - . = ALIGN(0x1000); - .tohost : { *(.tohost) } - . = ALIGN(0x1000); - .text : { *(.text) } - . = ALIGN(0x1000); - .data : { *(.data) } - .data.string : { *(.data.string)} - .bss : { *(.bss) } - _end = .; -} - diff --git a/riscv-target/serv/makehex.py b/riscv-target/serv/makehex.py deleted file mode 100644 index 419b378..0000000 --- a/riscv-target/serv/makehex.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. - -from sys import argv - -binfile = argv[1] -nwords = int(argv[2]) - -with open(binfile, "rb") as f: - bindata = f.read() - -assert len(bindata) < 4*nwords -assert len(bindata) % 4 == 0 - -for i in range(nwords): - if i < len(bindata) // 4: - w = bindata[4*i : 4*i+4] - print("%02x%02x%02x%02x" % (w[3], w[2], w[1], w[0])) - else: - print("0") - diff --git a/riscv-target/serv/model_test.h b/riscv-target/serv/model_test.h deleted file mode 100644 index 2b74203..0000000 --- a/riscv-target/serv/model_test.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _COMPLIANCE_MODEL_H -#define _COMPLIANCE_MODEL_H - -#define RVMODEL_HALT \ - la a0, begin_signature; \ - la a1, end_signature; \ - li a2, 0x80000000; \ - complience_halt_loop: \ - beq a0, a1, complience_halt_break; \ - addi a3, a0, 4; \ - complience_halt_loop2: \ - addi a3, a3, -1; \ - \ - lb a4, 0 (a3); \ - srai a5, a4, 4; \ - andi a5, a5, 0xF; \ - li a6, 10; \ - blt a5, a6, notLetter; \ - addi a5, a5, 39; \ - notLetter: \ - addi a5, a5, 0x30; \ - sw a5, 0 (a2); \ - \ - srai a5, a4, 0; \ - andi a5, a5, 0xF; \ - li a6, 10; \ - blt a5, a6, notLetter2; \ - addi a5, a5, 39; \ - notLetter2: \ - addi a5, a5, 0x30; \ - sw a5, 0 (a2); \ - bne a0, a3,complience_halt_loop2; \ - addi a0, a0, 4; \ - \ - li a4, '\n'; \ - sw a4, 0 (a2); \ - j complience_halt_loop; \ - j complience_halt_break; \ - complience_halt_break:; \ - lui a0,0x90000000>>12; \ - sw a3,0(a0); - - -#define RVMODEL_DATA_BEGIN \ - .align 4; .global begin_signature; begin_signature: \ - -#define RVMODEL_DATA_END \ - .align 4; .global end_signature; end_signature: \ - - -#define RVMODEL_BOOT \ -.section .text.init; \ - .align 4; \ - .globl _start; \ -_start: - - -#define LOCAL_IO_WRITE_STR(_STR) RVMODEL_IO_WRITE_STR(x31, _STR) -#define RVMODEL_IO_WRITE_STR(_SP, _STR) -#define LOCAL_IO_PUSH(_SP) -#define LOCAL_IO_POP(_SP) -#define RVMODEL_IO_ASSERT_GPR_EQ(_SP, _R, _I) -#define RVMODEL_IO_ASSERT_SFPR_EQ(_F, _R, _I) -#define RVMODEL_IO_ASSERT_DFPR_EQ(_D, _R, _I) - -#define RVMODEL_SET_MSW_INT -#define RVMODEL_CLEAR_MSW_INT -#define RVMODEL_CLEAR_MTIMER_INT -#define RVMODEL_CLEAR_MEXT_INT - -#endif // _COMPLIANCE_MODEL_H \ No newline at end of file