|
| 1 | +# FPGA zcu102 |
| 2 | + |
| 3 | +Author: 杨竣轶(Jerry) github.com/comet959 |
| 4 | + |
| 5 | +```shell |
| 6 | +# Before, Install vivado 2022.2 software |
| 7 | +# Ubuntu 20.04 can work fine |
| 8 | +sudo apt update |
| 9 | + |
| 10 | +git clone https://github.com/U-interrupt/uintr-rocket-chip.git |
| 11 | +cd uintr-rocket-chip |
| 12 | +git submodule update --init --recursive |
| 13 | +export RISCV=/opt/riscv64 |
| 14 | +git checkout 98e9e41 |
| 15 | +vim digilent-vivado-script/config.ini # Env Config |
| 16 | + |
| 17 | +make checkout |
| 18 | +make clean |
| 19 | +make build |
| 20 | + |
| 21 | +# Use vivado to open the vivado project, then change the top file, run synthesis, run implementation, generate bitstream. |
| 22 | +# Connect the zcu102 - Jtag and Uart on your PC. |
| 23 | +# Use dd command to flash the image include boot and rootfs part. |
| 24 | +# Change the boot button mode to (On Off Off Off) |
| 25 | +# Boot the power. |
| 26 | + |
| 27 | +sudo screen /dev/ttyUSB0 115200 # Aarch64 Core Uart |
| 28 | +sudo screen /dev/ttyUSB2 115200 # Riscv Core Uart |
| 29 | + |
| 30 | +# On /dev/ttyUSB0 |
| 31 | +cd uintr-rocket-chip |
| 32 | +./load-and-reset.sh |
| 33 | + |
| 34 | +# Focus on ttyUSB2, then you will see the Riscv Linux Boot Msg. |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +## 在RocketChip中开启H扩展 |
| 41 | + |
| 42 | +```shell |
| 43 | +vim path/to/repo/common/src/main/scala/Configs.scala |
| 44 | +``` |
| 45 | + |
| 46 | +```scala |
| 47 | +// change |
| 48 | +class UintrConfig extends Config( |
| 49 | + new WithNBigCores(4) ++ |
| 50 | + new WithNExtTopInterrupts(6) ++ |
| 51 | + new WithTimebase((BigInt(10000000))) ++ // 10 MHz |
| 52 | + new WithDTS("freechips.rocketchip-unknown", Nil) ++ |
| 53 | + new WithUIPI ++ |
| 54 | + new WithCustomBootROM(0x10000, "../common/boot/bootrom/bootrom.img") ++ |
| 55 | + new WithDefaultMemPort ++ |
| 56 | + new WithDefaultMMIOPort ++ |
| 57 | + new WithDefaultSlavePort ++ |
| 58 | + new WithoutTLMonitors ++ |
| 59 | + new WithCoherentBusTopology ++ |
| 60 | + new BaseSubsystemConfig |
| 61 | +) |
| 62 | + |
| 63 | +// to |
| 64 | + |
| 65 | +class UintrConfig extends Config( |
| 66 | + new WithHypervisor ++ |
| 67 | + new WithNBigCores(4) ++ |
| 68 | + new WithNExtTopInterrupts(6) ++ |
| 69 | + new WithTimebase((BigInt(10000000))) ++ // 10 MHz |
| 70 | + new WithDTS("freechips.rocketchip-unknown", Nil) ++ |
| 71 | + new WithUIPI ++ |
| 72 | + new WithCustomBootROM(0x10000, "../common/boot/bootrom/bootrom.img") ++ |
| 73 | + new WithDefaultMemPort ++ |
| 74 | + new WithDefaultMMIOPort ++ |
| 75 | + new WithDefaultSlavePort ++ |
| 76 | + new WithoutTLMonitors ++ |
| 77 | + new WithCoherentBusTopology ++ |
| 78 | + new BaseSubsystemConfig |
| 79 | +) |
| 80 | + |
| 81 | +``` |
0 commit comments