mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
commit
957a618f68
@ -153,7 +153,7 @@ module loggers import cvw::*; #(parameter cvw_t P,
|
||||
end
|
||||
string AccessTypeString, HitMissString;
|
||||
always @(*) begin
|
||||
HitMissString = dut.core.ifu.bus.icache.icache.CacheHit ? "H" :
|
||||
HitMissString = dut.core.ifu.bus.icache.icache.Hit ? "H" :
|
||||
dut.core.ifu.bus.icache.icache.vict.cacheLRU.AllValid ? "E" : "M";
|
||||
end
|
||||
always @(posedge clk) begin
|
||||
@ -178,7 +178,7 @@ module loggers import cvw::*; #(parameter cvw_t P,
|
||||
flop #(1) ResetDReg(clk, reset, resetD);
|
||||
assign resetEdge = ~reset & resetD;
|
||||
always @(*) begin
|
||||
HitMissString = dut.core.lsu.bus.dcache.dcache.CacheHit ? "H" :
|
||||
HitMissString = dut.core.lsu.bus.dcache.dcache.Hit ? "H" :
|
||||
(!dut.core.lsu.bus.dcache.dcache.vict.cacheLRU.AllValid) ? "M" :
|
||||
dut.core.lsu.bus.dcache.dcache.LineDirty ? "D" : "E";
|
||||
AccessTypeString = dut.core.lsu.bus.dcache.FlushDCache ? "F" :
|
||||
|
19
tests/custom/lpddrtest/Makefile
Normal file
19
tests/custom/lpddrtest/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
TARGETDIR := lpddr_test
|
||||
TARGET := $(TARGETDIR)/$(TARGETDIR).elf
|
||||
ROOT := ..
|
||||
LIBRARY_DIRS := ${ROOT}/crt0
|
||||
LIBRARY_FILES := crt0
|
||||
|
||||
MARCH :=-march=rv64imfdczicbom
|
||||
MABI :=-mabi=lp64d
|
||||
LINKER := ${ROOT}/linker8000-0000.x
|
||||
LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map
|
||||
|
||||
CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2
|
||||
CC=riscv64-unknown-elf-gcc
|
||||
DA=riscv64-unknown-elf-objdump -d
|
||||
|
||||
|
||||
include $(ROOT)/makefile.inc
|
||||
|
||||
|
5
tests/custom/lpddrtest/header.h
Normal file
5
tests/custom/lpddrtest/header.h
Normal file
@ -0,0 +1,5 @@
|
||||
#ifndef __header
|
||||
#define __header
|
||||
|
||||
void lpddr_test();
|
||||
#endif
|
29
tests/custom/lpddrtest/lpddr_test.s
Normal file
29
tests/custom/lpddrtest/lpddr_test.s
Normal file
@ -0,0 +1,29 @@
|
||||
.section .text
|
||||
.globl lpddr_test
|
||||
.type lpddr_test, @function
|
||||
lpddr_test:
|
||||
li t1, 0x90000000
|
||||
addi t5, t1, 0
|
||||
li t2, 0xAABBCCDD00112233
|
||||
|
||||
li t3, 10
|
||||
li t4, 0
|
||||
loop_write:
|
||||
beq t4, t3, done_write
|
||||
sd t2, 0(t5)
|
||||
addi t5, t5, 8
|
||||
addi t4, t4, 1
|
||||
j loop_write
|
||||
done_write:
|
||||
|
||||
li t4, 0
|
||||
addi t5, t1, 0
|
||||
loop_read:
|
||||
beq t4, t3, done_read
|
||||
ld t6, 0(t5)
|
||||
addi t5, t5, 8
|
||||
addi t4, t4, 1
|
||||
j loop_read
|
||||
done_read:
|
||||
ret
|
||||
|
6
tests/custom/lpddrtest/main.c
Normal file
6
tests/custom/lpddrtest/main.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "header.h"
|
||||
|
||||
int main(){
|
||||
lpddr_test();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user