mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-22 05:07:21 -04:00
Revert deleted test folder
This commit is contained in:
parent
aa50f69434
commit
809f7f05b5
3 changed files with 46 additions and 0 deletions
1
test/.gitignore
vendored
Normal file
1
test/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.v
|
21
test/Makefile
Normal file
21
test/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
CC = riscv64-unknown-elf-gcc
|
||||
OBJDUMP = riscv64-unknown-elf-objdump
|
||||
ODFLAGS =
|
||||
OBJCOPY = riscv64-unknown-elf-objcopy
|
||||
OCFLAGS =
|
||||
ASFLAGS = -c
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
TESTS = add_test
|
||||
|
||||
.S.o:
|
||||
$(CC) $(ASFLAGS) -o $@ $<
|
||||
|
||||
|
||||
# .c.o:
|
||||
# $(CC) $(CFLAGS) -o $@ -c $<
|
||||
# .v: .S.o
|
||||
|
||||
$(TESTS): $(TESTS).o
|
||||
$(OBJCOPY) -O verilog -I elf64-little $< $@.v
|
24
test/add_test.S
Executable file
24
test/add_test.S
Executable file
|
@ -0,0 +1,24 @@
|
|||
.text
|
||||
nop
|
||||
addi x1, x0, 1
|
||||
addi x2, x0, 1
|
||||
add x3, x1, x2
|
||||
add x3, x1, x2
|
||||
add x4, x2, x3
|
||||
add x5, x3, x4
|
||||
add x6, x4, x5
|
||||
add x7, x5, x6
|
||||
add x8, x6, x7
|
||||
csrw mstatus, x7
|
||||
add x9, x7, x8
|
||||
csrr x1, mstatus
|
||||
nop
|
||||
L0: jal x0, L1
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
L1: jal x0, L0
|
||||
nop
|
||||
nop
|
||||
addi x1, x0, 55
|
Loading…
Add table
Add a link
Reference in a new issue