GithubHelp home page GithubHelp logo

chipsalliance / veerwolf Goto Github PK

View Code? Open in Web Editor NEW
269.0 27.0 61.0 1.41 MB

FuseSoC-based SoC for VeeR EH1 and EL2

Verilog 84.20% Tcl 3.91% C 1.12% SystemVerilog 8.83% Python 0.08% Makefile 0.05% Assembly 1.38% C++ 0.38% CMake 0.06%
tools fusesoc swerv veer

veerwolf's Introduction

VeeRwolf

VeeRwolf is a FuseSoC-based reference platform for the VeeR family of RISC-V cores. Currently, VeeR EH1 and VeeR EL2 are supported. See CPU configuration to learn how to switch between them.

This can be used to run the RISC-V compliance tests, Zephyr OS, TockOS or other software in simulators or on FPGA boards. Focus is on portability, extendability and ease of use; to allow VeeR users to quickly get software running, modify the SoC to their needs or port it to new target devices.

This project was previously called SweRVolf. The last released version using the old name is v0.7.5

Structure

To ease portability, the SoC consists of a portable technology-agnostic core with target-specific wrappers. This chapter describes the functionality of the core and the technology-specific targets.

VeeRwolf Core

The core of VeeRwolf consists of the VeeR CPU with a boot ROM, AXI4 interconnect, UART, SPI, RISC-V timer and GPIO. The core doesn't include any RAM but instead exposes a memory bus that the target-specific wrapper will connect to an appropriate memory controller. Other external connections are clock, reset, UART, GPIO, SPI and DMI (Debug Module Interface).

VeeRwolf Core

Memory map

Core Address
RAM 0x00000000-0x07FFFFFF
Boot ROM 0x80000000-0x80000FFF
syscon 0x80001000-0x80001FFF
UART 0x80002000-0x80002FFF

RAM

The VeeRwolf core does not contain a memory controller but allocates the first 128MiB of the address for RAM that can be used by a target application and exposes an AXI bus to the wrapper.

Boot ROM

The boot ROM contains a first-stage bootloader. After system reset, VeeR will start fetching its first instructions from this area.

To select a bootloader, set the bootrom_file parameter. See the Booting chapter for more information about available bootloaders.

System controller

The system controller contains common system functionality such as keeping register with the SoC version information, RAM initialization status and the RISC-V machine timer. Below is the memory map of the system controller

Address Register Description
0x00 version_patch VeeRwolf patch version
0x01 version_minor VeeRwolf minor version
0x02 version_major VeeRwolf major version
0x03 version_misc Bit 7 is set when VeeRwolf was built from modified sources
Bit 6:0 revision since last patch version
0x04-0x07 version_sha SHA hash of the build
0x08 sim_print Outputs a character in simulation. No effect on hardware
0x09 sim_exit Exits a simulation. No effect on hardware
0x0A init_status Bit 0 = RAM initialization complete. Bit 1 = RAM initialization reported errors
0x0B sw_irq Software-controlled external interrupts
0x0C-0x0F nmi_vec Interrupt vector for NMI
0x10-0x13 gpio0 32 readable and writable GPIO bits
0x18-0x1B gpio1 32 readable and writable GPIO bits
0x20-0x27 mtime mtime from RISC-V privilege spec
0x28-0x2f mtimecmp mtimecmp from RISC-V privilege spec
0x30-0x33 irq_timer_cnt IRQ timer counter
0x34 irq_timer_ctrl IRQ timer control
0x3C-0x3F clk_freq_hz Clock frequency of main clock in Hz
0x40 SPI_SPCR Simple SPI Control register
0x48 SPI_SPSR Simple SPI status register
0x50 SPI_SPDR Simple SPI data register
0x58 SPI_SPER Simple SPI extended register
0x60 SPI_SPSS Simple SPI slave select register
syscon_base+0x000B sw_irq

This register allows configuration and assertion of IRQ line 3 and 4, for testing the VeeR PIC or having two extra software-controllable interrupt sources. Interrupts can be triggered by writing to the sw_irqn bits when the timer bit is set to 0, or by a timeout of the irq_timer, when the timer bit is set to one. If both sw_irq3_timer and sw_irq4_timer are set to 0, the IRQ timer instead asserts an NMI when it reaches 0.

If sw_irq3_timer or sw_irq4_timer are asserted, the interrupt trigger is connected to

Bits Name Description
7 sw_irq4 Trigger IRQ line 4
6 sw_irq4_edge 0 = IRQ4 is asserted until sw_irq4 is cleared, 1 = Writing to sw_irq4 only asserts IRQ4 for one clock cycle
5 sw_irq4_pol IRQ4 polarity. 0 = Active high, 1 = active low
4 sw_irq4_timer 0 = IRQ4 is triggered by sw_irq4, 1 = IRQ4 is triggered by irq_timer timeout
3 sw_irq3 Trigger IRQ line 3
2 sw_irq3_edge 0 = IRQ3 is asserted until sw_irq3 is cleared, 1 = Writing to sw_irq3 only asserts IRQ3 for one clock cycle
1 sw_irq3_pol IRQ3 polarity. 0 = Active high, 1 = active low
0 sw_irq3_timer 0 = IRQ3 is triggered by sw_irq3, 1 = IRQ3 is triggered by irq_timer timeout
syscon_base+0x0030 irq_timer_cnt

Set or read the IRQ timer counter value. Granularity is in system clock frequency cycles.

syscon_base+0x0034 irq_timer_en

Bit 0 enables or disables one-shot IRQ countdown timer. Automatically disables itself when reaching zero

UART

VeeRwolf contains a ns16550-compatible UART

VeeRwolf sim

VeeRwolf sim is a simulation target that wraps the VeeRwolf core in a testbench to be used by verilator or event-driven simulators such as QuestaSim. It can be used for full-system simulations that executes programs running on VeeR. It also supports connecting a debugger through OpenOCD and JTAG VPI. The Debugging chapter contains more information on how to connect a debugger.

VeeRwolf Simulation target

The simulation target exposes a number of parameters for compile-time and run-time configuration. These parameters are all exposed as FuseSoC parameters. The most relevant parameters are:

  • --jtag_vpi_enable : Enables the JTAG server which OpenOCD can connect to
  • --ram_init_file : Loads a Verilog hex file to use as initial on-chip RAM contents
  • --vcd : Enable VCD dumping

Memory files suitable for loading with --ram_init_file can be created from binary files with the sw/makehex.py script

VeeRwolf Nexys

VeeRwolf Nexys is a version of the VeeRwolf SoC created for the Digilent Nexys A7 board. It uses the on-board 128MB DDR2 for RAM, has GPIO connected to LED, supports booting from SPI Flash and uses the microUSB port for UART and JTAG communication. The default bootloader for the VeeRwolf Nexys target will attempt to load a program stored in SPI Flash by default.

VeeRwolf Nexys A7 target

I/O

The active on-board I/O consists of a LED, a switch and the microUSB connector for UART, JTAG and power.

LEDs

16 LEDs are controlled by memory-mapped GPIO at address 0x80001010-0x80001011

Switches

16 Switches are mapped GPIO addresses at 0x80001012-0x80001013

During boot up, the two topmost switches (sw14, sw15) control the boot mode.

sw15 sw14 Boot mode
off off Boot from SPI Flash
off on Boot from serial
on off Boot from address 0 in RAM
on on Undefined

Note: Switch 0 has a dual purpose and selects whether to output serial communication from the SoC (0=off) or from the embedded self-test program in the DDR2 controller (1=on).

micro USB

UART and JTAG communication is tunneled through the microUSB port on the board and will appear as /dev/ttyUSB0, /dev/ttyUSB1 or similar depending on OS configuration. A terminal emulator can be used to connect to the UART (e.g. by running screen /dev/ttyUSB0 115200) and OpenOCD can connect to the JTAG port to program the FPGA or connect the debug proxy. The debugging chapter goes into more detail on how to connect a debugger.

SPI Flash

An SPI controller is connected to the on-board SPI Flash. This can be used for storing data such as program to be loaded into memory during boot. The SPI uImage loader chapter goes into more detail on how to prepare, write and boot a program stored in SPI Flash

VeeRwolf Basys 3

VeeRwolf Basys 3 is a version of the VeeRwolf SoC created for the Digilent Basys 3 board. It uses 64kB on-chip memory for RAM, has GPIO connected to LEDs and switches, supports booting from SPI Flash and uses the microUSB port for UART and JTAG communication. The default bootloader for the VeeRwolf Basys 3 target will attempt to load a program stored in SPI Flash by default.

VeeRwolf Basys 3 target

I/O

The active on-board I/O consists of LEDs, switches and the microUSB connector for UART, JTAG and power.

LEDs

16 LEDs are controlled by memory-mapped GPIO at address 0x80001010-0x80001011

Switches

16 Switches are mapped GPIO addresses at 0x80001012-0x80001013

During boot up, the two topmost switches (sw14, sw15) control the boot mode.

sw15 sw14 Boot mode
off off Boot from SPI Flash
off on Boot from serial
on off Boot from address 0 in RAM
on on Undefined

micro USB

UART and JTAG communication is tunneled through the microUSB port on the board and will appear as /dev/ttyUSB0, /dev/ttyUSB1 or similar depending on OS configuration. A terminal emulator can be used to connect to the UART (e.g. by running screen /dev/ttyUSB0 115200) and OpenOCD can connect to the JTAG port to program the FPGA or connect the debug proxy. The debugging chapter goes into more detail on how to connect a debugger.

SPI Flash

An SPI controller is connected to the on-board SPI Flash. This can be used for storing data such as program to be loaded into memory during boot. The SPI uImage loader chapter goes into more detail on how to prepare, write and boot a program stored in SPI Flash

How to use

Prerequisites

Install verilator

Create an empty directory, e.g. named veerwolf, to use as the root of the project. This directory will from now on be called $WORKSPACE. All further commands will be run from $WORKSPACE unless otherwise stated. After entering the workspace directory, run export WORKSPACE=$(pwd) to set the $WORKSPACE shell variable.

  1. Make sure you have FuseSoC version 1.12 or newer installed or install it with pip install fusesoc
  2. Add the FuseSoC base library to the workspace with fusesoc library add fusesoc-cores https://github.com/fusesoc/fusesoc-cores
  3. Add the veerwolf library with fusesoc library add veerwolf https://github.com/chipsalliance/VeeRwolf
  4. Make sure you have verilator installed to run the simulation. Note This requires at least version 3.918. The version that is shipped with Ubuntu 18.04 will NOT work

Your workspace shall now look like this:

$WORKSPACE
└──fusesoc_libraries
   ├──fusesoc-cores
   └──veerwolf

After step 3, the VeeRwolf sources will be located in $WORKSPACE/fusesoc_libraries/veerwolf. For convenience, this directory will from now on be refered to as $VEERWOLF_ROOT. Run export VEERWOLF_ROOT=$WORKSPACE/fusesoc_libraries/veerwolf to set this as a shell variable

Install Zephyr SDK

In order to build zephyr application the zephyr SDK must be installed. Attempting to build with west build will tell you which version is needed (if not already installed). It is probably best to go with the oldest recommended version, since it is possible to fail by using a too new SDK (e.g. a compiler that needs options the build system (which is part of the OS release, not the SDK) does not yet know how to provide).

Different versions of the zephyr SDK can be found at (https://github.com/zephyrproject-rtos/sdk-ng/tags). Installation details differ between the versions, but tend to be either a self-contained installer script (e.g. zephyr-sdk-0.13.2-linux-aarch64-setup.run that is applied by

chmod a+x zephyr-sdk-0.13.2-linux-aarch64-setup.run

./zephyr-sdk-0.13.2-linux-aarch64-setup.run

or an archive with an installer script (e.g. zephyr-sdk-0.16.1_linux-x86_64_minimal.tar.xz) which needs to be extracted and the installer run by tar xvf zephyr-sdk-0.16.1_linux-x86_64_minimal.tar.xz cd zephyr-sdk-0.16.1 ./setup.sh

Install Vivado

Vivado is needed to synthesize the design for the nexys A7 target. The standard edition is available free of charge from Xilinx/AMD, but the user needs to register and fill out an export license form. A good place to start is probably https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools.html. Someone doing this for the first time can probably expand on these notes, I already had a registered xilinx user so probably short-circuited part of the process.

Running the SoC

The VeeRwolf SoC can be run in simulation or on hardware (Digilent Nexys A7 currently supported). In either case FuseSoC is used to launch the simulation or build and run the FPGA build. To select what to run, use the fusesoc run command with the --target parameter. To run in simulation use

fusesoc run --target=sim veerwolf

This will load a small example program that prints a string and exits. If you want to rerun the program without rebuilding the simulation model, you can add the --run parameter

fusesoc run --target=sim --run veerwolf

To build (and optionally program) an image for a Nexys A7 board, run

fusesoc run --target=nexys_a7 veerwolf

All targets support different compile- and run-time options. To see all options for a target run

fusesoc run --target=$TARGET veerwolf --help

To list all available targets, run

fusesoc core show veerwolf

To build and run on Riviera-Pro simulator

fusesoc run --target=sim --tool=rivierapro veerwolf

After building any of the targets, there will now be a build in your workspace. This directory contains everything needed to rebuild the target. It can be safely removed and gets rebuilt when building a target again. To use a different build directory, pass --build-root=<output dir> to the run arguments.

Run a precompiled example in simulation

In simulation, VeeRwolf supports preloading an application to memory with the --ram_init_file parameter. VeeRwolf comes bundled with some example applications in the sw directory.

To build the simulation model and run the bundled Zephyr Hello world example in a simulator. fusesoc run --target=sim veerwolf --ram_init_file=$VEERWOLF_ROOT/sw/zephyr_hello.vh. To build and run this example on Riviera-Pro: fusesoc run --target=sim --tool=rivierapro veerwolf --ram_init_file=$VEERWOLF_ROOT/sw/zephyr_hello.vh.

After running the above command, the simulation model should be built and run. At the end it will output

Releasing reset
***** Booting Zephyr OS zephyr-v1.14.0 *****
Hello World! veerwolf_nexys

At this point the simulation can be aborted with Ctrl-C.

Another example to run is the Zephyr philosophers demo.

fusesoc run --run --target=sim veerwolf --ram_init_file=$VEERWOLF_ROOT/sw/zephyr_philosophers.vh
  • Note the --run option which will prevent rebuilding the simulator model

Run RISC-V compliance tests

Note: The following instructions are valid for version 1.0 of the RISC-V compliance tests. The target-specific support for VeeRwolf has not yet been ported to newer versions.

  1. Build the simulation model, if that hasn't already been done, with fusesoc run --target=sim --setup --build veerwolf

  2. Download the RISC-V compliance tests to the workspace with git clone https://github.com/riscv/riscv-compliance --branch 1.0. Your directory structure should now look like this:

     $WORKSPACE
     ├──build
     ├──fusesoc_libraries
     └──riscv-compliance
    
  3. Enter the riscv-compliance directory and run make TARGETDIR=$VEERWOLF_ROOT/riscv-target RISCV_TARGET=veer RISCV_DEVICE=rv32i RISCV_ISA=rv32i TARGET_SIM=$WORKSPACE/build/veerwolf_0.7.5/sim-verilator/Vveerwolf_core_tb

Note: Other test suites can be run by replacing RISCV_ISA=rv32imc with rv32im or rv32i

Note: The TARGET_SIM path needs to be updated to reflect the actual location of Vveerwolf_core_tb

Run on hardware

The VeeRwolf SoC can be built for a Digilent Nexys A7 board with

fusesoc run --target=nexys_a7 veerwolf

If the board is connected, it will automatically be programmed when the FPGA image has been built. It can also be programmed manually afterwards by running fusesoc run --target=nexys_a7 --run veerwolf or running OpenOCD as described in the debugging chapter.

The default bootloader will boot from SPI Flash, RAM or serial depending on the boot mode set by the switches. The default bootloader can be replaced with the --bootrom_file parameter. Note that the boot ROM is not connected to the data port, so it can only execute instructions. Data can not be read or written to this segment. The below example will compile the memtest application and use that as boot ROM instead.

make -C ../$VEERWOLF_ROOT/sw memtest.vh
fusesoc run --target=nexys_a7 veerwolf --bootrom_file=$VEERWOLF_ROOT/sw/memtest.vh

Build Zephyr applications

    $WORKSPACE
    ├──fusesoc_libraries
    ├──...
    └──zephyr

1.Create a West (Zephyr's build tool) workspace in the same directory as the FuseSoC workspace by running west init 2. Add the VeeRwolf-specific drivers and BSP with

west config manifest.path fusesoc_libraries/veerwolf
west update

The workspace should now look like this

    $WORKSPACE
    ├──fusesoc_libraries
    |  ├──...
    |  └──veerwolf
    ├──...
    └──zephyr
  1. Enter the directory of the application to build. Zephyr comes with a number of example applications in the samples directory ($WORKSPACE/zephyr/samples), e.g. $WORKSPACE/zephyr/samples/basic/blinky contains the Zephyr blinky example. From now on, the program to build and run will be called $APP
  2. Build the code with west build -b veerwolf_nexys

After building the code there will now be an executable .elf file in build/zephyr/zephyr.elf and a binary file in build/zephyr/zephyr.bin. The executable file can be loaded into VeeRwolf with a debugger and the binary file can be further converted and loaded into RAM for simulations.

To load the .elf file with a debugger, see Loading programs with OpenOCD

To use the .bin file in a simulator, it must first be converted into a suitable verilog hex file. From the directory where the application was built, run python3 $VEERWOLF_ROOT/sw/makehex.py build/zephyr/zephyr.bin > $WORKSPACE/$APP.hex to create a hex file in the workspace directory. This can now be loaded into a simulator with

fusesoc run --target=sim veerwolf --ram_init_file=$APP.hex

The VeeRwolf demo application in $VEERWOLF_ROOT/sw/veerwolf_zephyr_demo is also a Zephyr program and can be built in the same way

Debugging

VeeRwolf supports debugging both on hardware and in simulation. There are different procedures on how to connect the debugger, but once connected, the same commands can be used (although it's a lot slower in simulations).

Prerequisites

Install the RISC-V-specific version of OpenOCD. (The OpenOCD code shall be no older than commit 22d771d2 from Sep 14, 2020.)

git clone https://github.com/riscv/riscv-openocd
cd riscv-openocd
./bootstrap
./configure --enable-jtag_vpi --enable-ftdi
make
sudo make install

Connecting debugger to simulation

When a VeeRwolf simulation is launched with the --jtag_vpi_enable, it will start a JTAG server waiting for a client to connect and send JTAG commands.

fusesoc run --target=sim veerwolf --jtag_vpi_enable

After compilation, the simulation should now say

Listening on port 5555

This means that it's ready to accept a JTAG client.

Open a new terminal, navigate to the workspace directory and run openocd -f $VEERWOLF_ROOT/data/veerwolf_sim.cfg to connect OpenOCD to the simulation instance. If successful, OpenOCD should output

Info : only one transport option; autoselect 'jtag'
Info : Set server port to 5555
Info : Set server address to 127.0.0.1
Info : Connection to 127.0.0.1 : 5555 succeed
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Info : datacount=2 progbufsize=0
Warn : We won't be able to execute fence instructions on this target. Memory may not always appear consistent. (progbufsize=0, impebreak=0)
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40001104
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

and the simulation should report

Waiting for client connection...ok
Preloading TOP.veerwolf_core_tb.veerwolf.bootrom.ram from jumptoram.vh
Releasing reset

Open a third terminal and connect to the debug session through OpenOCD with telnet localhost 4444. From this terminal, it is now possible to view and control the state of of the CPU and memory. Try this by running mwb 0x80001010 1. This will write to the GPIO register. To verify that it worked, there should now be a message from the simulation instance saying gpio0 is on. By writing 0 to the same register (mwb 0x80001010 0), the gpio will be turned off.

Connecting debugger to Nexys A7

VeeRwolf can be debugged using the same USB cable that is used for programming the FPGA, communicating over UART and powering the board. There is however one restriction. If the Vivado programmer has been used, it will have exclusive access to the JTAG channel. For that reason it is recommended to avoid using the Vivado programming tool and instead use OpenOCD for programming the FPGA as well. Unplugging and plugging the USB cable back will make Vivado lose the grip on the JTAG port.

Programming the board with OpenOCD can be performed by running (from $WORKSPACE)

openocd -f $VEERWOLF_ROOT/data/veerwolf_nexys_program.cfg

To change the default FPGA image to load, add -c "set BITFILE /path/to/bitfile" as the first argument to openocd.

If everything goes as expected, this should output

Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Warn : gdb services need one or more targets defined
loaded file build/veerwolf_0/nexys_a7-vivado/veerwolf_0.bit to pld device 0 in 3s 201521us
shutdown command invoked

OpenOCD can now be connected to VeeRwolf by running

openocd -f $VEERWOLF_ROOT/data/veerwolf_nexys_debug.cfg

This should output

Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
Info : datacount=2 progbufsize=0
Warn : We won't be able to execute fence instructions on this target. Memory may not always appear consistent. (progbufsize=0, impebreak=0)
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40001104
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

Open a third terminal and connect to the debug session through OpenOCD with telnet localhost 4444. From this terminal, it is now possible to view and control the state of of the CPU and memory. Try this by running mwb 0x80001010 1. This will write to the GPIO register. To verify that it worked, LED0 should light up. By writing 0 to the same register (mwb 0x80001010 0), the LED will be turned off.

Loading programs with OpenOCD

OpenOCD support loading ELF program files by running load_image /path/to/file.elf. Remember that the path is relative to the directory from where OpenOCD was launched.

After the program has been loaded, set the program counter to address zero with reg pc 0 and run resume to start the program.

Booting

VeeRwolf is set up by default to read its initial instructions from address 0x80000000 which point to the on-chip boot ROM. A default bootloader is provided which has the capability to boot from SPI Flash, RAM or serial depending on the GPIO pins connected to bits 7:6 in register 0x80001013. The table below summarizes the boot modes

bit7 bit6 Boot mode
0 0 SPI uImage loader
0 1 Jump to RAM
1 0 Serial boot
1 1 Undefined

Jump to RAM

For simulations, the most common option is to load a program into the on-chip RAM and start executing from there. The default bootloader in such cases is a single instruction that jumps to address 0x0 and continues execution from there.

SPI uImage loader

For most applications on real hardware it is preferred to store them in an on-board SPI Flash memory. The SPI uImage loader can read an image in the u-boot uImage format, copy it to RAM and start executing. This process requires creating a suitable image, writing it to Flash and set up the SPI uImage loader to read from the correct address in Flash.

Create a flash image

The mkimage tool available from u-boot is used to prepare an image to be written to Flash. mkimage expects a .bin file, which has been created with iscv64-unknown-elf-objcopy -O binary. Given a $IMAGE.bin we can now create $IMAGE.ub with the following command:

mkimage -A riscv -C none -T standalone -a 0x0 -e 0x0 -n '' -d $IMAGE.bin $IMAGE.ub

Refer to the uimage manual for a description of each parameter. There are also Makefile targets in $VEERWOLF_ROOT/sw/Makefile that can be used as reference.

Writing SPI Flash

Simulation

In order to test the SPI image loading mechanism in simulation, a specific FuseSoC target, spi_tb is available. If no run-time parameters are supplied it will load a prebuilt image containing the hello program (source available in sw/hello.S) from Flash, execute it and exit. This testbench will not work in Verilator as it uses a non synthesizable model of the SPI Flash. The default simulator is instead ModelSim. Other simulators can be used by adding the --tool=$TOOL argument to the command-line.

fusesoc run --target=spi_tb veerwolf

The simulated Flash contents can be changed at compile-time with the --flash_init_file parameter. The model expects a uImage in verilog hex format. Such files can be created by running

objcopy -I binary -O verilog $IMAGE.ub $IMAGE.hex

Nexys A7

For Nexys A7, OpenOCD is used to write to Flash. As the connection to the SPI Flash goes through the FPGA, this consists of a two-stage process where a proxy FPGA image is first written, which will handle communication between OpenOCD and the SPI Flash

  1. Obtain the proxy FPGA image from here and place it in $WORKSPACE
  2. Run openocd -c "set BINFILE $IMAGE" -f $VEERWOLF_ROOT/data/veerwolf_nexys_write_flash.cfg, where $IMAGE is the path to the uImage file that should be written to Flash

Set up SPI uImage loader

The final step is to prepare the bootloader for VeeRwolf which will be responsible for reading the image from Flash, copy it to RAM and execute it. This process is the same for both simulation and hardware targets. Note that both the spi_tb target and nexys_a7 target will have this as the default boot loader so in most cases nothing else needs to be done. There are however a couple of defines in sw/spi_uimage_loader.S that might need to be adjusted if the SPI controller is mapped to another base address or if the image is not stored at address 0 in the Flash.

Serial boot

In serial boot mode, the UART waits for a program in Intel Hex format to be sent to the UART. Upon completion, the program will be launched.

CPU configuration

VeeRwolf currently supports the VeeR EH1 and EL2 cores. For all targets VeeR EH1 is used by default unless there are hardware limitations (e.g. FPGA size) that only allows using VeeR EL2. All targets can optionally use VeeR EL2 by passing --flag=cpu_el2 as a run option to FuseSoC, e.g. fusesoc run --target=sim --flag=cpu_el2 veerwolf will run the default simulation example using VeeR EL2. Also note that the max frequency of the processors can differ. E.g. on the Nexys A7 board VeeR EH1 will run at 50MHz while VeeR EL2 runs at 25MHz. The clk_freq_hz register in the system controller will always show the correct value. The bootloader and Zephyr board support is also set up to automatically adapt timer and UART speeds to the runtime-detected clock speed.

veerwolf's People

Contributors

alistair23 avatar anders-ahlberg avatar bl0x avatar cdhmanning avatar dawidzim avatar janmatcodasip avatar mablinov avatar mgielda avatar olofk avatar sriqamcom avatar thomascp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

veerwolf's Issues

Is it OK to simulate under VCS?

It is ok for verilator.

but if I want to use VCS, fusesoc run --target=sim --tool=vcs --run swervolf --ram_init_file=../cores/Cores-SweRVolf/sw/zephyr_hello.vh

It seems the zephyr did not load into risc-v.

nondeterministic and incorrect behavior of code ran over SweRVolf on Nexys-A7

SweRVolf release: 904f69e

The following implementation of QuickSort is deterministic and contains no undefined behavior (checked with tis-interpreter and with CompCert interpreter; compiles with no warning and runs perfectly otherwise). It should output sorted = true.

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <inttypes.h>

typedef uint32_t data;
void quicksort(data *A, int len);
void data_vec_random(data *a, unsigned len);
bool data_vec_is_sorted(const data *a, unsigned len);

/* Rosetta Code */
void quicksort(data *A, int len) {
  if (len < 2) return;
 
  data pivot = A[len / 2];
 
  int i, j;
  for (i = 0, j = len - 1; ; i++, j--) {
    while (A[i] < pivot) i++;
    while (A[j] > pivot) j--;
 
    if (i >= j) break;
 
    data temp = A[i];
    A[i]     = A[j];
    A[j]     = temp;
  }
 
  quicksort(A, i);
  quicksort(A + i, len - i);
}

data data_random(void) {
  static uint64_t next = 1325997111;
  next = next * 1103515249 + 12345;
  return next;
}

void data_vec_random(data *a, unsigned len) {
  for(unsigned i=0; i<len; i++) {
    a[i] = data_random() % 100;
  }
}

bool data_vec_is_sorted(const data *a, unsigned len) {
  for(unsigned i=0; i<len-1; i++) {
    if (a[i] > a[i+1]) return false;
  }
  return true;
}

#if 0
#include "cycles.h"
#else
typedef int cycle_t;
static cycle_t get_cycle(void) { return 0; }
static void cycle_count_config(void) { }
#define PRcycle "d"
#endif

#define len 1000
static data vec[len];

int main (void) {
  //  printf("stack size = %u\n", CONFIG_MAIN_STACK_SIZE);
  cycle_count_config();
  data_vec_random(vec, len);
  cycle_t quicksort_time = get_cycle();
  quicksort(vec, len);
  quicksort_time = get_cycle() - quicksort_time;
  printf("sorted=%s\n"
	 "time cycles:%" PRcycle "\n",
	 data_vec_is_sorted(vec, len)?"true":"false",
	 quicksort_time);
#if 1
  for(int i=0; i<len-1; i++) {
    if (vec[i] > vec[i+1]) {
      printf("%d %d %d\n", i, (int) vec[i], (int) vec[i+1]);
    }
  }
#endif
  return 0;
}

I compiled it and ran it on SweRVolf on Nexys-A7 (tried both with netlist generation with Vivado 2018.2 and Vivado 2020.1). Executions are incorrect and nondeterministic :

*** Booting Zephyr OS build v2.4.0-rc2-106-g25c0810ae2e6  ***
sorted=false
time cycles:0
25 3 1
660 64 32
*** Booting Zephyr OS build v2.4.0-rc2-106-g25c0810ae2e6  ***
sorted=false
time cycles:0
770 74 68
808 79 77

The problem applies whether this program is compiled by Zephyr's default gcc, or compiled with CompCert then assembled by Zephyr's gcc.

I also had weird behavior with other programs.

quicksort.tar.gz

Setup fails with error about cdc_utils

I'm just getting started with fusesoc and SweRVolf, so sorry if this is actually a simple issue.

When I try, for example:

   fusesoc run --target=sim swervolf

I get the following:

ERROR: Setup failed : Failed to download 'https://github.com/fusesoc/cdc_utils/archive/v0.1.tar.gz'. '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'

The URL that appears in the error message doesn't seem to exist: my browser can get to 'https://github.com/fusesoc/cdc_utils/', but there's no subdirectory 'archive'. I do some other subdirectories, but haven't yet learned enough about fusesoc to see how I could eliminate this error.

Many thanks for creating fusesoc, for all the contributions to Risc V, and for any help you can offer.

Running pre-compiled zephyr examples failed

When I tried to run precompiled Zephyr examples it failed giving the following reason,
": $readmem file not found"
Aborting...
ERROR: Failed to run ::swervolf:0.7 : './Vswervolf_core_tb' exited with an error code

It would be great to know what caused this unexpected error.

Thanks,
Kiran Khunte

fusesoc run --target=nexys_a7 swervolf with Vivado 2020.1

================================================================================
INFO: Wrote dependency graph to /home/nicolast0604/swervolf/build/swervolf_0.7.3/nexys_a7-vivado/swervolf_0.7.3.deps-after-generators.dot
INFO: Wrote Makefile fragment to /home/nicolast0604/swervolf/build/swervolf_0.7.3/nexys_a7-vivado/core-deps.mk
INFO: Setting up project

INFO: Building
vivado -notrace -mode batch -source swervolf_0.7.3.tcl
/bin/bash: vivado: command not found
Makefile:17: recipe for target 'swervolf_0.7.3.xpr' failed
make: *** [swervolf_0.7.3.xpr] Error 127
ERROR: Failed to build ::swervolf:0.7.3 : 'make' exited with an error code

Riviera-PRO common compilation

Is there any option to automatized merge Edalize version with Riviera-PRO common compilation mode to FuseSoC?
Now I must install FuseSoC, download new version of Edalize and copy rivierapro.py to main folder of Edalize

bscan_tap module - how does it work?

Hi Olof,

I'm new in FPGAs and wondering how does your bscan_tap module work ? where are the definitions / descriptions of the BSCAN2 modules? How are some internal wires driven?

Thanks in advance
Alex

Unsupported board in build Zephyr applications

I am getting an error while building Zephyr application.
The error states that "Unsupported board: led0 devicetree alias not defined".

According to this error, the swervolf_nexys board is not supported by Zephyr application but in the command line, we are giving the same board.

Any feedback will be really appreciated.

Thanks,
Kiran Khunte

Incompatible modport connection in axi_node_wrap_with_slives

Hey!
In module axi_node_wrap_with_slices is incompatible modport connection, problem is here:

module axi_node_wrap_with_slices  #(
(...))(
(...)
    AXI_BUS.Slave    slave  [NB_SLAVE-1:0], 
    AXI_BUS.Master   master [NB_MASTER-1:0],
(...)
);

and then:

       axi_multicut #(
            .ADDR_WIDTH ( AXI_ADDR_WIDTH     ),
            .DATA_WIDTH ( AXI_DATA_WIDTH     ),
            .USER_WIDTH ( AXI_USER_WIDTH     ),
            .ID_WIDTH   ( AXI_ID_OUT         ),
            .NUM_CUTS   ( MASTER_SLICE_DEPTH )
        ) i_axi_slice_wrap_master (
            .clk_i      ( clk           ),
            .rst_ni     ( rst_n         ),
            .in         ( axi_master[i] ), // from the node
            **.out        ( master[i]     )  // to IO ports**
        );

but port out is:

module axi_multicut #(
(...)
)(
(...)
  AXI_BUS.out out
);

So this connection is incompatible

VERSION_PATCH macro not defined

Hello,

The command "fusesoc run --target=nexys_a7 swervolf" fails with the following log output:

WARNING: [Synth 8-2841] use of undefined macro VERSION_PATCH [/home/luis/SwerRVolf/build/swervolf_0.7/src/swervolf_0.7/rtl/swervolf_syscon.v:98]
ERROR: [Synth 8-2715] syntax error near ; [/home/luis/SwerRVolf/build/swervolf_0.7/src/swervolf_0.7/rtl/swervolf_syscon.v:98]
INFO: [Synth 8-2350] module swervolf_syscon ignored due to previous errors [/home/luis/SwerRVolf/build/swervolf_0.7/src/swervolf_0.7/rtl/swervolf_syscon.v:24]
Failed to read verilog '/home/luis/SwerRVolf/build/swervolf_0.7/src/swervolf_0.7/rtl/swervolf_syscon.v'

Defining this macro solves the problem.

Regards

fusesoc run --target=basys3 with vivado 2021.2

/tools/Xilinx/Vivado/2021.2/bin/rdiArgs.sh: line 311: 8214 Killed "$RDI_PROG" "$@"
[Mon Nov 8 11:38:08 2021] synth_1 finished
WARNING: [Vivado 12-8222] Failed run(s) : 'synth_1'
wait_on_runs: Time (s): cpu = 00:01:22 ; elapsed = 00:19:07 . Memory (MB): peak = 2594.328 ; gain = 0.000 ; free physical = 212 ; free virtual = 1196
ERROR: [Common 17-70] Application Exception: Failed to launch run 'impl_1' due to failures in the following run(s):
synth_1
These failed run(s) need to be reset prior to launching 'impl_1' again

Investigating cache performance with burst wrap reads

This is not a bug report, I would like some help reading the implementation.
I would like to study the data cache and memory controller subsystem.

The aim of my research is to investigate how the order (incrementing/decrementing) of stack access sequences affects performance on a cache miss, if the cache requests data from the memory controller as a wrapped burst.

For now I was only able to find this code, where the burst is defined as INCR, but the length is a single beat.
This is not really a burst, and I think this is because the request here is done by the load/store unit and not the cache.
https://github.com/chipsalliance/Cores-SweRV/blob/master/design/lsu/lsu_bus_buffer.sv#L879-L880

Could somebody help me find the cache code related to AXI4 burst accesses?

Fusesoc Simulation Error

$ fusesoc run --target=sim swervolf
INFO: Preparing ::cdc_utils:0.1
INFO: Downloading fusesoc/cdc_utils from github
INFO: Preparing chipsalliance.org:cores:SweRV_EH1:1.8
INFO: Downloading chipsalliance/Cores-SweRV from github
INFO: Preparing fusesoc:utils:generators:0.1.5
INFO: Downloading fusesoc/fusesoc-generators from github
INFO: Preparing ::jtag_vpi:0-r5
INFO: Downloading fjullien/jtag_vpi from github
INFO: Preparing pulp-platform.org::common_cells:1.16.4
INFO: Downloading pulp-platform/common_cells from github
INFO: Preparing ::simple_spi:1.6.1
INFO: Downloading olofk/simple_spi from github
INFO: Preparing ::uart16550:1.5.5-r1
INFO: Downloading olofk/uart16550 from github
INFO: Preparing ::verilog-arbiter:0-r3
INFO: Downloading bmartini/verilog-arbiter from github
INFO: Preparing ::wb_common:1.0.3
INFO: Downloading fusesoc/wb_common from github
INFO: Preparing pulp-platform.org::axi:0.23.0-r1
INFO: Downloading pulp-platform/axi from github
INFO: Preparing ::wb_intercon:1.2.2-r1
INFO: Downloading olofk/wb_intercon from github
INFO: Preparing ::swervolf:0.7.2
INFO: Generating ::swervolf-intercon:0.7.2
ERROR: Setup failed : "python3 E:\cygwin64\home\Hamza.cache\fusesoc\pulp-platform.org__axi_0.23.0-r1\scripts/axi_intercon_gen.py E:\cygwin64\home\Hamza.cache\fusesoc\generated\swervolf-intercon_0.7.2\i
ntercon_input.yml" exited with an error code. See stderr for details.

I'm using Cygwin terminal inside windows 10.
My Versions :
FuseSoC :1.11.0
Python : 3.6.4 ( Tried 3.9.1 as well )

I've tried virtual Environments aswell but I am still facing this same Issue.

Kindly help.

Compilation failed for EH1 with Verilator

Hi @olofk

I test Cores-SweRVolf (EH1) using command "fusesoc run --target=sim swervolf"
Fusesoc version: 1.11.dev35+gd648377
Verilator version: 4.020 (also try with 4.030)
OS version Red Hat Enterprise Linux
The compilation is failed due to undefined SV macros (see screenshot).
Could you consider this issue

Thanks
image

Which are the steps to run baremetal c routines?

Hi all,

I am trying to run baremetal C programs with SweRVolf running on Nexys A7. I don't use Zephyr OS because I would like to do some specific experiments.

At first, I made blinky.c based on blinky.S in this repo. However, I have some issues to run the code.
There are three files: crt.s, blinky.c, link.ld

crt.s

.section .text.init
.global _start
_start:

        #li t0, 0x59555555
        #csrw 0x7c0, t0

        la sp, STACK

        call main

blinky.c

#include <stdint.h>

#define GPIO_BASE 0x80001010

volatile uint32_t* const port_led     = (uint32_t*) GPIO_BASE;

void main()
{
    uint32_t i=0;

    while(1){
        *port_led |= (1<<3);   // led-on
        for(i=0;i<100000;i++);
        *port_led &= ~(1<<3);  // led-off
        for(i=0;i<100000;i++);
    }
}

link.ld

OUTPUT_ARCH( "riscv" )
ENTRY(_start)

SECTIONS {
    . = 0;
  .text   : { *(.text*) }
  .data  :  { *(.*data) STACK = ALIGN(16) + 0x2000;}
  .bss : { *(.bss) }
}

To compile and generate the .elf file:

riscv64-unknown-elf-gcc -S -nostartfiles -nostdlib -march=rv32im -mabi=ilp32 -O3 -fomit-frame-pointer -fPIC -no-pie -Tlink.ld blink.c -o blink.s -lc

riscv64-unknown-elf-gcc -nostartfiles -nostdlib -march=rv32im -mabi=ilp32 -O3 -fomit-frame-pointer -fPIC -no-pie -Tlink.ld -oblinky.elf blink.s crt0.s -lc

I am able to turn on the leds, but when I try to do the "blinky" with the for loop, the led has a strange behaviour and doesn't blink as expected. The intensity of the led is very low in comparison with the blinky.S example.

On the other hand, I don't know if the STACK is well defined in linkerscript and crt0.s. These files are based on the files in SweRV-EL2 repo. For example, the following code:

#include <stdint.h>

#define GPIO_BASE   0x80001010
#define SWITCH_BASE 0x80001012

volatile uint32_t* const port_led     = (uint32_t*) GPIO_BASE;
volatile uint32_t* const port_sw      = (uint32_t*) SWITCH_BASE;

void delay()
{
    uint32_t i=0;
    for(i=0;i<100000;i++);
}

void main()
{
    int i=0;
    while(1){

        *port_led |= (1);   // led-on
        delay();
        *port_led &= ~(1);  // led-off
        delay();
    }
}

If the delay is defined in another function, the task doesn't work. Definitely I have something wrong in the stack definition.

If there is an example with every step that I should follow is highly appreciated. I would like to run benchmaks in C (baremetal) using this SoC, because I already have tests running on the SweRV-EL2 core running on Verilator and I would like to adapt it.

Thanks in advance,
Yao-Ming

[Nexys4 DDR] Struggling to load into ICCM (address 0xEE000000)

Hi all,

I've been interested in running some tests on the SweRVolf, and have been succesfully programming it within the RAM region (0x00000000-0x07FFFFFF) and the DCCM region (0xF0040000-0xF004FFFF).

However, as I understand the EH1 core also has a memory region called "ICCM" for fast instruction access, at (0xEE000000-0xEE00FFFF).

The DCCM works quite well: Infact I've already got some figures for the memory bandwidth:

code in RAM, data in RAM: read @ 21.5MB/s, write @ 25MB/s
code in RAM, data in DCCM: read @ 136MB/s, write @ 136MB/s

(p.s. not sure why RAM is slower to read than to write, but anyway...)

What I'd like to do now is to put my code into ICCM - but I'm having issues loading it. Here is my gdb input:

(gdb) tar rem :3333
Remote debugging using :3333
_finish () at crt0.s:32
32              beq x0, x0, _finish
(gdb) load
Loading section .text.init, size 0x30 lma 0x10000
Loading section .text, size 0x812 lma 0x10030
Loading section .data, size 0xaf lma 0x20000
Loading section .text.iccm, size 0x1a lma 0xee000000
Start address 0x00010000, load size 2315
Transfer rate: 10 KB/sec, 578 bytes/write.
(gdb)

And here are the OpenOCD errors that I see after issuing the load gdb command:

Info : accepting 'gdb' connection on tcp/3333
Error: Target riscv.cpu: Failed to write memory (addr=0xee000000)
Error:   progbuf=disabled, sysbus=disabled, abstract=failed

If I try memory dumping the location, I get

(gdb) x/8x 0xee000000
0xee000000 <run_in_iccm>:       0x00000000      0x00000000      0x00000000      0x00000000
0xee000010 <run_in_iccm+16>:    0x00000000      0x00000000      0x00000000      0x00000000

and OpenOCD also spews out more errors at me:

Error: Target riscv.cpu: Failed to read memory (addr=0xee000000)
Error:   progbuf=disabled, sysbus=disabled, abstract=failed
Error: Target riscv.cpu: Failed to read memory (addr=0xee000004)
Error:   progbuf=disabled, sysbus=disabled, abstract=failed
...(trimmed)...
Error: Target riscv.cpu: Failed to read memory (addr=0xee00001c)
Error:   progbuf=disabled, sysbus=disabled, abstract=failed

The OpenOCD launch command is openocd -f swervolf_nexys_debug.cfg and the swervolf_nexys_debug.cfg is the default one supplied with the repo (md5sum: af7ea2b7922e9b34f8e578c18bbccfbd)

openocd --version report: (p.s. Ignore the bb96dc521 - that is my commit to fix the texinfo documentation build on my old ubuntu. the actual last meaningful commit is 5215fc52a Fix flashing on HiFive1. (#649))

Open On-Chip Debugger 0.11.0+dev-02000-gbb96dc521 (2021-10-08-15:57)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html

Any ideas? I'm pretty sure there is an ICCM present, because if I look into the following file in the core build directory (build/swervolf_0.7.4/nexys_a7-vivado/config/common_defines.vh), I find

...(stripped output)...
`define RV_ICCM_SADR 32'hee000000
`define RV_ICCM_OFFSET 10'he000000
`define RV_ICCM_BANK_BITS 3
`define RV_ICCM_INDEX_BITS 14
`define RV_ICCM_SIZE_512 
`define RV_ICCM_EADR 32'hee07ffff
`define RV_ICCM_ROWS 16384
`define RV_ICCM_NUM_BANKS 8
`define RV_ICCM_RESERVED 'h1000
`define RV_ICCM_SIZE 512
`define RV_ICCM_NUM_BANKS_8 
`define RV_ICCM_BITS 19
`define RV_ICCM_REGION 4'he
`define RV_ICCM_DATA_CELL ram_16384x39

So it's definitely at 0xee000000, and it should be present, but I'm struggling to load into it. Should I be manually enabling the ICCM?

SweRV EL2 with External Sram memory issue

Hi,
I am going to do ASIC of SweRV EL2 for that I am using SRAM as a external memory with a memory controller (axi2mem sram adapter) but I am facing a issue during fetching instruction, core is fetching the instruction only at the starting address of the instruction which is 0000000 and remain same at all the cycle.
image
The above pictures shows the simulation of SweRV EL2 in which at the dout0 sram signal , only 2 3 instruction is reading
image
In he second picture . the ifu_axi_aradder is not incremented and not getting ifu_axi_rvalid. Where as it is working fine with blockRAM on fpga using xilinx ip block memory generator
Here is https://github.com/merledu/Rev-Soc-ASIC.git
instantiate SRAM in the design/Rev-top

fusesoc run --target=sim swervolf with Verilator=3.918

%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:403: Define or directive not defined: RV_BTB_ADDR_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:403: Define or directive not defined: RV_BTB_BTAG_SIZE
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418: Define or directive not defined: RV_BTB_ADDR_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418: syntax error, unexpected ':', expecting TYPE-IDENTIFIER %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418: Define or directive not defined: RV_BTB_ADDR_LO
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:421: Define or directive not defined: RV_BTB_ADDR_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:421: Define or directive not defined: RV_BTB_ADDR_LO
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:421: Define or directive not defined: RV_BTB_INDEX1_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:421: Define or directive not defined: RV_BTB_INDEX1_LO
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:424: Define or directive not defined: RV_BTB_INDEX2_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:424: Define or directive not defined: RV_BTB_INDEX2_LO
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:427: Define or directive not defined: RV_BTB_INDEX3_HI %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:427: Define or directive not defined: RV_BTB_INDEX3_LO
%Error: Exiting due to too many errors encountered; --error-limit=50
%Error: Command Failed /tools/verilator/3.918/bin/verilator_bin -f swervolf_0.7.3.vc --trace -Wno-fatal
Makefile:16: recipe for target 'Vswervolf_core_tb.mk' failed
make: *** [Vswervolf_core_tb.mk] Error 10
ERROR: Failed to build ::swervolf:0.7.3 : 'make' exited with an error code

verilator + openocd + gdb simulation issue

I have some problem when running simulation with "verilator+openocd+gdb".
'step' or 'continue' command in gdb do not work well. (there is no next gdb prompt after the commands)
I don't know what the problem is.
Please help me.

Actually, I run the test as below,
- run simulation in terminal A
fusesoc run --target=sim swervolf --jtag_vpi_enable
- run openocd in terminal B
openocd -f $SWERVOLF_ROOT/data/swervolf_sim.cfg
- run gdb in terminal C (hello.elf is build in sw folder)
riscv64-unknown-elf-gdb ./hello.elf
- gdb commands
(gdb) set remotetimeout 50000
(gdb) target remote localhost:3333
(gdb) load
(gdb) s
--> no response forever

Thank you.

debugging is not working !!!

I am following the 'debugging' sequences.
In normal simulation, "SweRV+FuseSoC rocks" is displayed.
But, in debug mode, there is no response from simulator after "releasing reset" message.
Please check the simulation results, as below,
Thanks in advance.

[test sequences]

  • in terminal A
    fusesoc run --target=sim --run swervolf --jtag_vpi_enable
  • in terminal B
    openocd -f $SWERVOLF_ROOT/data/swervolf_sim.cfg
  • in terminal C
    telnet localhost 4444

[terminal message output]
- in terminal A
INFO: Running
INFO: Running simulation
Starting jtag_vpi server: interface 127.0.0.1 (loopback), port 5555/tcp ...
jtag_vpi server created.
Waiting for client connection...
Client connection accepted.
JTAG VPI enabled. Not loading RAM
Releasing reset

- in terminal B
Open On-Chip Debugger 0.10.0+dev-01402-gccb21ab5a (2020-10-20-17:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : Set server port to 5555
Info : Set server address to 127.0.0.1
Warn : riscv set_prefer_sba is deprecated. Please use riscv set_mem_access instead.
Info : Connection to 127.0.0.1 : 5555 succeed
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Info : datacount=2 progbufsize=0
Warn : We won't be able to execute fence instructions on this target. Memory may not always appear consistent. (progbufsize=0, impebreak=0)
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40001104
Info : starting gdb server for riscv.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'telnet' connection on tcp/4444

- in terminal C
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger

load_image /home/kdlee/work/riscv/chipsalliance/Cores-SweRVolf/sw/hello.elf
69 bytes written at address 0x00000000
downloaded 69 bytes in 4.572055s (0.015 KiB/s)

reg pc 0
pc (/32): 0x00000000

resume

how to change the CPUs clock frequency

Hi @olofk,

I'm trying to add new features/operations and make experiments with the SweRV-EL2 core.
So I would like to be able to change the clock frequency and make it independent from the DDR controller / AXI CDC.

I saw the clock diagram here, but I don't know where to touch in order to change only the clk_core since this signal is related to AXI cdc. When I try to modify frequency of clk_core, I have timing issues there.

Thanks in advance,
Yao-Ming

Running Compliance Test for Swerv

I am trying to do compliance test for swerv core using the mentioned guideline, but my result is;

0th Pic

I am new to compliance thing and I will post my each step so that understanding of the whole scenario is clear.

1. I am following this section below;
8th Pic

2. When I acted exactly as mentioned in this section, I got these directories (exception is for gnu-riscv-toolchain, which I added myself)
1st Pic

3. This is my riscv-target directory;
3rd Pic

4. Upon running this thing as it is, I got few errors like there is no directory named rv32i_m/rv32i in riscv-test-suite. So I changed makefile.include, makefile in riscv-compliance directory and also added rv32i directory in riscv-test-suite. Below are pictures;
4th Pic
6th Pic
7th Pic

5. I also edited makefile.include in riscv-target/swerv/device/ directory, which is as under;
9th Pic

6. I also got error that model_test.h file not found, so I copied it from some example folder of riscv-arch-test repo (might be I did wrong here). Here is pic;
10th Pic

7. Finally here is my work/rv32i_m/rv32i directory;
11th Pic

8. Kindly do guide me and resolve this issue. You can suggest me any other simulator or any repo (where you have done swerv compliance test). If i am missing any detail, plz do mention.

Zephyr with adxl362 fails to compile

Hi,
I'm trying to add adxl362 accelerometer support to Zephyr. the accelerometer is connected to SPI1 via multicon and is working ok using an ASM program.
However, when trying to compile, using wall, a Zephyr program (hello world) with this driver enabled, I get this error:

In file included from ../soc/riscv/swervolf/soc.h:12,
                 from ../include/arch/riscv/arch.h:25,
                 from ../include/arch/cpu.h:25,
                 from ../include/kernel_includes.h:39,
                 from ../include/kernel.h:17,
                 from /home/artecs/zephyr/drivers/sensor/adxl362/adxl362.c:11:
zephyr/include/generated/devicetree_unfixed.h:603:36: error: 'DT_N_S_soc_S_spi_80001100_S_adi_adxl362_0_P_spi_max_frequency' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_80001040_S_flash_0_P_spi_max_frequency'?

hello world works ok with this driver disabled using guiconfig.

spi1, adxl362 and spi-max-frequency are included in swervolf_nexys.dts as follows:

&spi1 {
	status = "okay";

	adi_adxl362: adi_adxl362@0 {
		compatible = "adi_adxl362";
		label = "adi_adxl362";
		reg = <0>;
		spi-max-frequency = <2000000>;
	};
};

spi1@80001100 is defined at riscv32-swerv.dtsi.

any hint on the cause of the error?
Thanks

ERROR: [Labtools 27-3165] End of startup status: LOW when [ run --target=nexys_a7 --flag=cpu_el2 swervolf]

With EH1 it works but after changed to EL2, it failed with the following errors.
Please let me know your advice.

NFO: Programming part xc7a100tcsg324-1 with bitstream swervolf_0.7.3.bit
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.3
**** Build date : Dec 6 2018-23:53:53
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

INFO: Trying to use hardware target localhost:3121/xilinx_tcf/Digilent/210292AA7B77A
INFO: [Labtoolstcl 44-466] Opening hw_target localhost:3121/xilinx_tcf/Digilent/210292AA7B77A
INFO: Opened hardware target localhost:3121/xilinx_tcf/Digilent/210292AA7B77A on try 1.
INFO: Found xc7a100tcsg324-1 as part of xc7a100t_0.
INFO: Programming bitstream to device xc7a100t_0 on target localhost:3121/xilinx_tcf/Digilent/210292AA7B77A.
ERROR: [Labtools 27-3165] End of startup status: LOW
program_hw_devices: Time (s): cpu = 00:01:47 ; elapsed = 00:02:12 . Memory (MB): peak = 1370.105 ; gain = 0.000 ; free physical = 6105 ; free virtual = 9385
ERROR: [Common 17-39] 'program_hw_devices' failed due to earlier errors.

while executing

"program_hw_devices [current_hw_device]"
(file "swervolf_0.7.3_pgm.tcl" line 98)
Makefile:23: recipe for target 'pgm' failed
make: *** [pgm] Error 1
ERROR: Failed to run ::swervolf:0.7.3 : '['make', 'pgm']' exited with an error: 2

Swerv configuration & Swervolf

Olof,

How and from where do you include generated Swerv defines/parameters?

How does the FuseSoc configure the Swerv itself ? ( knows to run swerv.config ?)

error during run simulation

hi,
when I execute the command
fusesoc run --target=sim swervolf

the following error met,

INFO: Generating ::swervolf-swerv_default_config:0
Traceback (most recent call last):
File "/home/work/.cache/fusesoc/chipsalliance.org_cores_SweRV_EH1_1.4/configs/swerv_config_gen.py", line 2, in
from fusesoc.capi2.generator import Generator
ImportError: No module named fusesoc.capi2.generator
ERROR: Setup failed : "python /home/work/.cache/fusesoc/chipsalliance.org_cores_SweRV_EH1_1.4/configs/swerv_config_gen.py /home/work/.cache/fusesoc/generated/swervolf-swerv_default_config_0/swerv_default_config_input.yml" exited with an error code. See stderr for details.

Thanks!

LItedram Generation

Did you generate Litedram with axi signals or you later added axi signals yourself after generating v files? If we generate litedram from enjoy-digital/litedram, there are no axi signals by default.

Regards
Linda

fusesoc run --target=arty_a7 swervolf

================================================================================
INFO: Generating ::swervolf-swerv_el2_arty_a7_config:0.7.4
Can't locate Bit/Vector.pm in @inc (you may need to install the Bit::Vector module) (@inc contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at configs/swerv.config line 6.
BEGIN failed--compilation aborted at configs/swerv.config line 6.
ERROR: Setup failed : "python3 /home/nkhan/.cache/fusesoc/chipsalliance.org_cores_SweRV_EL2_1.3/configs/swerv_config_gen.py /home/nkhan/.cache/fusesoc/generated/swervolf-swerv_el2_arty_a7_config_0.7.4/swerv_el2_arty_a7_config_input.yml" exited with an error code. See stderr for details.

SImulation run error

Hi,

Thanks for sharing this repository. I use Ubuntu 18.04, python 3.6m. After installing fusesoc, I try to run the simulation and an include file is not found although it exists:

INFO: Generating ::swervolf-swerv_default_config:0.7
Traceback (most recent call last):
File "/home/altus/.cache/fusesoc/chipsalliance.org_cores_SweRV_EH1_1.6/configs/swerv_config_gen.py", line 55, in
g.run()
File "/home/altus/.cache/fusesoc/chipsalliance.org_cores_SweRV_EH1_1.6/configs/swerv_config_gen.py", line 50, in run
shutil.copy2(os.path.join(cwd, f),f)
File "/usr/lib/python3.6/shutil.py", line 263, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpy6_4a230/core/configs/snapshots/default/common_defines.vh'
ERROR: Setup failed : "python3 /home/altus/.cache/fusesoc/chipsalliance.org_cores_SweRV_EH1_1.6/configs/swerv_config_gen.py /home/altus/.cache/fusesoc/generated/swervolf-swerv_default_config_0.7/swerv_default_config_input.yml" exited with an error code. See stderr for details.

ls /tmp/tmpy6_4a230/core/snapshots/default/
common_defines.vh pic_ctrl_verilator_unroll.sv
defines.h pic_map_auto.h
pd_defines.vh whisper.json
perl_configs.pl

Thanks
Udi

Compilation error

Hello

I compile SweRVolf in Ubuntu 16.04, Verilator 4.010 and get a compilation error. I guess this is due to using an incompatible Verilator version

/usr/local/verilator/4.010/bin/verilator -f swervolf_0.vc --trace -Wno-fatal
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.2/design/lib/beh_lib.sv:149: syntax error, unexpected begin
%Error: Exiting due to 1 error(s)
%Error: Command Failed /usr/local/verilator/4.010/bin/verilator_bin -f swervolf_0.vc --trace -Wno-fatal
Makefile:16: recipe for target 'Vswervolf_core_tb.mk' failed

I just modify code as below then compilation went well.
image

However, beh_lib.sv is automatically generated by toolchain (fusesoc) so it should be fixed in upstream repo.

/T

Replace deprecated AXI infrastructure

The AXI components from @pulp-platform that are currently used in SweRVolf have been deprecated. For all these components, there exists replacement components that shall be used instead. This issue tracks the replacement of the four identified components that need to be replaced

  1. axi2apb used in axi_uart_wrapper shall be replaced by an axi->axi_lite bridge followed by an axi_lite->apb bridge
  2. Replace axi_slice_dc used between cpu and memory in the nexys a7 target with an axi_cdc
  3. Replace axi_mem_if used in axi_multicon with.... not sure really
  4. Replace axi_node with axi_xbar. Rewrite axi_intercon_gen for the new component

Best case we can do these things one at a time. Worst case there is some backwards compatibility breaks that forces us to do it all at once

Does this look right @zarubaf @accuminium @fabianschuiki ? Any comments on this?

openocd timeout occurs when trying to load elf file using command 'load_image'.

Hello all,

I am trying to debug SweRV RISCV RTL v1.9 during simulation using bitbang bridge and openocd in my environment. For this, I have instantiated SimJTAG module in my testbench and connected it with swerv core. Now, using bitbang a server socket is created and I am able to listen on port 9999.

image

In another terminal (terminal 2) , I launched openocd (vOpen On-Chip Debugger 0.11.0+dev-01861-g6edf98db7-dirty) using my 'sim_swervjtag.cfg' file, the contents of config file are shown below,

`
adapter speed 100

adapter driver remote_bitbang
remote_bitbang_host localhost

remote_bitbang_port 9999

set _CHIPNAME riscv

jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x01

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME

riscv set_enable_virt2phys off

riscv set_mem_access abstract

riscv expose_csrs 1988

proc swerv_eh1_execute_fence {} {
reg csr1988 0x3
}

$_TARGETNAME configure -event resume-start {
swerv_eh1_execute_fence
}

$_TARGETNAME configure -event step-start {
swerv_eh1_execute_fence
}

init

halt
`

On another terminal (terminal 3), When I connect using telnet localhost 4444 and try to issue load_image command after reset I get timeout error as below,

image

On terminal 2, it outputs as shown without -d debug switch,

image

With debug switch -d, please find attached the log file 'openocd.log',

openocd.log

I have tried increasing the timeout interval using 'riscv set_command_timeout_sec' to 2000 but then it never comes out.

If possible, please point me to any pointer on how to resolve this. Thanks.

Error with "Build Zephyr applications"

Hi, everyone.
I have an error with "Build Zephyr applications" as below,
Please help me.

[command]
west build -b swervolf_nexys -- -DBOARD_ROOT=$SWERVOLF_ROOT/zephyr -DSOC_ROOT=$SWERVOLF_ROOT/zephyr -DDTS_ROOT=$SWERVOLF_ROOT/zephyr

[message]
WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=.
Note: to silence the above message, run 'west config build.board_warn false'
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/kdlee/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/kdlee/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.99 (/home/kdlee/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
CMake Error at /home/kdlee/zephyrproject/zephyr/cmake/app/boilerplate.cmake:223 (message):
BOARD is not being defined on the CMake command-line in the environment or
by the app.
Call Stack (most recent call first):
/home/kdlee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/kdlee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/kdlee/zephyrproject/zephyr/samples/basic/blinky/build -S/home/kdlee/zephyrproject/zephyr/samples/basic/blinky -GNinja -DBOARD_ROOT=/home/kdlee/work/riscv/chipsalliance/Cores-SweRVolf/fusesoc_libraries/swervolf/zephyr -DSOC_ROOT=/home/kdlee/work/riscv/chipsalliance/Cores-SweRVolf/fusesoc_libraries/swervolf/zephyr -DDTS_ROOT=/home/kdlee/work/riscv/chipsalliance/Cores-SweRVolf/fusesoc_libraries/swervolf/zephyr

fusesoc build and run using xcelium

Hello,

I have successfully able to run this environment using verilator. However when I try to simulate this flow using 'xcelium', I get below error from makefile.

Capture

My command line is "fusesoc run --target=sim --tool=xcelium swervolf".

In case I am missing something, please let me know.

Thanks and Regards,
Nikhil Arora

Read access stops when read/write access is repeated

Read access stops when read/write access is repeated.
Run the following program.


.text
.align 4

.global acctest

//
//I=====================================================
//I Access test for chattering access problem
//I=====================================================
//I void acctest(unsigned int adr, unsigned int in);
acctest:
csrrsi a2, mstatus, 0x08
lw a3, 0(a0)
sw a3, 0(a1)
csrrw zero, mstatus, a2
jalr zero, ra, 0 /
ret */

.end

Read accesses stop, but write accesses continue.
I am running a simulation in VCS.

Verilator compilation fail due to "common_cells/registers.vh" not found

I'm trying to compile run a swervolf simulation from a clean installation, using Verilator 4.033 devel rev v4.032-73-gdef40fa.

Shortly after kicking things off, I get greeted with the following error:

tom@thinkcenter:~/projects/swervolf$ fusesoc run --target=sim swervolf
WARNING: Unknown item compilation_mode in section Xsim
INFO: Preparing ::cdc_utils:0.1-r1
INFO: Downloading fusesoc/cdc_utils from github
INFO: Preparing chipsalliance.org:cores:SweRV_EH1:1.8
INFO: Downloading chipsalliance/Cores-SweRV from github
INFO: Preparing fusesoc:utils:generators:0.1.5
INFO: Downloading fusesoc/fusesoc-generators from github
INFO: Preparing ::jtag_vpi:0-r5
INFO: Downloading fjullien/jtag_vpi from github
INFO: Preparing pulp-platform.org::common_cells:1.20.0
INFO: Downloading pulp-platform/common_cells from github
INFO: Preparing ::simple_spi:1.6.1
INFO: Downloading olofk/simple_spi from github
INFO: Preparing ::uart16550:1.5.5-r1
INFO: Downloading olofk/uart16550 from github
INFO: Preparing ::verilog-arbiter:0-r3
INFO: Downloading bmartini/verilog-arbiter from github
INFO: Preparing ::wb_common:1.0.3
INFO: Downloading fusesoc/wb_common from github
INFO: Preparing pulp-platform.org::axi:0.25.0
INFO: Downloading pulp-platform/axi from github
INFO: Preparing ::wb_intercon:1.2.2-r1
INFO: Downloading olofk/wb_intercon from github
INFO: Preparing ::swervolf:0.7.3
INFO: Generating ::swervolf-intercon:0.7.3
Found master ifu
Found master lsu
Found master sb
Found slave io
Found slave ram
================================================================================
INFO: Generating ::swervolf-swerv_default_config:0.7.3
INFO: Generating ::swervolf-version:0.7.3
INFO: Generating ::swervolf-wb_intercon:0.7.3
Found master io
Found slave rom
Found slave spi_flash
Found slave sys
Found slave uart
================================================================================
INFO: Setting up project

INFO: Building simulation model
verilator -f swervolf_0.7.3.vc --trace -Wno-fatal
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:14:10: Cannot find include file: common_cells/registers.svh
   14 | `include "common_cells/registers.svh"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ... Looked in:
             config/common_cells/registers.svh
             config/common_cells/registers.svh.v
             config/common_cells/registers.svh.sv
             ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/common_cells/registers.svh
             ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/common_cells/registers.svh.v
             ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/common_cells/registers.svh.sv
             ../src/jtag_vpi_0-r5/common_cells/registers.svh
             ../src/jtag_vpi_0-r5/common_cells/registers.svh.v
             ../src/jtag_vpi_0-r5/common_cells/registers.svh.sv
             ../src/pulp-platform.org__common_cells_1.20.0/include/common_cells/common_cells/registers.svh
             ../src/pulp-platform.org__common_cells_1.20.0/include/common_cells/common_cells/registers.svh.v
             ../src/pulp-platform.org__common_cells_1.20.0/include/common_cells/common_cells/registers.svh.sv
             ../src/uart16550_1.5.5-r1/rtl/verilog/common_cells/registers.svh
             ../src/uart16550_1.5.5-r1/rtl/verilog/common_cells/registers.svh.v
             ../src/uart16550_1.5.5-r1/rtl/verilog/common_cells/registers.svh.sv
             ../src/wb_common_1.0.3/common_cells/registers.svh
             ../src/wb_common_1.0.3/common_cells/registers.svh.v
             ../src/wb_common_1.0.3/common_cells/registers.svh.sv
             ../src/pulp-platform.org__axi_0.25.0/include/axi/common_cells/registers.svh
             ../src/pulp-platform.org__axi_0.25.0/include/axi/common_cells/registers.svh.v
             ../src/pulp-platform.org__axi_0.25.0/include/axi/common_cells/registers.svh.sv
             ../src/swervolf-intercon_0.7.3/common_cells/registers.svh
             ../src/swervolf-intercon_0.7.3/common_cells/registers.svh.v
             ../src/swervolf-intercon_0.7.3/common_cells/registers.svh.sv
             ../src/swervolf-wb_intercon_0.7.3/common_cells/registers.svh
             ../src/swervolf-wb_intercon_0.7.3/common_cells/registers.svh.v
             ../src/swervolf-wb_intercon_0.7.3/common_cells/registers.svh.sv
             common_cells/registers.svh
             common_cells/registers.svh.v
             common_cells/registers.svh.sv
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:71:5: Define or directive not defined: '`FFLARN'
   71 |     `FFLARN(wr_pointer_q, wr_pointer_q+1, (src_valid_i && src_ready_o), '0, src_clk_i, src_rst_ni)
      |     ^~~~~~~
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:71:13: syntax error, unexpected '('
   71 |     `FFLARN(wr_pointer_q, wr_pointer_q+1, (src_valid_i && src_ready_o), '0, src_clk_i, src_rst_ni)
      |             ^~~~~~~~~~~~
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:73:5: Define or directive not defined: '`FFLARN'
   73 |     `FFLARN(rd_pointer_q, rd_pointer_q+1, (dst_valid_o && dst_ready_i), '0, dst_clk_i, dst_rst_ni)
      |     ^~~~~~~
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:76:5: Define or directive not defined: '`FFLNR'
   76 |     `FFLNR(mem_q, mem_d, (src_valid_i && src_ready_o), src_clk_i)
      |     ^~~~~~
%Error: ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv:86:3: syntax error, unexpected end
   86 |   end
      |   ^~~
%Error: Cannot continue
Makefile:16: recipe for target 'Vswervolf_core_tb.mk' failed
make: *** [Vswervolf_core_tb.mk] Error 1

build w/ fusesoc run --target=sim swervolf fails when generating swervolf-intercon:0.7

I just started working w/ fusesoc and swervolf and got this error when following the steps in the README.md file. I cloned the repositories today so should have the latest.

I am running ubuntu 20.04 LTS and python 3.8 which I have aliased to python. I've looked through the .core files but I couldn't find what intcon was being generated from. I have Verilator 4.028 2020-02-06 rev v4.026-92-g890cecc1 installed but I don't think I'm getting that far.

Thanks
Roy Kravitz ([email protected])


Here's the console log:

profroyk@roy-ASUSLaptop:$ cd $WORKSPACE
profroyk@roy-ASUSLaptop:
/fpga/swervolf$ fusesoc run --target=sim swervolf
WARNING: Unknown item version in section Root
INFO: Preparing ::cdc_utils:0.1
INFO: Preparing chipsalliance.org:cores:SweRV_EH1:1.6
INFO: Preparing fusesoc:utils:generators:0.1.5
INFO: Preparing ::jtag_vpi:0-r5
INFO: Preparing pulp-platform.org::common_cells:1.16.4
INFO: Preparing ::simple_spi:1.6.1
INFO: Preparing ::uart16550:1.5.5-r1
INFO: Preparing ::verilog-arbiter:0-r3
INFO: Preparing ::wb_common:1.0.3
INFO: Preparing pulp-platform.org::axi:0.23.0-r1
INFO: Preparing ::wb_intercon:1.2.2-r1
INFO: Preparing ::swervolf:0.7
INFO: Generating ::swervolf-intercon:0.7
Traceback (most recent call last):
File "/usr/local/bin/fusesoc", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/fusesoc/main.py", line 836, in main
args.func(cm, args)
File "/usr/local/lib/python3.8/dist-packages/fusesoc/main.py", line 359, in run
run_backend(
File "/usr/local/lib/python3.8/dist-packages/fusesoc/main.py", line 429, in run_backend
edalizer.run()
File "/usr/local/lib/python3.8/dist-packages/fusesoc/edalizer.py", line 88, in run
self.run_generators()
File "/usr/local/lib/python3.8/dist-packages/fusesoc/edalizer.py", line 139, in run_generators
for gen_core in _ttptttg.generate(self.cache_root):
File "/usr/local/lib/python3.8/dist-packages/fusesoc/edalizer.py", line 411, in generate
Launcher(args[0], args[1:], cwd=generator_cwd).run()
File "/usr/local/lib/python3.8/dist-packages/fusesoc/utils.py", line 35, in run
subprocess.check_call(map(str, [self.cmd] + self.args), cwd=self.cwd,),
File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'python'
profroyk@roy-ASUSLaptop:~/fpga/swervolf$

profroyk@roy-ASUSLaptop:~/fpga/swervolf$ alias

alias npp='notepad-plus-plus'
alias python='python3'

profroyk@roy-ASUSLaptop:~/fpga/swervolf$ printenv

WORKSPACE=/home/profroyk/fpga/swervolf
SVERVOLF_ROOT=/home/profroyk/fpga/swervolf/fusesoc_libraries/swervolf
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin/python3

fusesoc run --target=sim swervolf with verilator 4.104

INFO: Building simulation model
verilator -f swervolf_0.7.3.vc --trace -Wno-fatal
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:58:31: Define or directive not defined: 'RV_LSU_NUM_NBLOAD_WIDTH' 58 | logic [RV_LSU_NUM_NBLOAD_WIDTH-1:0] tag;
| ^~~~~~~~~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:76:31: Define or directive not defined: 'RV_BTB_ADDR_HI' 76 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index; | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:76:47: Define or directive not defined: 'RV_BTB_ADDR_LO'
76 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index;
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:76:46: syntax error, unexpected ':', expecting TYPE-IDENTIFIER
76 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index;
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:79:31: Define or directive not defined: 'RV_BHT_GHR_RANGE' 79 | logic [RV_BHT_GHR_RANGE] fghr;
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:79:48: syntax error, unexpected ']', expecting TYPE-IDENTIFIER
79 | logic [RV_BHT_GHR_RANGE] fghr; | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:86:31: Define or directive not defined: 'RV_BTB_BTAG_SIZE'
86 | logic [RV_BTB_BTAG_SIZE-1:0] btag; | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:87:24: syntax error, unexpected '}' 87 | } br_pkt_t; | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:94:31: Define or directive not defined: 'RV_BTB_ADDR_HI'
94 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index;
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:94:47: Define or directive not defined: 'RV_BTB_ADDR_LO' 94 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index; | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:94:46: syntax error, unexpected ':', expecting TYPE-IDENTIFIER 94 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index; | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:96:31: Define or directive not defined: 'RV_BHT_GHR_RANGE'
96 | logic [RV_BHT_GHR_RANGE] fghr; | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:96:48: syntax error, unexpected ']', expecting TYPE-IDENTIFIER 96 | logic [RV_BHT_GHR_RANGE] fghr;
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:103:24: syntax error, unexpected '}'
103 | } br_tlu_pkt_t;
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:112:31: Define or directive not defined: 'RV_BTB_ADDR_HI' 112 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index; | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:112:47: Define or directive not defined: 'RV_BTB_ADDR_LO'
112 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index;
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:112:46: syntax error, unexpected ':', expecting TYPE-IDENTIFIER
112 | logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] index;
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:121:31: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 121 | logic [RV_BTB_BTAG_SIZE-1:0] btag;
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:122:31: Define or directive not defined: 'RV_BHT_GHR_RANGE' 122 | logic [RV_BHT_GHR_RANGE] fghr;
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:122:48: syntax error, unexpected ']', expecting TYPE-IDENTIFIER
122 | logic [RV_BHT_GHR_RANGE] fghr; | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:128:24: syntax error, unexpected '}' 128 | } predict_pkt_t; | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/include/swerv_types.sv:335:1: syntax error, unexpected endpackage 335 | endpackage | ^~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:142:8: Define or directive not defined: 'TEC_RV_ICG'
142 | module TEC_RV_ICG | ^~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:143:3: syntax error, unexpected '(', expecting IDENTIFIER or TYPE-IDENTIFIER or randomize 143 | ( | ^ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:145:4: syntax error, unexpected output 145 | output Q | ^~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:151:4: syntax error, unexpected assign 151 | assign enable = E | TE; | ^~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:179:4: Define or directive not defined: 'TEC_RV_ICG'
179 | TEC_RV_ICG clkhdr ( .*, .E(en), .CP(clk), .Q(l1clk)); | ^~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:179:23: syntax error, unexpected '(', expecting IDENTIFIER or randomize 179 | TEC_RV_ICG clkhdr ( ., .E(en), .CP(clk), .Q(l1clk));
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:198:4: Define or directive not defined: 'TEC_RV_ICG' 198 | TEC_RV_ICG rvclkhdr ( .
, .E(en), .CP(clk), .Q(l1clk));
| ^~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:198:25: syntax error, unexpected '(', expecting IDENTIFIER or randomize
198 | TEC_RV_ICG rvclkhdr ( .*, .E(en), .CP(clk), .Q(l1clk)); | ^ | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:24: Define or directive not defined: 'RV_BTB_ADDR_HI'
401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^ | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:40: Define or directive not defined: 'RV_BTB_BTAG_SIZE'
401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^ | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:58: Define or directive not defined: 'RV_BTB_BTAG_SIZE'
401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^ | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:76: Define or directive not defined: 'RV_BTB_BTAG_SIZE'
401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^ | ^~~~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:94: Define or directive not defined: 'RV_BTB_ADDR_HI'
401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^ | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:93: syntax error, unexpected ':', expecting TYPE-IDENTIFIER 401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^
| ^
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:110: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:401:128: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 401 | assign hash = {(pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:402:23: Define or directive not defined: 'RV_BTB_ADDR_HI' 402 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:402:39: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 402 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:402:57: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 402 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:402:75: Define or directive not defined: 'RV_BTB_ADDR_HI' 402 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:402:91: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 402 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE+1] ^
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:403:23: Define or directive not defined: 'RV_BTB_ADDR_HI' 403 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+1])};
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:403:39: Define or directive not defined: 'RV_BTB_BTAG_SIZE' 403 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+1])};
| ^~~~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:403:57: Define or directive not defined: 'RV_BTB_ADDR_HI' 403 | pc[RV_BTB_ADDR_HI+RV_BTB_BTAG_SIZE:RV_BTB_ADDR_HI+1])};
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418:39: Define or directive not defined: 'RV_BTB_ADDR_HI' 418 | output logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] hash | ^~~~~~~~~~~~~~~ %Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418:55: Define or directive not defined: 'RV_BTB_ADDR_LO'
418 | output logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] hash
| ^~~~~~~~~~~~~~~
%Error: ../src/chipsalliance.org_cores_SweRV_EH1_1.8/design/lib/beh_lib.sv:418:54: syntax error, unexpected ':', expecting TYPE-IDENTIFIER
418 | output logic [RV_BTB_ADDR_HI:RV_BTB_ADDR_LO] hash
| ^
%Error: Exiting due to too many errors encountered; --error-limit=50
Makefile:16: recipe for target 'Vswervolf_core_tb.mk' failed
make: *** [Vswervolf_core_tb.mk] Error 1
ERROR: Failed to build ::swervolf:0.7.3 : 'make' exited with an error code

axi/wb bus cycle times

I have your design running in nexys A7 with an EL2 core.

When I do a sequence of writes to an I/O port, such as GPIO, and my code is running in ICCM, the writes are lost, except for the last one. I can solve the problem by inserting some delay in between the I/O writes.

It appears that with optimized code, the writes through Axi / Axi Mux / WB occur slower than the processor can write the data.

Is this the way it is supposed to work? Is there some sort of mechanism for the AXI writes to delay the processor core while each one is completing?

I guess I can write code to wait on I/O writes to complete before I send another one. Am I required to do that?

Write Buffer coalescing in compliance tests

When riscv-gnu-toolchain is built as "rv32imc" following set of rv32i riscv-compliance tests falls on comparing output signature files to reference files:

  • I-ADDI-01
  • I-AUIPC-01
  • I-BGE-01
  • I-BGEU-01
  • I-BLT-01
  • I-BLTU-01
  • I-ORI-01
  • I-SLLI-01
  • I-XORI-01

It happens due to Write Buffer coalescing on print - these tests pass if WB coalescing disable bit is set in the mfdc register .

Reset value equal to 1 in the mrac register for memory regions with side-effects may be a solution.

Synthesis fails on Vivado 2019.1

Vivado 2019.1 can't compile, but actually the code in swerv_wrapper.sv looks like correct SystemVerilog to me.

fusesoc/workspace/build/swervolf_0/nexys_a7-vivado/swervolf_0.runs/synth_1/runme.log:

ERROR: [Synth 8-6735] net type must be explicitly specified for 'clk' when default_nettype is none [/src/fusesoc/workspace/build/swervolf_0/src/swervolf_0/rtl/swerv_wrapper.sv:28]
ERROR: [Synth 8-6735] net type must be explicitly specified for 'rst_l' when default_nettype is none [/src/fusesoc/workspace/build/swervolf_0/src/swervolf_0/rtl/swerv_wrapper.sv:29]
ERROR: [Synth 8-6735] net type must be explicitly specified for 'rst_vec' when default_nettype is none [/src/fusesoc/workspace/build/swervolf_0/src/swervolf_0/rtl/swerv_wrapper.sv:30]

swerv_wrapper.sv:

module swerv_wrapper_dmi
   import swerv_types::*;
(
   input logic 			     clk,
   input logic 			     rst_l,
   input logic [31:1] 		     rst_vec,
...

Dectect unsupported features in core description files

CAPI2 is constantly getting new features. When these are getting used in core description files, they are not compatible with older versions of FuseSoC anymore as examplified in #32

We should look into better version managment. First idea that comes to mind is adding a minor version to the CAPI. Longer term it could be a good idea to split out the CAPI definition to its own project with validators and stuff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.