blob: 9728264226d7d782b29b716305396d1261470534 [file] [log] [blame]
:name: FPGA ISP on Zynq
:description: This script runs Linux with FPGA ISP driver.
using sysbus
$name?="FPGA-ISP"
mach create $name
machine LoadPlatformDescription @platforms/boards/mars_zx3.repl
machine LoadPlatformDescriptionFromString 'virtio: Storage.VirtIOBlockDevice @ sysbus 0x400d0000 { IRQ->gic@32 }'
machine LoadPlatformDescriptionFromString 'isp: Verilated.BaseDoubleWordVerilatedPeripheral @ sysbus <0x43c00000, +0x20000> { frequency: 100000; limitBuffer: 1000000; timeout: 10000; 0->gic@29; 1->gic@31; numberOfInterrupts: 2 }'
sysbus Redirect 0xC0000000 0x0 0x10000000
$bin?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--vmlinux-s_13735336-6a3e10bd5b6d301cc8846490cad6de9ec541e067
$rootfs?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--rootfs.ext2-s_33554432-cc9664564461b5be36a4d1841e50a760dc7f5ad1
$dtb?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--video-board.dtb-s_13451-bdb696327471e2247f811b03f37be84df994379a
$ispLinux?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--libVfpga_isp-Linux-x86_64-2761546208.so-s_2469096-d8cc8cf568b66378feb8be1728b48dfc715bf38e
$ispWindows?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--libVfpga_isp-Windows-x86_64-2761546208.dll-s_3486606-c3c342394dabb4d4bb3a6ae9c7773765f1a9d30a
$ispMacOS?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--libVfpga_isp-macOS-x86_64-2761546208.dylib-s_461448-e6e5a34d7850adba9c3d365a768151256096edad
## set timer frequency ##
ttc0 Frequency 33333333
ttc1 Frequency 33333333
### create externals ###
showAnalyzer sysbus.uart0
### set registers ###
cpu SetRegisterUnsafe 0 0x000
cpu SetRegisterUnsafe 1 0xD32 # processor variant (cortex-a9)
cpu SetRegisterUnsafe 2 0x100 # device tree address
### load binaries ###
sysbus LoadELF $bin
sysbus LoadFdt $dtb 0x100 "console=ttyPS0,115200 root=/dev/ram0 rw earlyprintk initrd=0x1a000000,32M" false
sysbus ZeroRange 0x1a000000 0x800000
sysbus LoadBinary $rootfs 0x1a000000
isp SimulationFilePathLinux $ispLinux
isp SimulationFilePathWindows $ispWindows
isp SimulationFilePathMacOS $ispMacOS
$virtio?=@https://dl.antmicro.com/projects/renode/empty-ext4-filesystem.img-s_33554432-1eb65a808612389cc35a69b81178fbad5708a863
virtio LoadImage $virtio true