Compare commits
No commits in common. "23b5166c3223d01050472f8190f3875fc65eff16" and "cf1b91a48ae35be12c817da02149b0c77d66f97e" have entirely different histories.
23b5166c32
...
cf1b91a48a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,3 @@
|
||||
hw/
|
||||
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
BIN
blackboard.xsa
BIN
blackboard.xsa
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
set SRC_XSA_FILE [lindex $argv 0]
|
||||
set HW_WORK_DIR hw
|
||||
set WORK_XSA_FILE $HW_WORK_DIR/hw.xsa
|
||||
|
||||
exec mkdir "$HW_WORK_DIR"
|
||||
exec cp "$SRC_XSA_FILE" "$WORK_XSA_FILE"
|
||||
|
||||
openhw "$WORK_XSA_FILE"
|
||||
|
||||
61
run.tcl
61
run.tcl
@ -1,61 +0,0 @@
|
||||
set PART xc7z007s
|
||||
set APP_ELF main.elf
|
||||
|
||||
set HW_WORK_DIR hw
|
||||
set HW_WORK_XSA_FILE $HW_WORK_DIR/hw.xsa
|
||||
|
||||
set HW_ADDR_BEGIN 0x40000000
|
||||
set HW_ADDR_END 0xbfffffff
|
||||
|
||||
# Connect to HW server and get target IDS
|
||||
connect
|
||||
|
||||
puts "--- Targets ---"
|
||||
puts "[targets]"
|
||||
puts "--- ------- ---"
|
||||
|
||||
set TARGET_APU [lindex [targets -filter {name =~ "APU*"}] 0]
|
||||
set TARGET_PS0 [lindex [targets -filter {name =~ "*A9*#0"}] 0]
|
||||
set TARGET_PL [lindex [targets -filter {name =~ "$PART"}] 0]
|
||||
|
||||
set TARGET_APU [string trim $TARGET_APU *]
|
||||
set TARGET_PS0 [string trim $TARGET_PS0 *]
|
||||
set TARGET_PL [string trim $TARGET_PL *]
|
||||
|
||||
puts "Target APU ID: $TARGET_APU"
|
||||
puts "Target PS0 ID: $TARGET_PS0"
|
||||
puts "Target PL ID: $TARGET_PL"
|
||||
|
||||
targets $TARGET_APU
|
||||
|
||||
# Reset and wait
|
||||
rst -system
|
||||
after 3000
|
||||
|
||||
# Program PL
|
||||
targets $TARGET_PL
|
||||
fpga -file "$HW_WORK_DIR/bist.bit"
|
||||
|
||||
loadhw -hw "$HW_WORK_XSA_FILE" -mem-ranges [list {0x40000000 0xbfffffff}]
|
||||
|
||||
# Disable access protection for dow command
|
||||
configparams force-mem-accesses 1
|
||||
|
||||
# Init and program PS
|
||||
targets $TARGET_APU
|
||||
|
||||
source "$HW_WORK_DIR/ps7_init.tcl"
|
||||
ps7_init
|
||||
ps7_post_config
|
||||
|
||||
targets $TARGET_PS0
|
||||
|
||||
dow "$APP_ELF"
|
||||
|
||||
# Re-enable access protection
|
||||
configparams force-mem-accesses 0
|
||||
|
||||
# Start
|
||||
targets $TARGET_PS0
|
||||
con
|
||||
|
||||
18
src/main.s
18
src/main.s
@ -1,18 +0,0 @@
|
||||
.text
|
||||
.global main
|
||||
|
||||
@define constants, these can be used as symbols in your code
|
||||
.equ LED_CTL, 0x41210000
|
||||
.set SW_DATA, 0x41220000
|
||||
|
||||
@the set and equ directives are equivalent and can be used interchangeably
|
||||
|
||||
main:
|
||||
ldr r1,=SW_DATA @load switch address from constant
|
||||
ldr r2,=LED_CTL @load LED address from constant
|
||||
loop:
|
||||
ldr r0,[r1] @load switch value *r1 ->r0
|
||||
str r0,[r2] @store value to led register *r2 <-r0
|
||||
b loop @go back to "loop"
|
||||
|
||||
.end
|
||||
Loading…
x
Reference in New Issue
Block a user