Build your own RISC-V architecture on FPGA

RISC-V is an open-source hardware instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles, but which we now hope will also become a standard free and open architecture for industry implementations.

RISC-V-Instruction-Lineage-Poster-v6

Architecture overview of lowRISC Implementation of RISC-V

Overview-of-the-minion-infrastructure-·-lowRISC

FPGA RTL Overview:

With ‘lowrisc’ implementation of RISC-V, you have now chance to build your own FPGA board that is capable to run RISC-V architecture:

Running RISC-V on FPGA – Nexys4-DDR board

Pre-requisites before you start the project:

More Information about Nexys4-DDR

Xilinx Nexys4-DDR pinout
Nexys4-DDR_rm

Setup and installation steps:

-Install an Ubuntu 16.04 Linux (youtube)

-Install Vivado 2018.1 (lowrisc)

-Check the Getting started of Pre-Built binaries of Lowrisc Version 0.6 (lowrisc)

-Get the Quickstart project

The original lowrisc quickstart guide may fail at the SDCard preparation:

git clone https://github.com/lowRISC/lowrisc-quickstart.git

sudo mkfs -t msdos /dev/`grep deadbeef-01 cardmem.log | cut -d\” -f2`
mkfs.fat 3.0.28 (2015-05-16)
mkfs.msdos: unable to open /dev/: Is a directory
Makefile:109: recipe for target ‘mkfs’ failed
make: *** [mkfs] Error 1

That is why created a fixed version of quick start, where fixed the Make file:

git clone https://github.com/mazsola2k/lowrisc-quickstart-modernhackers.com.git

cd lowrisc-quickstart-master-modernhackers.com

make getrelease

Identify your Micro SD card in your base Linux machine

fdisk -l
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x865d2999

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1  *         2048 207714303 207712256   99G 83 Linux
/dev/sda2       207716350 209713151   1996802  975M  5 Extended
/dev/sda5       207716352 209713151   1996800  975M 82 Linux swap / Solaris


Disk /dev/sdb: 14.7 GiB, 15811477504 bytes, 30881792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5713046a

Cleaning the disk partiton

make USB=sdb cleandisk partition
rm -f cardmem.log
Checking /dev/sdb
for i in `lsblk -P -o NAME,MOUNTPOINT | grep sdb | grep ‘MOUNTPOINT=”/’ | cut -d\” -f4`; do umount $i; done
Checking /dev/sdb
lsblk -P -o NAME|grep sdb | grep [1-9] && sudo partx -d /dev/sdb
NAME=”sdb1″
sudo sh cardmem.sh /dev/sdb
cardmem.sh: 1: cardmem.sh: source: not found
Checking that no-one is using this disk right now … OK

Disk /dev/sdb: 14.7 GiB, 15811477504 bytes, 30881792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5713046a

Old situation:

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 30881791 30879744 14.7G 83 Linux

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0xdeadbeef.
Created a new partition 1 of type ‘W95 FAT32 (LBA)’ and of size 32 MiB.
/dev/sdb2: Created a new partition 2 of type ‘Linux’ and of size 2 GiB.
/dev/sdb3: Created a new partition 3 of type ‘Linux swap / Solaris’ and of size 512 MiB.
/dev/sdb4: Created a new partition 4 of type ‘Linux’ and of size 512 MiB.
All partitions used.

New situation:

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *       2048   67582   65535   32M  c W95 FAT32 (LBA)
/dev/sdb2         67584 4261887 4194304    2G 83 Linux
/dev/sdb3       4261888 5310463 1048576  512M 82 Linux swap / Solaris
/dev/sdb4       5310464 6359039 1048576  512M 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Checking that no-one is using this disk right now … OK

Disk /dev/sdb: 14.7 GiB, 15811477504 bytes, 30881792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdeadbeef

Old situation:

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *       2048   67582   65535   32M  c W95 FAT32 (LBA)
/dev/sdb2         67584 4261887 4194304    2G 83 Linux
/dev/sdb3       4261888 5310463 1048576  512M 82 Linux swap / Solaris
/dev/sdb4       5310464 6359039 1048576  512M 83 Linux

/dev/sdb4:
New situation:

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *       2048    67582    65535   32M  c W95 FAT32 (LBA)
/dev/sdb2         67584  4261887  4194304    2G 83 Linux
/dev/sdb3       4261888  5310463  1048576  512M 82 Linux swap / Solaris
/dev/sdb4       5310464 30881791 25571328 12.2G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
sleep 2
lsblk -P -o NAME,PARTUUID | grep sdb | grep deadbeef | tail -4 > cardmem.log

Re-format the Partitions:

make USB=sdb mkfs fatdisk extdisk
sudo mkfs -t msdos /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
sudo mkfs -t ext4 /dev/sdb2
mke2fs 1.42.13 (17-May-2015)
/dev/sdb2 contains a ext4 file system
created on Sun Sep 22 04:50:57 2019
Proceed anyway? (y,n) y
Creating filesystem with 524288 4k blocks and 131072 inodes
Filesystem UUID: 7a1328bb-d976-49ac-93bb-b7fcc0d2c1c0
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

sudo mkswap /dev/sdb3
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=733e85b2-e2ce-4c14-a790-5dd8c5d21daf
sudo mkfs -t ext4 /dev/sdb4
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 3225728 4k blocks and 807840 inodes
Filesystem UUID: 834ae9cf-d7b9-42ed-92ba-e18eb6ba7ef0
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

sudo mkdir -p /mnt/sdb1
sudo mount /dev/sdb1 /mnt/sdb1
sudo cp boot.bin /mnt/sdb1
sudo umount /mnt/sdb1
sudo mkdir -p /mnt/sdb2
sudo mount -t ext4 /dev/sdb2 /mnt/sdb2
sudo tar xJf rootfs.tar.xz -C /mnt/sdb2
sudo mkdir -p /mnt/sdb2/mnt/dos
sudo cp fstab.riscv /mnt/sdb2/etc/fstab
sudo sed s=@=root= < firstboot.riscv | sudo tee /mnt/sdb2/etc/profile.d/firstboot.sh
echo ‘This is the firstboot script. It will display only once’
echo ‘Set the superuser (root) password below’
passwd root
echo ‘Creating normal user root …’
adduser root
usermod -a -G sudo root
exec rm /etc/profile.d/firstboot.sh
sudo umount /mnt/sdb2

Connect the FPGA’s mini USB cable to the Linux 16.04 PC and turn on the FPGA

Program the FPGA

make program-cfgmem
vivado -mode batch -source lowrisc-fpga/common/script/program_cfgmem.tcl -tclargs “xc7a100t_0” chip_top.bit.mcs
Vivado v2018.1 (64-bit)
**** SW Build 2188600 on Wed Apr 4 18:39:19 MDT 2018
**** IP Build 2185939 on Wed Apr 4 20:55:05 MDT 2018
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
source lowrisc-fpga/common/script/program_cfgmem.tcl
set mcs [lindex $argv 1]
set device [lindex $argv 0]
puts “CFGMEM: $mcs”
CFGMEM: chip_top.bit.mcs
puts “DEVICE: $device”
DEVICE: xc7a100t_0
open_hw
connect_hw_server
INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121
INFO: [Labtools 27-2222] Launching hw_server…
INFO: [Labtools 27-2221] Launch Output:
Xilinx hw_server v2018.1
**** Build date : Apr 4 2018-18:56:09
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
open_hw_target
INFO: [Labtoolstcl 44-466] Opening hw_target localhost:3121/xilinx_tcf/Digilent/210292A4BF7DA
current_hw_device [lindex [get_hw_devices] 0]
refresh_hw_device -update_hw_probes false [lindex [get_hw_devices] 0]
INFO: [Labtools 27-1434] Device xc7a100t (JTAG device index = 0) is programmed with a design that has no supported debug core(s) in it.
WARNING: [Labtools 27-3361] The debug hub core was not detected.
Resolution:
Make sure the clock connected to the debug hub (dbg_hub) core is a free running clock and is active.
Make sure the BSCAN_SWITCH_USER_MASK device property in Vivado Hardware Manager reflects the user scan chain setting in the design and refresh the device. To determine the user scan chain setting in the design, open the implemented design and use ‘get_property C_USER_SCAN_CHAIN [get_debug_cores dbg_hub]’.
For more details on setting the scan chain property, consult the Vivado Debug and Programming User Guide (UG908).
create_hw_cfgmem -hw_device [lindex [get_hw_devices] 0] -mem_dev [lindex [get_cfgmem_parts {s25fl128sxxxxxx0-spi-x1_x2_x4}] 0]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.ERASE 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.CFG_PROGRAM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.CHECKSUM 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
refresh_hw_device [lindex [get_hw_devices] 0]
INFO: [Labtools 27-1434] Device xc7a100t (JTAG device index = 0) is programmed with a design that has no supported debug core(s) in it.
WARNING: [Labtools 27-3361] The debug hub core was not detected.
Resolution:
Make sure the clock connected to the debug hub (dbg_hub) core is a free running clock and is active.
Make sure the BSCAN_SWITCH_USER_MASK device property in Vivado Hardware Manager reflects the user scan chain setting in the design and refresh the device. To determine the user scan chain setting in the design, open the implemented design and use ‘get_property C_USER_SCAN_CHAIN [get_debug_cores dbg_hub]’.
For more details on setting the scan chain property, consult the Vivado Debug and Programming User Guide (UG908).
set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.FILES [list $mcs] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
startgroup
if {![string equal [get_property PROGRAM.HW_CFGMEM_TYPE [lindex [get_hw_devices] 0]] [get_property MEM_TYPE [get_property CFGMEM_PART [get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]]]] } { create_hw_bitstream -hw_device [lindex [get_hw_devices] 0] [get_property PROGRAM.HW_CFGMEM_BITFILE [ lindex [get_hw_devices] 0]]; program_hw_devices [lindex [get_hw_devices] 0]; };
INFO: [Labtools 27-3164] End of startup status: HIGH
program_hw_cfgmem -hw_cfgmem [get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
Mfg ID : 1 Memory Type : 20 Memory Capacity : 18 Device ID 1 : 0 Device ID 2 : 0
Performing Erase Operation…
Erase Operation successful.
Performing Program and Verify Operations…
Program/Verify Operation successful.
INFO: [Labtoolstcl 44-377] Flash programming completed successfully
program_hw_cfgmem: Time (s): cpu = 00:00:00.39 ; elapsed = 00:03:54 . Memory (MB): peak = 1742.266 ; gain = 10.656 ; free physical = 13135 ; free virtual = 15404
endgroup
INFO: [Common 17-206] Exiting Vivado at Sun Sep 22 05:02:32 2019…

Setup FPGA

JP1 and JP2, the DIP-SW 1 (next to LED1) should be on and the others off.

Place the Micro SD card to the FPGA

Connect Serial console to the FPGA.
-In case of Linux – microcom
-In case of Windows – Putty (with portspeed 115200 setup, otherwise you do not get the real ASCII characters)


Turn-on FPGA, you should see the following Boot log of the Console

lling main with MAC = eee1:e2e3e4e0
0: 0
1: 1
2: 1
3: 1
800: 1e
801: 0
802: 0
803: 0
Selftest iteration 1, next buffer = 0, rx_start = 4000
Selftest matches=2/2, delay = 9
Selftest iteration 2, next buffer = 1, rx_start = 4800
Selftest matches=4/4, delay = 9
Selftest iteration 3, next buffer = 2, rx_start = 5000
Selftest matches=8/8, delay = 9
Selftest iteration 4, next buffer = 3, rx_start = 5800
Selftest matches=16/16, delay = 16
Selftest iteration 5, next buffer = 4, rx_start = 6000
Selftest matches=32/32, delay = 31
Selftest iteration 6, next buffer = 5, rx_start = 6800
Selftest matches=64/64, delay = 60
Selftest iteration 7, next buffer = 6, rx_start = 7000
Selftest matches=128/128, delay = 119
Selftest iteration 8, next buffer = 7, rx_start = 7800
Selftest matches=187/187, delay = 173
lowRISC boot program
Hello LowRISC! Tue Aug 14 10:40:47 2018: Booting from FLASH because SW1 is high ..
u-boot based first stage boot loader
MMC:
mmc created at 86800248, host = 86800200
lowrisc_sd: 0
Device: lowrisc_sd
Manufacturer ID: 3
OEM: 5344
Name: SP64G
Bus Speed: 5000000
High Capacity: Yes
Capacity:
lu.ld GiB
Bus Width: 4-bit
0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ef be ad de 00 00 80 00
1c0: 01 01 0c 3f 1f 20 00 08 00 00 ff ff 00 00 00 00 01 21 83 3f 20 20 00 08 01 00 00 00 40 00 00 00
1e0: 01 21 82 3f a0 20 00 08 41 00 00 00 10 00 00 00 81 21 83 3f 60 e9 00 08 51 00 00 48 1e 07 55 aa
Load boot.bin into memory
|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/-|/–Loaded 8055208 bytes to memory address 87000000 from boot.bin of 8055208 bytes.
hash = f542b0d9d5ba860a5f04748571a6b15b
load elf to DDR memory
Section[0]: memcpy(80000000,0×87001000,0x6c40);
Section[1]: memcpy(80007000,0×87008000,0x59);
memset(80007059,0,0×2007);
Section[2]: memcpy(80200000,0×87009000,0x7a57b4);
Boot the loaded program…
tmp 0000000081a00000
entry_point 0000000080200000
tmp 0000000081a00000
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 – 0x80200000
[ 0.000000] Linux version 4.18.0-gc81ff0d (jrrk2@brexit.cl.cam.ac.uk) (gcc version 7.2.0 (GCC)) #48 Thu Oct 18 16:00:24 BST 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(ptrval) (2357710 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 empty
[ 0.000000] Normal [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000087ffffff]
[ 0.000000] On node 0 totalpages: 32256
[ 0.000000] Normal zone: 504 pages used for memmap
[ 0.000000] Normal zone: 32256 pages, LIFO batch:7
[ 0.000000] software IO TLB mem 0x87dfb000-0x87dfb800 mapped at [(ptrval)-(ptrval)]
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31752
[ 0.000000] Kernel command line: swiotlb=noforce
[ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.000000] Sorting __ex_table…
[ 0.000000] Memory: 118856K/129024K available (3525K kernel code, 243K rwdata, 830K rodata, 2436K init, 783K bss, 10168K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 4 interrupts to 1 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 7052723233920 ns
[ 0.000000] Console: colour dummy device 128×32
[ 0.000000] console [tty0] enabled
[ 0.000000] bootconsole [early0] disabled
[ 5.090000] Console: switching to colour lowrisc device 128×32
[ 5.590000] loop: module loaded
[ 5.710000] libphy: Fixed MDIO Bus: probed
[ 5.720000] lowrisc-digilent-ethernet: Lowrisc ethernet platform (40020000-40027FFF) mapped to ffffffd004018000
[ 5.730000] libphy: GPIO Bitbanged LowRISC: probed
[ 5.740000] Probing lowrisc-0:01
[ 5.850000] SMSC LAN8710/LAN8720 lowrisc-0:01: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=lowrisc-0:01, irq
=POLL)
[ 5.870000] lowrisc-eth 40020000.lowrisc-eth: Lowrisc Ether100MHz registered
[ 5.870000] lowrisc_kbd_probe
[ 5.880000] hid_keyboard address 40030000, remapped to ffffffd004024000
[ 5.890000] input: 40030000.lowrisc-keyb as /devices/platform/soc/40030000.lowrisc-keyb/input/input0
[ 5.890000] Clear any pending input
[ 5.900000] Loading keyboard input device returns success
[ 5.910000] lowrisc_fake_probe
[ 5.910000] fake_keyboard address 40034000, remapped to ffffffd00402c000
[ 5.920000] input: 40034000.lowrisc-fake as /devices/platform/soc/40034000.lowrisc-fake/input/input1
[ 5.930000] This is lowrisc-gpio driver.
[ 5.930000] lowrisc-digilent-sd: Lowrisc sd platform driver (40010000-4001FFFF) mapped to ffffffd004040000
[ 5.980000] lowrisc-sd driver loaded, IRQ 4
[ 5.980000] Card inserted, mask changed to 4
[ 6.000000] NET: Registered protocol family 10
[ 6.020000] Segment Routing with IPv6
[ 6.030000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 6.040000] NET: Registered protocol family 17
[ 6.060000] Loading compiled-in X.509 certificates
[ 6.100000] Freeing unused kernel memory: 2436K
[ 6.110000] This architecture does not have kernel memory protection.
0+1 records in
0+1 records out
Switch selection is 0002
[ 6.350000] User msg 0002, led=200002
[ 6.700000] mmc0: new SDXC card at address aaaa
[ 6.710000] blk_queue_max_hw_sectors: set to minimum 8
[ 6.720000] mmcblk0: mmc0:aaaa SP64G 59.5 GiB
[ 6.740000] mmcblk0: p1 p2 p3 p4
Mounting SD root
[ 8.560000] random: fast init done
[ 8.660000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Mounting proc
Mounting sysfs
Mounting devtmpfs
Mounting devpts
Mounting tmpfs
Executing switch_root for mmc
INIT: version 2.88 booting
[ 12.400000] random: crng init done
[info] Using makefile-style concurrent boot in runlevel S.
[info] Setting the system clock.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the –verbose option to see the details of our search for an access method.
[….] Unable to set System Clock to: Thu Jan 1 00:00:24 UTC 1970 …
[warn (warning).
[….] Activating swap…[ 26.650000] Adding 524284k swap on /dev/mmcblk0p3. Priority:-2 extents:1 across:524284k SS
[ ok
done.
[ 28.650000] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[….] Checking root file system…fsck from util-linux 2.32.1
/dev/mmcblk0p2: clean, 27201/131072 files, 220943/524288 blocks
[ ok
done.
[ 30.970000] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[….] Creating compatibility symlink from /etc/mtab to /proc/mounts. …
[warn (warning).
[….] Activating lvm and md swap…
[ ok done.
[….] Checking file systems…fsck from util-linux 2.32.1
fsck.fat 4.1 (2017-01-24)
/dev/mmcblk0p1: 1 files, 3934/16343 clusters
/dev/mmcblk0p4: clean, 11/3735552 files, 280483/14928128 blocks
[ ok
done.
[….] Cleaning up temporary files… /tmp
[ ok .
[….] Mounting local filesystems…[ 48.560000] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
[ ok
done.
[….] Activating swapfile swap…
[ ok done.
[….] Cleaning up temporary files…
[ ok .
[….] Starting Setting kernel variables: sysctl
[ ok .
[….] Configuring network interfaces…[ 70.180000] Open device, request interrupt 3
[ 70.190000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/ee:e1:e2:e3:e4:e0
Sending on LPF/eth0/ee:e1:e2:e3:e4:e0
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database – sleeping.
[ ok
done.
[….] Starting RPC port mapper daemon: rpcbind
[ ok .
[….] Starting NFS common utilities: statd idmapd
[FAIL failed!
[….] Cleaning up temporary files…
[ ok .
[….] startpar: service(s) returned failure: nfs-common …
[FAIL failed!
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[….] Starting cgroup management daemon: cgmanager[….] Starting system message bus: dbus
[ ok .
[….] Starting cgroup management proxy daemon: cgproxy[….] Starting NTP server: ntpd
[ ok .
Recovering nvi editor sessions.
none found.
[….] Starting OpenBSD Secure Shell server: sshd
[ ok .
Debian GNU/Linux buster/sid lowrisc tty1

You can login as root and setup the password

lowrisc login: root
Linux lowrisc 4.18.0-gc81ff0d #48 Thu Oct 18 16:00:24 BST 2018 riscv64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[ 223.290000] systemd-logind[1163]: New seat seat0.
This is the firstboot script. It will display only once
Set the superuser (root) password below
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Creating normal user root …
adduser: The user `root’ already exists.

Check the RISC-V kernel

uname -a
Linux lowrisc 4.18.0-gc81ff0d #48 Thu Oct 18 16:00:24 BST 2018 riscv64 GNU/Linux

RISC-V Performance stats

run top command on Risc-V

RISC-V list CPU and Memory

If you interested in lowRISC implementation RISC-V in more depth:

lowRISC-memo-2014-001

If you interested in RISC-V Specification:

riscv-spec-20190820

Share with: