mirror of
https://gitlab.com/brendanhaines/cpu.git
synced 2024-11-09 21:14:57 -07:00
update tests
This commit is contained in:
parent
8901e538e1
commit
625001152d
|
@ -12,7 +12,6 @@ OBJ += $(notdir $(SOURCE_C:.c=.o))
|
||||||
|
|
||||||
CC = riscv64-linux-gnu-gcc
|
CC = riscv64-linux-gnu-gcc
|
||||||
CFLAGS = -march=rv32i -mabi=ilp32
|
CFLAGS = -march=rv32i -mabi=ilp32
|
||||||
# -static -ffreestanding
|
|
||||||
|
|
||||||
CPPFLAGS =
|
CPPFLAGS =
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ initial begin: dump
|
||||||
// for (i=0; i<32; i=i+1) begin
|
// for (i=0; i<32; i=i+1) begin
|
||||||
// $dumpvars(0, dut.regfile[i]);
|
// $dumpvars(0, dut.regfile[i]);
|
||||||
// end
|
// end
|
||||||
$dumpvars(0, mem[ADDR_FAILCODE]);
|
// $dumpvars(0, mem[ADDR_FAILCODE]);
|
||||||
end
|
end
|
||||||
|
|
||||||
reg clk, reset;
|
reg clk, reset;
|
||||||
|
|
|
@ -6,22 +6,24 @@ SOURCE_V += $(wildcard ../common/*.v) $(wildcard ../common/*.sv)
|
||||||
LOGS = $(TESTBENCH_V:.sv=.log)
|
LOGS = $(TESTBENCH_V:.sv=.log)
|
||||||
|
|
||||||
SOURCE_C = $(wildcard *.c)
|
SOURCE_C = $(wildcard *.c)
|
||||||
# SOURCE_C =
|
|
||||||
SOURCE_AS = $(wildcard *.S)
|
SOURCE_AS = $(wildcard *.S)
|
||||||
OBJ = $(notdir $(SOURCE_AS:.S=.o))
|
OBJ = $(notdir $(SOURCE_AS:.S=.o))
|
||||||
OBJ += $(notdir $(SOURCE_C:.c=.o))
|
OBJ += $(notdir $(SOURCE_C:.c=.o))
|
||||||
|
|
||||||
CC = riscv64-linux-gnu-gcc
|
CC = riscv64-linux-gnu-gcc
|
||||||
CFLAGS = -march=rv32i -mabi=ilp32
|
CFLAGS = -march=rv32i -mabi=ilp32
|
||||||
# -static -ffreestanding
|
# CFLAGS = -march=rv64i -mabi=lp64
|
||||||
|
# CFLAGS += -nostdlib -lgcc
|
||||||
|
|
||||||
CPPFLAGS =
|
CPPFLAGS =
|
||||||
|
|
||||||
AS = riscv64-linux-gnu-as
|
AS = riscv64-linux-gnu-as
|
||||||
ASFLAGS = -march=rv32i -mabi=ilp32
|
ASFLAGS = -march=rv32i -mabi=ilp32
|
||||||
|
# ASFLAGS = -march=rv64i -mabi=lp64
|
||||||
|
|
||||||
LD = riscv64-linux-gnu-ld
|
LD = riscv64-linux-gnu-ld
|
||||||
LDFLAGS = -melf32lriscv_ilp32
|
LDFLAGS = -melf32lriscv_ilp32
|
||||||
|
# LDFLAGS =
|
||||||
|
|
||||||
|
|
||||||
# $(info $$TESTBENCH_V is [${TESTBENCH_V}])
|
# $(info $$TESTBENCH_V is [${TESTBENCH_V}])
|
||||||
|
@ -37,7 +39,7 @@ LDFLAGS = -melf32lriscv_ilp32
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
%.s: %.c
|
%.s: %.c
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -S $^ -o $@
|
$(CC) $(CFLAGS) -S $^ -o $@
|
||||||
|
|
||||||
%.elf: %.ld $(OBJ)
|
%.elf: %.ld $(OBJ)
|
||||||
$(LD) $(LDFLAGS) -T $^ -o $@
|
$(LD) $(LDFLAGS) -T $^ -o $@
|
||||||
|
|
|
@ -13,7 +13,7 @@ initial begin: dump
|
||||||
// for (i=0; i<32; i=i+1) begin
|
// for (i=0; i<32; i=i+1) begin
|
||||||
// $dumpvars(0, dut.regfile[i]);
|
// $dumpvars(0, dut.regfile[i]);
|
||||||
// end
|
// end
|
||||||
$dumpvars(0, mem[ADDR_FAILCODE]);
|
// $dumpvars(0, mem[ADDR_FAILCODE]);
|
||||||
end
|
end
|
||||||
|
|
||||||
reg clk, reset;
|
reg clk, reset;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user