vivado-risc-v icon indicating copy to clipboard operation
vivado-risc-v copied to clipboard

Vivado 2018.3 support for the VCU1525 board

Open ncppd opened this issue 2 years ago • 47 comments

Hello and thanks for your work in this repository. I am using Vivado 2018.3 for the VCU1525 board, is there an easy way to port your board files in the older Vivado version?

ncppd avatar Nov 18 '21 14:11 ncppd

Porting to Vivado 2018.3 means creating one file: board/vcu1525/riscv-2018.3.tcl riscv-2020.2.tcl can be used as a starting point and edited to match whatever Vivado 2018.3 requires.

Note that Linux is not currently supported on the VCU1525 board. I have VCU1525 design with 10G Ethernet and Linux using NFS for rootfs, but it is not committed yet - I'm still testing it.

eugene-tarassov avatar Nov 18 '21 18:11 eugene-tarassov

Thank you for your answer. How do you deploy designs on the VCU1525 using Vivado 2021.1 since (as far as I know) the last supported XRT and development shell support the 2018.3 version? Do you have more information regarding deployment on the VCU1525?

Also, are you going to commit Linux support for the VCU1525? It would be nice to have Rocket Chip + Linux support for the VCU1525, I would be glad to help you in this task (for example as a beta tester).

Thank you and sorry for all those questions!

ncppd avatar Nov 19 '21 13:11 ncppd

the last supported XRT and development shell support the 2018.3 version?

I'm not using XRT. I want to keep it simple. For me VCU1525 is just a large FPGA with up to 64GB of DDR4 memory and up to 8 10G Ethernets. This works with any version of Vivado. RISC-V Linux boots with rootfstype=nfs kernel option.

Also, are you going to commit Linux support for the VCU1525?

Yes. Soon. Like in few days.

Rocket Chip + Linux works fine with VCU1525 and Vivado 2021.1, but I see some regression tests failures with other boards and other versions of Vivado. I need to fix, at least, regressions in other boards.

Also, I don't have a boot ROM for VCU1525 yet. I download Linux kernel using JTAG debugger (XSDB). Other boards boot from SD card, but VCU1525 does not have SD card slot, should use TFTP. But I'll commit regardless of that.

eugene-tarassov avatar Nov 19 '21 18:11 eugene-tarassov

Would this mean that after you commit support for the VCU1525, that Rocket Chip + Linux could be easily be ported to the Alveo 250/280 boards? (since the VCU1525 is the development version of these boards)

Thank you for your all your help and support!

ncppd avatar Nov 22 '21 13:11 ncppd

Yes, I think so. As far as I know, VCU1525 is nearly identical to Alveo U200. However, I don't plan to support cloud/data center use case. It is supported by FireSim.

BTW, I have committed first version of the VCU1525 support, e.g.:

make CONFIG=rocket64b2 BOARD=vcu1525 ROOTFS_URL=192.168.0.100:/home/nfsroot/riscv jtag-boot

eugene-tarassov avatar Nov 22 '21 18:11 eugene-tarassov

I am trying to port your design in Vivado 2018.3 using board part xilinx.com:vcu1525:part0:1.1 and I am getting the following errors:

ERROR: [DRC NSTD-1] Unspecified I/O Standard: 277 out of 277 logical ports use I/O standard (IOSTANDARD) value 'DEFAULT', instead of a user assigned specific value. This may cause I/O contention or incompatibility with the board power or connectivity affecting performance, signal integrity or in extreme cases cause damage to the device or the components to which it is connected. To correct this violation, specify all I/O standards. This design will fail to generate a bitstream unless all logical ports have a user specified I/O standard value defined. To allow bitstream creation with unspecified I/O standard values (not recommended), use this command: set_property SEVERITY {Warning} [get_drc_checks NSTD-1]. NOTE: When using the Vivado Runs infrastructure (e.g. launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. Problem ports: m_axi_araddr[31:0], m_axi_arlen[7:0], m_axi_awaddr[31:0], m_axi_awlen[7:0], m_axi_rdata[31:0], m_axi_wdata[31:0], s_axi_araddr[15:0], s_axi_awaddr[15:0], s_axi_bresp[1:0], s_axi_rdata[31:0], s_axi_rresp[1:0], s_axi_wdata[31:0], sdio_dat[3:0], async_resetn, clock... and (the first 15 of 42 listed).

ERROR: [DRC UCIO-1] Unconstrained Logical Port: 277 out of 277 logical ports have no user assigned specific location constraint (LOC). This may cause I/O contention or incompatibility with the board power or connectivity affecting performance, signal integrity or in extreme cases cause damage to the device or the components to which it is connected. To correct this violation, specify all pin locations. This design will fail to generate a bitstream unless all logical ports have a user specified site LOC constraint defined. To allow bitstream creation with unspecified pin locations (not recommended), use this command: set_property SEVERITY {Warning} [get_drc_checks UCIO-1]. NOTE: When using the Vivado Runs infrastructure (e.g. launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. Problem ports: m_axi_araddr[31:0], m_axi_arlen[7:0], m_axi_awaddr[31:0], m_axi_awlen[7:0], m_axi_rdata[31:0], m_axi_wdata[31:0], s_axi_araddr[15:0], s_axi_awaddr[15:0], s_axi_bresp[1:0], s_axi_rdata[31:0], s_axi_rresp[1:0], s_axi_wdata[31:0], sdio_dat[3:0], async_resetn, clock... and (the first 15 of 42 listed).

I ignored these errors by adding set_property BITSTREAM.General.UnconstrainedPins {Allow} [current_design] in board/vcu1525/top/xdc. Is this correct?

After those errors are ignored Vivado reports that write_bitstream completed successfully.

However, after write_bitstream finishes, I am getting the following errors:

ERROR: [Vivado 12-4739] set_false_path:No valid object(s) found for '-through [get_pins -hier RocketChip/clock_ok]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:5] ERROR: [Vivado 12-4739] set_false_path:No valid object(s) found for '-through [get_pins -hier RocketChip/mem_ok]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:6] ERROR: [Vivado 12-4739] set_false_path:No valid object(s) found for '-through [get_pins -hier RocketChip/io_ok]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:7] ERROR: [Vivado 12-4739] set_false_path:No valid object(s) found for '-through [get_pins -hier RocketChip/sys_reset]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:8] ERROR: [Vivado 12-4739] set_max_delay:No valid object(s) found for '-from [get_clocks -of_objects [get_pins -hier SD/clock]]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:31] ERROR: [Vivado 12-4739] set_max_delay:No valid object(s) found for '-from [get_clocks -of_objects [get_pins -hier RocketChip/clock]]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:103] ERROR: [Vivado 12-4739] set_max_delay:No valid object(s) found for '-from [get_clocks -of_objects [get_pins -hier RocketChip/clock]]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:114] ERROR: [Vivado 12-4739] set_max_delay:No valid object(s) found for '-from [get_clocks -of_objects [get_pins -hier ddr4_0/c0_ddr4_ui_clk]]'. [/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/board/timing-constraints.tcl:115]

Do you know how can I correct those errors? Thank you!

ncppd avatar Nov 26 '21 13:11 ncppd

I ignored these errors by adding set_property BITSTREAM.General.UnconstrainedPins {Allow} [current_design] in board/vcu1525/top/xdc. Is this correct?

No, don't do that. You need to set board/vcu1525/riscv_wrapper.v as the top module. Actually, it is set as top by vivado.tcl script, I'm not sure how you got wrong module at the top.

eugene-tarassov avatar Nov 26 '21 19:11 eugene-tarassov

It turns out that the xilinx.com:ip:qdma:4.0 IP version does not exist in Vivado 2018.3, I had to change it to xilinx.com:ip:qdma:3.0. Due to this error the tcl script created the project but did not finalize all the settings correctly. When I tried to re-run make the project had wrong configuration, and I got the above errors. After I fixed the IP version, it compiles correctly, but I have not tested it on the VCU1525 yet. I do not know if version 4.0 of qdma IP is backwards compatible with version 3.0, because I get several critical warnings:

During synthesis Vivado reported that qdma_0 property cfg_mgmt_if: does not exist (critical warning)

[Vivado 12-4739] set_clock_groups:No valid object(s) found for '-group [get_clocks -of_objects [get_ports -scoped_to_current_instance sys_clk]]'. ["/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/workspace/rocket64b2/vivado-vcu1525-riscv/vcu1525-riscv.srcs/sources_1/bd/riscv/ip/riscv_qdma_0_0/ip_0/synth/riscv_qdma_0_0_pcie4_ip_late.xdc":63]

+6 more critical warnings same as this, and

[Vivado 12-5201] set_clock_groups: cannot set the clock group when only one non-empty group remains. ["/media/ncppd/Data/Projects/riscv/hardware/vivado-risc-v/workspace/rocket64b2/vivado-vcu1525-riscv/vcu1525-riscv.srcs/sources_1/bd/riscv/ip/riscv_qdma_0_0/ip_0/synth/riscv_qdma_0_0_pcie4_ip_late.xdc":63]

I am going to test if linux boots on the board and get back to you. Thanks!

ncppd avatar Nov 30 '21 09:11 ncppd

Yes, xilinx.com:ip:qdma:3.0 looks broken. I have seen same critical errors. QDMA is not needed to run RISC-V Linux, you can remove it from the design.

eugene-tarassov avatar Nov 30 '21 19:11 eugene-tarassov

I compiled the bitstream correctly and I am now stuck on the boot flow, I have some questions: I noticed that there are some hardcoded paths in the Makefile such as ROOTFS_URL ?= 192.168.0.100:/home/nfsroot/192.168.0.243. Do those 2 IPs refer to the development machine, the deployment machine or the machine that runs the hardware server? Also, what path should I replace the /home/nfsroot/ with? Regarding the JTAG boot flow, do I have to plug an external JTAG on the IO shield of the VCU1525, or just the PCIe will do? Thanks!

ncppd avatar Dec 01 '21 16:12 ncppd

I noticed that there are some hardcoded paths in the Makefile such as ROOTFS_URL ?= ...

You need to rebuild the bootloader. Run make with parameters like this:

make BOARD=vcu1525 CONFIG=<cfg> \
 ROOTFS_URL=<your NFS server IP>:<NFS directory to mount as root FS> \
 HW_SERVER_ADDR=<your workstation IP> JTAG_BOOT=1  clean bootloader linux

I recommend to create a script to avoid typing the parameters every time.

You can setup NFS server on the development machine or any other machine on your local network, create the directory and make it exported by adding something like this into /etc/exports:

/home/nfsroot 192.168.0.0/24(rw,no_subtree_check,no_root_squash,no_all_squash)

Download rootfs.tar.gz from the Releases area and un-tar it to the NFS directory. During boot, RISC-V Linux kernel will use DHCP to get network info, then mount the directory as the root file system.

Regarding the JTAG boot flow, do I have to plug an external JTAG on the IO shield of the VCU1525, or just the PCIe will do?

You have to plug an external JTAG on the IO shield of the VCU1525. Debugging over PCIe is not supported yet.

eugene-tarassov avatar Dec 01 '21 17:12 eugene-tarassov

I successfully set up nfs and the other components and now make BOARD=vcu1525 completes without errors, I do not know though how to connect to the board. It seems that the board is not getting an IP so I cannot ssh in it. Does this mean that something has gone wrong? Is there another way to connect to Debian running on the board to check if everything works?

ncppd avatar Dec 02 '21 15:12 ncppd

Is there another way to connect to Debian running on the board to check if everything works?

Yes, you can use serial port. When the board USB-JTAG cable is connected, you should see 4 USB serial ports: /dev/ttyUSB0 .. /dev/ttyUSB3. Port #2 (/dev/ttyUSB2) is connected to the FPGA and is used as RISC-V/Linux console. Connect with any serial port communications program, for example minicom, and you will see all boot ROM, u-boot, kernel messages and login prompt.

When FPGA is programmed successfully, you should see, at least, boot ROM message:

RISC-V 64, Boot ROM V3.3

eugene-tarassov avatar Dec 02 '21 18:12 eugene-tarassov

Serial port output of VCU1525 Rocket64b2m booting Linux over JTAG and NFS should look like this:

RISC-V 64, Boot ROM V3.3

OpenSBI v0.9
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : Vivado RISC-V
Platform Features         : medeleg
Platform HART Count       : 32
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 1250000Hz
Platform Console Device   : axi-uart
Platform HSM Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 468 KB
Runtime SBI Version       : 0.3

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*,1*,2*,3*,4*,5*,6*,7*,8*,9*,10*,11*,12*,13*,14*,15*,16*,17*,18*,19*,20*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000000010080
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART ISA             : rv64imafdcsux
Boot HART Features        : scounteren,mcounteren,mcountinhibit
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 36
Boot HART MHPM Count      : 0
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2021.07-dirty (Dec 02 2021 - 13:56:57 -0800)

CPU:   rv64imafdc
Model: freechips,rocketchip-vivado
DRAM:  14 GiB
MMC:
Loading Environment from nowhere... OK
In:    uart@60010000
Out:   uart@60010000
Err:   uart@60010000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Moving Image from 0x81000000 to 0x80200000, end=81316c30
## Flattened Device Tree blob at 00010080
   Booting using the fdt blob at 0x010080
   Loading Device Tree to 0000000084ffc000, end 0000000084fffdff ... OK

Starting kernel ...

[    0.000000] Linux version 5.15.4-dirty (eugene@gate) (riscv64-linux-gnu-gcc (Ubuntu 9.3.0-17ubunt1
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: freechips,rocketchip-vivado
[    0.000000] earlycon: axi_uart0 at MMIO 0x0000000060010000 (options '')
[    0.000000] printk: bootconsole [axi_uart0] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x00000003ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x00000003ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000003ffffffff]
[    0.000000] On node 0, zone DMA32: 512 pages in unavailable ranges
[    0.000000] SBI specification v0.3 detected
[    0.000000] SBI implementation ID=0x1 Version=0x9
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] SBI v0.2 HSM extension detected
[    0.000000] riscv: ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 16 pages/cpu s27480 r8192 d29864 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 3619335
[    0.000000] Kernel command line: root=/dev/nfs rootfstype=nfs rw nfsroot=192.168.0.100:/home/nfsr8
[    0.000000] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
[    0.000000] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 14417300K/14678016K available (6155K kernel code, 4828K rwdata, 2048K rodata,)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=2.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: interrupt-controller@c000000: mapped 8 interrupts with 2 handlers for 4 context.
[    0.000000] random: get_random_bytes called from start_kernel+0x4cc/0x6d6 with crng_init=0
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x127350b88, maxs
[    0.000016] sched_clock: 64 bits at 1250kHz, resolution 800ns, wraps every 4398046510800ns
[    0.009706] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.50 BogoM)
[    0.020495] pid_max: default: 32768 minimum: 301
[    0.028848] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.039338] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.065716] ASID allocator disabled
[    0.070944] rcu: Hierarchical SRCU implementation.
[    0.080959] smp: Bringing up secondary CPUs ...
[    0.094254] smp: Brought up 1 node, 2 CPUs
[    0.112568] devtmpfs: initialized
[    0.133642] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 764504178s
[    0.144079] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.156127] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.168277] thermal_sys: Registered thermal governor 'step_wise'
[    0.168448] thermal_sys: Registered thermal governor 'user_space'
[    0.294796] vgaarb: loaded
[    0.306996] SCSI subsystem initialized
[    0.316117] usbcore: registered new interface driver usbfs
[    0.322595] usbcore: registered new interface driver hub
[    0.328804] usbcore: registered new device driver usb
[    0.344224] clocksource: Switched to clocksource riscv_clocksource
[    0.370434] NET: Registered PF_INET protocol family
[    0.396788] IP idents hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.597150] tcp_listen_portaddr_hash hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.609180] TCP established hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.639137] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.663537] TCP: Hash tables configured (established 131072 bind 65536)
[    0.672947] UDP hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.684867] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.698566] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.712576] RPC: Registered named UNIX socket transport module.
[    0.719117] RPC: Registered udp transport module.
[    0.724287] RPC: Registered tcp transport module.
[    0.729327] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.736381] PCI: CLS 0 bytes, default 64
[    0.750992] workingset: timestamp_bits=62 max_order=22 bucket_order=0
[    0.820702] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.836456] NFS: Registering the id_resolver key type
[    0.842054] Key type id_resolver registered
[    0.846618] Key type id_legacy registered
[    0.852028] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.859747] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.870092] 9p: Installing v9fs 9p2000 file system support
[    0.879100] NET: Registered PF_ALG protocol family
[    0.885011] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.892904] io scheduler mq-deadline registered
[    0.897836] io scheduler kyber registered
[    1.763298] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.783056] 60010000.uart: ttyAU0 at MMIO 0x60010000 (irq = 1, base_baud = 0) is a axi-uart
[    1.792419] printk: console [ttyAU0] enabled
[    1.792419] printk: console [ttyAU0] enabled
[    1.801404] printk: bootconsole [axi_uart0] disabled
[    1.801404] printk: bootconsole [axi_uart0] disabled
[    1.894350] loop: module loaded
[    1.905138] libphy: Fixed MDIO Bus: probed
[    1.931746] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.937871] ehci-pci: EHCI PCI platform driver
[    1.942756] ehci-platform: EHCI generic platform driver
[    1.948677] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.954260] ohci-pci: OHCI PCI platform driver
[    1.959131] ohci-platform: OHCI generic platform driver
[    1.968640] usbcore: registered new interface driver uas
[    1.973652] usbcore: registered new interface driver usb-storage
[    1.981217] mousedev: PS/2 mouse device common for all mice
[    1.990908] usbcore: registered new interface driver usbhid
[    1.995632] usbhid: USB HID core driver
[    2.007032] NET: Registered PF_INET6 protocol family
[    2.022249] Segment Routing with IPv6
[    2.025384] In-situ OAM (IOAM) with IPv6
[    2.029596] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.041576] NET: Registered PF_PACKET protocol family
[    2.047424] 9pnet: Installing 9P2000 support
[    2.051445] Key type dns_resolver registered
[    2.088520] Sending DHCP requests ., OK
[    2.107719] IP-Config: Got DHCP answer from 192.168.0.1, my address is 192.168.0.243
[    2.115201] IP-Config: Complete:
[    2.118450]      device=eth0, hwaddr=00:0a:35:00:00:03, ipaddr=192.168.0.243, mask=255.255.255.0,1
[    2.128577]      host=vcu1525-riscv, domain=largest.net, nis-domain=(none)
[    2.135462]      bootserver=192.168.0.1, rootserver=192.168.0.100, rootpath=
[    2.135666]      nameserver0=192.168.0.1
[    2.146348]      ntpserver0=192.168.0.100
[    2.261141] VFS: Mounted root (nfs4 filesystem) on device 0:15.
[    2.269809] devtmpfs: mounted
[    2.296404] Freeing unused kernel image (initmem) memory: 2128K
[    2.320979] Run /sbin/init as init process
[    2.547184] random: fast init done
[    6.370241] systemd[1]: System time before build time, advancing clock.
[    6.819002] systemd[1]: systemd 249.7-1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +I)
[    6.852376] systemd[1]: Detected architecture riscv64.

Welcome to Debian GNU/Linux bookworm/sid!

[    6.937083] systemd[1]: Hostname set to <debian>.
[   17.279906] systemd[1]: Queued start job for default target Graphical Interface.
[   17.303122] random: systemd: uninitialized urandom read (16 bytes read)
[   17.332859] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[   17.350146] random: systemd: uninitialized urandom read (16 bytes read)
[   17.369944] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[   17.385512] random: systemd: uninitialized urandom read (16 bytes read)
[   17.405440] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[   17.430782] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   17.451523] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password ▒…ts to Console Directory Watch.
[   17.476748] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R▒…uests to Wall Directory Watch.
[   17.499387] systemd[1]: Condition check resulted in Arbitrary Executable File Formats File System.
[   17.513954] systemd[1]: Reached target Local Encrypted Volumes.
[  OK  ] Reached target Local Encrypted Volumes.
[   17.534167] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[   17.550917] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[   17.567171] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[   17.581504] systemd[1]: Reached target Local Verity Protected Volumes.
[  OK  ] Reached target Local Verity Protected Volumes.
[   17.736960] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[   17.769472] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[   17.787447] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[   17.933350] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.
[   17.951566] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[   17.977635] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[   18.011540] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[   18.033712] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[   18.057492] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[   18.097866] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[   18.174718] systemd[1]: Mounting RPC Pipe File System...
         Mounting RPC Pipe File System...
[   18.231471] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[   18.282210] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[   18.309191] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being ski.
[   18.379867] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skip.
[   18.562196] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[   18.650132] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[   18.707630] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[   18.789733] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skippe.
[   18.937959] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[   19.069195] systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
[   19.141807] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[   19.199605] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[   19.447811] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[   19.478169] systemd[1]: Mounted RPC Pipe File System.
[  OK  ] Mounted RPC Pipe File System.
[   19.499248] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[   19.551972] systemd[1]: [email protected]: Deactivated successfully.
[   19.587768] systemd[1]: Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module configfs.
[   19.888798] systemd[1]: [email protected]: Deactivated successfully.
[   19.919954] systemd[1]: Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module drm.
[   20.116931] systemd[1]: [email protected]: Deactivated successfully.
[   20.133323] systemd[1]: Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Module fuse.
[   20.186040] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[   20.276684] systemd[1]: Condition check resulted in Kernel Configuration File System being skippe.
[   20.856502] systemd[1]: Finished Load Kernel Modules.
[  OK  ] Finished Load Kernel Modules.
[   21.003989] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[   21.093066] systemd[1]: Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Remount Root and Kernel File Systems.
[   21.137624] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being sk.
[   21.262715] systemd[1]: Starting Load/Save Random Seed...
         Starting Load/Save Random Seed...
[   21.381928] systemd[1]: Starting Create System Users...
         Starting Create System Users...
[   21.409043] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Apply Kernel Variables.
[   22.887988] systemd-journald[89]: Received client request to flush runtime journal.
[   22.992824] systemd-journald[89]: File /var/log/journal/868e34ab4f9048de907acb1163126971/system.j.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[   25.506057] random: crng init done
[   25.508302] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
[  OK  ] Reached target Local File Systems.
         Starting Preprocess NFS configuration...
         Starting Rule-based Manage▒…for Device Events and Files...
[  OK  ] Finished Preprocess NFS configuration.
[  OK  ] Reached target NFS client services.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting RPC bind portmap service...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Started RPC bind portmap service.
[  OK  ] Reached target Preparation for Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target RPC Port Mapper.
[  OK  ] Found device /dev/ttyAU0.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
         Starting Helper to synchronize boot up for ifupdown...
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
         Starting Raise network interfaces...
[  OK  ] Finished Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target System Time Set.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Periodic ext4 Onli▒…ata Check for All Filesystems.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
         Starting Automounts filesystems on demand...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting Remove Stale Onli▒…t4 Metadata Check Snapshots...
         Starting System Logging Service...
         Starting OpenBSD Secure Shell server...
         Starting User Login Management...
         Starting Permit User Sessions...
[  OK  ] Started System Logging Service.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Serial Getty on ttyAU0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Automounts filesystems on demand.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started User Login Management.
[  OK  ] Reached target Multi-User System.

Debian GNU/Linux bookworm/sid debian ttyAU0

debian login:

eugene-tarassov avatar Dec 02 '21 22:12 eugene-tarassov

I got Linux to boot on the VCU1525 and the Alveo U250 until the stage when it tries to mount the remote filesystem, and now I am trying to figure out on how to setup the QSFP28 connector. From what I have read online either:

  1. I must use an QSFP+ to 4x10G SFP+ cable and connect it to a switch in the lab that has SFP+ ports or
  2. a QSFP+ to SFP port module (such as a Cisco QSFP to SFP SFP+ adapter) and then use an RJ-45 to SFP port module to connect it to a standard 1G RJ-45 port on the switch.

Regarding scenario (1), do you know if the switch will automatically recognize the enabled channel on the board and set up either 1G or 10G speed (if supported)? Will scenario (2) work, since the connection speed will be 1G? Can you give me any hints on what connectors you use on your setup? Thanks!

ncppd avatar Dec 07 '21 10:12 ncppd

I use QSFP+ to 4x10G SFP+ cable and 10G SFP+ switch. The switch automatically recognizes the enabled channel and runs at 10G. I have not tried 1G QSFP to SFP adapter. It probably will require some changes in the design to support 1G speed.

eugene-tarassov avatar Dec 07 '21 17:12 eugene-tarassov

Until I set up the network equipment, is there a way to boot Linux without an internet connection?

ncppd avatar Dec 07 '21 17:12 ncppd

It is possible to download rootfs into RAM over JTAG and tell u-boot to boot the kernel with RAM disk. This involves creating RAM disk image, e.g 'mkimage -A riscv -T ramdisk -C gzip -d "ext4 root fs image" ramdisk', changing kernel arguments to 'root=/dev/ram0 earlycon rw console=ttyAU0,115200n8', XSDB dow command to download the image, and u-boot command like 'booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}'. I don't have a ready-to-use example for this.

eugene-tarassov avatar Dec 07 '21 18:12 eugene-tarassov

I was able to successfully port the VCU1525 board files to the Alveo U250, by following the advice in this issue and from other issues. The system successfully booted into the Debian Linux environment using JTAG with NFS root. One additional step I needed to successfully boot into the NFS root was to change the /etc/fstab file in the NFS root to 192.168.0.0:/home/nfsroot / nfs defaults 0 1 to have the "Remount Root and Kernal File Systems" step succeed during boot.

I also tried to download rootfs into RAM over JTAG, but the download estimated that it would take 25 days to complete, so doing so is impractical.

Geekdude avatar Dec 10 '21 23:12 Geekdude

The system successfully booted into the Debian Linux environment using JTAG with NFS root.

Excellent!

One additional step I needed to successfully boot into the NFS root was to change the /etc/fstab file...

Actually, deleting the line in the /etc/fstab file should work even better, "Remount Root and Kernel File Systems" is redundant step in this case.

eugene-tarassov avatar Dec 11 '21 00:12 eugene-tarassov

BTW, VCU1525 (and Alveo) allows prototyping very large systems. But, according to my tests, large RocketChip configs (e.g. 64x2 64z1 64z2m 64b4m4) are currently unstable, the processor can freeze. I suspect a bug in RocketChip RTL. Smaller configs (e.g. 64b2 64b2m 64b2m2 64b4) are working fine.

eugene-tarassov avatar Dec 11 '21 00:12 eugene-tarassov

Thanks for the information! I'm also interested in running Rocket Chip on Alveo U250 (or U200/U280), and I wonder if you could upstream your development to this repository. I'm nearly new to FPGA and struggling to figure out how to "bring up" everything...

jeehoonkang avatar Dec 22 '21 17:12 jeehoonkang

@jeehoonkang sorry for the late reply, you can check out the pull request I have opened that adds support for the Alveo U250 #67

ncppd avatar Jan 12 '22 18:01 ncppd

@eugene-tarassov Hello, I am running into an error when I try to compile the design with Vivado 2020.2 for the VCU1525 board. After the bitstream generation has completed successfully it fails on the "Download Bitstream" step:

Downloading bitstream
no targets found with "name =~ "Hart #0*"". available targets:
1* xcvu9p 2 RISC-V JTAG DTM (Debug Transport Module timeout) 3 Legacy Debug Hub while executing "error "no targets found with "$params(filter)". available targets:$target_list"" (procedure "targets" line 177) invoked from within "targets -set -filter {name =~ "Hart #0*"}" (file "board/jtag-boot.tcl" line 7) make: *** [Makefile:333: jtag-boot] Error 1

xsdb targets command output:

xsdb% targets
1 xcvu9p 2 RISC-V JTAG DTM (Debug Transport Module timeout) 3 Legacy Debug Hub

It seems that the bitstream is not correctly configured. The command I am using is make CONFIG=rocket64b1 BOARD=vcu1525 ROOTFS_URL=XXX.XXX.XXX.XXX:/home/ncppd/Projects/nfsroot/ jtag-boot Compiling the Project for the U250 boards works perfectly, in this case (VCU1525) I cannot understand why it fails. I tried deleting the project and recompile it from the start but the error persists. I also tried reinstalling Vivado 2020.2 to no avail. Do you have any thoughts on what could be going wrong, I think I am missing something obvious but I cannot pinpoint the issue.

Thanks!

ncppd avatar Feb 15 '22 16:02 ncppd

I see same problem with CONFIG=rocket64b2m2 for the VCU1525 board. Other configs work OK, but I have not tried rocket64b1. I think it has something to do with timing constraints, because it works if I reduce Rocket clock frequency, or make minor changes in the design. It behaves like under-constrained design. I don't have a solution yet.

eugene-tarassov avatar Feb 15 '22 19:02 eugene-tarassov

I'm trying to port my design of Rocket Chip into Alveo U250 as part of my thesis but I encounter some errors regarding xsdb. I am able to generate the bitstream, load xsdb, connect, but when I type "targets" I cannot see the FPGA board listed. Actually, nothing is printed. I use ssh to connect to the remote server where U250 is plugged in. The strangest thing is that other users are able to connect and even port Rocket Chip to U250 with no problem.

As a result of this situation when I try to run

make CONFIG=rocket64b1 BOARD=u250 ROOTFS_URL=[url_here]:[path_to_rootfs] HW_SERVER_ADDR=127.0.0.1:3121 jtag-boot

I encounter the following error:

env HW_SERVER_URL=tcp:127.0.0.1:3121
xsdb -quiet board/jtag-freq.tcl rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems. target list is empty while executing "error "target list is empty"" (procedure "::xsdb::jtag::targets" line 154) invoked from within "jtag targets -set -filter {level == 0 && is_open}" (file "board/jtag-freq.tcl" line 5) Makefile:332: recipe for target 'jtag-boot' failed make: *** [jtag-boot] Error 1

I use Xilinx System Debugger (XSDB) v2020.2. Do you have any ideas what could be wrong?

kosterz96 avatar Feb 27 '22 17:02 kosterz96

It is hard to tell. You can try:

  1. Check U250 USB cable is connected:
eugene@vcu1525:~$ lsusb
Bus 001 Device 002: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
...
  1. Make sure you run HW Server and XSDB on the same machine where U250 is plugged in. If you run XSDB remotely, check HW_SERVER_ADDR value. HW Server cannot run remotely.
  2. Start HW Server with -L- -ljtag command line options to enable printing of JTAG log.

eugene-tarassov avatar Feb 27 '22 18:02 eugene-tarassov

It seems like rebooting twice the machine where U250 is plugged in solved the problem. Is there a way I could skip this part and make it work without rebooting?

kosterz96 avatar Mar 01 '22 10:03 kosterz96

It is not required to reboot the machine - unless something went really wrong. One possibility is that you cannot access the board because it is locked by another instance of HW Server. Perhaps, started by another user. Only one HW Server can access the board at a time.

eugene-tarassov avatar Mar 01 '22 18:03 eugene-tarassov

Hello, I am trying to figure out how to increase the amount of RAM used by the design in order to run SPEC2017 benchmarks suite. I have changed the value of MEMORY_SIZE both into vivado-risc-v//board/u250/Makefile.inc and vivado-risc-v/Makefile. The new value is 0x4000000000. However every time I try to boot I keep getting only 2GB of RAM. I also tried changing rocket64b1 parameters by adding the following line:

new WithExtMemSize(0x3f80000000L) ++

After adding this line U-Boot and /proc/meminfo say than 128GB of RAM are available which is super weird considering that Alveo U250 only supports up to 64GB of RAM. Even so, I think that no more than 2GB of RAM are utilized by Rocket Core because SPEC benchmarks are too memory hungry and /proc/meminfo gives me 126GB of available memory.

So, in order to conclude, my questions are:

  1. I guess MEMORY_SIZE refers to bytes as a hex value, right?
  2. What steps do I have to follow in order to increase available RAM?

Thank you everyone in advance!

kosterz96 avatar Apr 01 '22 13:04 kosterz96