1:name: FPGA ISP on Zynq
2:description: This script runs Linux with FPGA ISP driver.
3
4using sysbus
5$name?="FPGA-ISP"
6mach create $name
7
8machine LoadPlatformDescription @platforms/boards/mars_zx3.repl
9machine LoadPlatformDescriptionFromString 'virtio: Storage.VirtIOBlockDevice @ sysbus 0x400d0000 { IRQ->gic@32 }'
10machine LoadPlatformDescriptionFromString 'isp: CoSimulated.CoSimulatedPeripheral @ sysbus <0x43c00000, +0x20000> { frequency: 100000; limitBuffer: 1000000; timeout: 10000; 0->gic@29; 1->gic@31; cosimToRenodeSignalRange: <0, +2> }'
11
12sysbus Redirect 0xC0000000 0x0 0x10000000
13
14$bin?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--vmlinux-s_13735336-6a3e10bd5b6d301cc8846490cad6de9ec541e067
15$rootfs?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--rootfs.ext2-s_33554432-cc9664564461b5be36a4d1841e50a760dc7f5ad1
16$dtb?=@https://dl.antmicro.com/projects/renode/zynq-verilated-fpga-isp--video-board.dtb-s_13451-bdb696327471e2247f811b03f37be84df994379a
17$ispLinux?=@https://dl.antmicro.com/projects/renode/libVfpga_isp-Linux-x86_64-12746432362.so-s_2489608-a59deb01cc5c468b4d3e6ff334111616212bed77
18$ispWindows?=@https://dl.antmicro.com/projects/renode/libVfpga_isp-Windows-x86_64-12746432362.dll-s_3674314-2ce8c0c902ab1c4ea8b4768082bb8d1c8d8b4780
19$ispMacOS?=@https://dl.antmicro.com/projects/renode/libVfpga_isp-macOS-x86_64-12746432362.dylib-s_466960-768bc1b71cf8cc6149e535c03c8d7309389f35f3
20
21## set timer frequency ##
22ttc0 Frequency 33333333
23ttc1 Frequency 33333333
24
25### create externals ###
26showAnalyzer sysbus.uart0
27
28### set registers ###
29cpu SetRegister 0 0x000
30cpu SetRegister 1 0xD32 # processor variant (cortex-a9)
31cpu SetRegister 2 0x100 # device tree address
32
33### load binaries ###
34sysbus LoadELF $bin
35sysbus LoadFdt $dtb 0x100 "console=ttyPS0,115200 root=/dev/ram0 rw earlyprintk initrd=0x1a000000,32M" false
36sysbus ZeroRange 0x1a000000 0x800000
37sysbus LoadBinary $rootfs 0x1a000000
38
39isp SimulationFilePathLinux $ispLinux
40isp SimulationFilePathWindows $ispWindows
41isp SimulationFilePathMacOS $ispMacOS
42
43$virtio?=@https://dl.antmicro.com/projects/renode/empty-ext4-filesystem.img-s_33554432-1eb65a808612389cc35a69b81178fbad5708a863
44virtio LoadImage $virtio
45