-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: Add RT's lpddrtest and make many small fixes
- Add RT's lpddrtest program - Fix bugs in soc/src/ahbxuiconverter - Add if/else block for soc to wally.do - Fix memory address range for external lpddr memory
- Loading branch information
1 parent
f0129cb
commit b5aa6c6
Showing
11 changed files
with
91 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
TARGETDIR := lpddrtest | ||
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef __header | ||
#define __header | ||
|
||
void lpddr_test(); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.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) | ||
cbo.clean 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "header.h" | ||
|
||
int main(){ | ||
lpddr_test(); | ||
return 0; | ||
} |