Giter VIP home page Giter VIP logo

fpga-zynq's Introduction

Rocket Chip on Zynq FPGAs

Warning: This repository is deprecated and does not track Rocket Chip master.

Those looking for an FPGA prototype of Rocket Chip should checkout SiFive’s Freedom platform. Those looking for an FPGA-accelerated simulation environment (for obtaining cycle-accurate performance measurements) should use FireSim. Both of these tools regularly update their version of Rocket Chip.

This repository contains the files needed to run the RISC-V rocket chip on various Zynq FPGA boards (Zybo, Zedboard, ZC706) with Vivado 2016.2. Efforts have been made to not only automate the process of generating files for these boards, but to also reduce duplication as well as the size of this repo. Prebuilt images are available in git submodules, and they are only shallowly cloned if requested.

How to use this README

This README contains 3 major sets of instructions:

  1. Quick Instructions: This is the simplest way to get started - you'll download the relevant prebuilt images for your board and learn how to run binaries on the RISC-V Rocket Core. These instructions require only that you have a compatible board - neither Vivado nor the RISC-V Toolchain are necessary.

  2. Pushing Your Rocket Modifications to the FPGA: These instructions walk through what we believe is the common case - a user wanting to utilize a custom-generated Rocket Core.

  3. Building Everything from Scratch: Here, we discuss how to build the full stack from scratch. It is unlikely that you'll need to use these instructions, unless you are intending to make changes to the configuration of the Zynq ARM Core or u-boot.

Finally, the bottom of the README contains a set of Appendices, which document some common operations that we believe are useful or provides more depth on commands described elsewhere in the documentation.

To guide you through the rest of the documentation, we have provide both a Table of Contents and an Overview.

Note: If you are seeking to test your own modifications to rocket chip (RC) using this repository, it must be derived from RC commit fb476d1 or later, as this project expects both a debug module to be present, and links directly against RC to build a top-level project directly in chisel. Otherwise, you should use an older version of this repository bf6d00c2 or earlier, which has support for HTIF-based rocket chip instances.

Table of Contents

Overview of System Stack

Our system will allow you to run a RISC-V binary on a rocket core instantiated on a supported Zynq FPGA. This section will outline the stack of all of the parts involved and by proxy, outline the rest of the documentation. Going top-down from the RISC-V binary to the development system:

Target Application (RISC-V binary) will run on top of whatever kernel the rocket chip is running. Compiled by riscv-gcc or riscv-llvm.

RISC-V Kernel (proxy kernel or RISC-V Linux) runs on top of the rocket chip. The proxy kernel is extremely lightweight and designed to be used with a single binary linked against Newlib while RISC-V Linux is appropriate for everything else.

Rocket Chip (rocket core with L1 instruction and data caches) is instantiated on the FPGA. Many of its structures will typically map to various hard blocks including BRAMs and DSP slices. It communicates to the host ARM core on the Zynq via AXI.

Front-end Server (riscv-fesvr) runs on the host ARM core and provides an interface to the rocket chip running on the FPGA (connected via AXI).

Zynq ARM Core (actually dual Cortex A9) runs Linux and simplifies interfacing with the FPGA.

FPGA Board (Zybo, Zedboard, or ZC706) contains the Zynq FPGA and several I/O devices. At power on, the contents of the SD card are used to configure the FPGA and boot Linux on the ARM core.

External Communication (TTY over serial on USB or telnet/ssh over ethernet) allows the development system to communicate with the FPGA board.

Development System (PC with SD card reader) generates the images to configure the FPGA.

1) Quick Instructions

Using prebuilt images, run hello world and/or linux on rocket

First, enter into the directory for your board (current options are zybo, zedboard, and zc706). From there, run the following to download all of the necessary images:

$ make fetch-images

Next, insert the SD card on the development system and copy over the images:

$ make load-sd SD=path_to_mounted_sdcard

Finally, eject the SD card, insert it into the board, set the board's boot jumper to "SD", and power the board on. Connect to the board with an ethernet cable (password is root) and run hello world:

$ ssh [email protected]
root@zynq:~# ./fesvr-zynq pk hello
hello!

Awesome! You can now run RISC-V binaries on Rocket. If you'd like to boot linux on the Rocket core, see Booting Up and Interacting with the RISC-V Rocket Core.

2) Pushing Your Rocket Modifications to the FPGA

Setting Up Your Workspace

Requires: Vivado 2016.2 and its settings64.sh and a JVM that can run Scala

After you clone the repository for the first time, you must initialize the submodules rocket-chip and testchipip, as well as the first-level submodules of rocket-chip itself.

$ make init-submodules

If you have your own working rocket-chip directory that you would like to use, override the ROCKET_DIR make variable set in common/Makefrag.

Configuring Rocket Chip

The verilog for the rocket chip is generated by Chisel and thus is not intended to be edited by humans. This project instantiates rocket chip as module larger top level chisel project, that includes an adapter to interface the ARM core with rocket chip's debug module.

The configuration used to generate the rocket chip comes from the CONFIG environment variables. If CONFIG isn't set by the environment, it is taken from the Makefile for the current board. For this example, we use the Zybo which has a default configuration of ZynqSmallConfig.

Generating Verilog for Rocket Chip

Enter into the directory for your board (current options are zybo, zedboard, and zc706). After making changes within rocket-chip and/or common/src/main/scala, you can run the rocket chip generator and copy the newly generated verilog back into the board's src/verilog directory with:

 $ make rocket

You can also explicitly set the CONFIG variable from the command-line (can do this for any command):

 $ make rocket CONFIG=MyFPGAConfig

By default this will look up a configuration specified in the rocket chip library. You may define a custom one without recompiling rocketchip, by defining in the zynq chisel sources at common/src/main/scala, and instead calling:

 $ make rocket CONFIG_PROJECT=zynq CONFIG=MyCustomZynqConfig

The generator will instead look for the configuration definition in the local project instead of the rocket chip library.

Generating Project for Configuration

To generate a Vivado project specific to the board and the configuration (one project per configuration):

$ make project

This step only needs to be done once per configuration.

Repacking boot.bin

Once you have changed the design, you will need to generate a new bitstream and that will need to be packaged in boot.bin. boot.bin also contains the binaries needed for startup (FSBL.elf and u-boot.elf) but these can be reused. From within the board's directory (zybo in this example), to repack boot.bin:

$ make fpga-images-zybo/boot.bin

If you have modified the verilog for your project but not generated a new bitstream, make should generate a new bitstream automatically. To use the new boot.bin, copy it to the SD card, insert the SD card into the board, and power on the board.

3) Building Everything from Scratch

This section describes how to build the entire project from scratch. Most likely, you will not need to perform all of these steps, however we keep them here for reference. Various other sections of this README may selectively refer to these sections. This section assumes that you've just pulled this repository and have sourced the settings file for Vivado 2016.2.

For ease of exposition, we will be describing all of the commands assuming that we are working with the zybo and its default configuration ZynqSmallConfig. Replacing references to the zybo with zedboard or zc706 will allow you to use these instructions for those boards.

From here on, $REPO will refer to the location of the fpga-zynq repository.

3.1) Project Setup

First, we need to generate a Vivado project from the source files that are present in a particular board's directory.

$ cd $REPO/zybo
$ make project

3.2) Generating a Bitstream

Next, let's open up the project in the Vivado GUI:

$ make vivado
# OR
$ cd zybo_rocketchip_ZynqSmallConfig
$ vivado zybo_rocketchip_ZynqSmallConfig.xpr

If you wish to make any modifications to the project, you may now do so. Once you've finished, let's move on:

Inside Vivado, select Open Block Design followed by system.bd in the dropdown. This will open a block diagram for the Zynq PS Configuration and is necessary for correct FSBL generation.

Next, select Generate Bitstream. Vivado will now step through the usual Synthesis/Implementation steps. Upon completion, if you're interested in only the bitstream, you can stop here; the file you want is in:

$REPO/zybo/zybo_rocketchip_ZynqSmallConfig/zybo_rocketchip_ZynqSmallConfig.runs/impl_1/rocketchip_wrapper.bit

Otherwise, let's continue on to select Open Implemented Design. This is again necessary to properly export the description of our Hardware for the Xilinx SDK to use.

At this point, select File -> Export -> Export Hardware. This will create the following directory:

$REPO/zybo/zybo_rocketchip_ZynqSmallConfig/zybo_rocketchip_ZynqSmallConfig.sdk

This directory contains a variety of files that provide information about the hardware to the SDK. Let's continue on to building the FSBL.

3.3) Building the FSBL

This step assumes that you have just generated the bitstream. Inside the Vivado GUI, select "Launch SDK". This will open up the Xilinx SDK preconfigured with the description of our hardware. In order to generate the FSBL, do the following:

  1. Select File -> New -> Application Project

  2. In the new window, type "FSBL" as the Project name, and ensure that the rest of the properties are correctly set (disregarding the greyed out Location field):

  1. Select Next, at which point you should be given a set of options. Select Zynq FSBL and Finish.

  2. The SDK will proceed to automatically compile the FSBL. You can see the progress in the Console.

  3. Once the build is finished, we need to build u-boot before returning to the SDK in order to create our BOOT.bin.

3.4) Building u-boot for the Zynq ARM Core

Returning to the command line, do the following from the directory corresponding to your board:

$ make arm-uboot

This target performs a variety of commands. It will first pull the u-boot source from the Xilinx repositories (see the submodule in $REPO/common/u-boot-xlnx), patch it with the necessary files found in $REPO/zybo/soft_config/, compile u-boot, and place the resulting u-boot.elf file in $REPO/zybo/soft_build/u-boot.elf.

3.5) Creating boot.bin

At this point, we have built up all of the necessary components to create our boot.bin file. Returning to the Xilinx SDK, select Xilinx Tools -> Create Zynq Boot Image.

First, you should fill in the Output BIF file path with $REPO/zybo/deliver_output. If this directory has not already been created, you may go ahead and create it (this is where we will place all of the items that we will ultimately transfer to the SD card). See the below for a sample path. Performing this step will also fill in the Output path field, which specifies the location of the BOOT.bin file that we desire.

Next, we will add the individual files that make up BOOT.bin. Order is important, so follow these steps exactly:

  1. Select Add and in the window that opens, click Browse and specify the following location:

$REPO/zybo/zybo_rocketchip_ZynqSmallConfig/zybo_rocketchip_ZynqSmallConfig.sdk/FSBL/Debug/FSBL.elf

Once you have done so select the dropdown next to Partition type and select bootloader. You must perform this step after selecting the path, else the SDK will change it back to datafile, and your BOOT.bin will not work.

At the conclusion of this step, the Add partition window will look something like:

Click _OK_to return to the previous window.

  1. Once more, click Add. In the new Add partition window, click Browse and specify the following location:

$REPO/zybo/zybo_rocketchip_ZynqSmallConfig/zybo_rocketchip_ZynqSmallConfig.runs/impl_1/rocketchip_wrapper.bit

Ensure that Partition type is set to datafile and click OK.

  1. Click Add a final time. Click Browse and this time select our compiled u-boot.elf:

$REPO/zybo/soft_build/u-boot.elf

Again, ensure that Partition type is set to datafile and click OK.

  1. At this point, the window should match the following (click the image to zoom in):

Select Create Image. This will produce a BOOT.bin file in the $REPO/zybo/deliver_output directory.

If you make modifications to the project in the future, you can avoid having to perform this step manually and instead may reuse the output.bif file that the SDK generates the first time you use Create Zynq Boot Image. Use the following make target to do so:

$ make deliver_output/boot.bin

3.6) Building linux for the ARM PS

As part of our bootstrapping process, we need to boot linux on the ARM core in the Zynq. We can build this copy of linux like so (again assuming that we are in $REPO/zybo):

$ make arm-linux

We additionally need to produce the devicetree.dtb file that linux will use to setup peripherals of the ARM core. We can produce this like so:

$ make arm-dtb

At this point, the $REPO/zybo/deliver_output directory contains the following files:

  • BOOT.bin - (the filename is case insensitive, you may see boot.bin). This contains the FSBL, the bitstream with Rocket, and u-boot.
  • uImage - Linux for the ARM PS
  • devicetree.dtb - Contains information about the ARM core's peripherals for linux.

The only remaining file that we are missing at this point is uramdisk.image.gz, the root filesystem for linux on the ARM Core. You can obtain it like so (it will be placed in $REPO/zybo/deliver_output):

$ make fetch-ramdisk

Now, take the four files in deliver_output/, and place them on the root of the SD card that we will insert into the Zybo. The layout of your SD card should match the following:

SD_ROOT/
|-> boot.bin
|-> devicetree.dtb
|-> uImage
|-> uramdisk.image.gz

At this point, you have performed the necessary steps to run binaries on Rocket. See Section 3.8 for how to do so. If you are interested in running riscv-linux on Rocket, continue on to Section 3.7:

3.7) Building/Obtaining riscv-linux

There are two options to obtain riscv-linux:

Method 1) Build from Source

To build riscv-linux for Rocket, follow the instructions here. These instructions will show you how to create a linux image that boots from an initramfs. We also now have support for block devices, so you can also boot from an ext2 image created by buildroot. To configure linux to boot from a block device, instead of selecting "Initial RAM filesystem and RAM disk", add the arguments "root=/dev/generic-blkdev rw" to the kernel command line under "Kernel Hacking" -> "Built-in Kernel Command String". To use the block device, you will need to use the ucbbar-all branch of riscv-linux.

Next, you'll need to build an instance of the Berkeley Bootloader(BBL) that contains your linux image as a payload. BBL is provided alongside the proxy kernel at this repository.

Finally, drop your bbl image into SD_ROOT/, which will be mounted as /mnt/boot/ in the ARM core's filesystem.

Warning: If you are working with the Zybo, you need to make sure you compile with a version of the riscv-gnu-toolchain that targets RV64IMA, as the zybo configuration does not possess an FPU.

Method 2) Use the provided BBL instance

Included in the home directory of the ARM core's ramdisk we've provided an instance of bbl preloaded with a miniminal linux image. All you have to do is follow the instructions in the next section.

3.8) Booting Up and Interacting with the RISC-V Rocket Core

First, insert the SD card and follow the instructions in Appendix A to connect to your board. You can login to the board with username root and password root. Once you're at the prompt, you can run a basic hello world program on rocket like so:

root@zynq:~# ./fesvr-zynq pk hello
hello!

To boot riscv-linux, run:

root@zynq:~# ./fesvr-zynq bbl
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    
rr                vvvvvvvvvvvvvvvvvvvvvv      
rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr
rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr
rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr
rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr
rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr
rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr
rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE
[    0.000000] Linux version 4.6.2 <more messages follow>

After linux boots you'll be presented with a busybox prompt from riscv-linux running on rocket!

If you are using a root filesystem on a seperate filesystem image, you can boot linux by running

root@zynq:~# ./fesvr-zynq +blkdev=rootfs.ext2 bbl

Appendices

A) Connecting to the Board

Serial-USB

On the Zybo and Zedboard a single serial-USB cable is needed but on the ZC706 you will also need a USB type A to type B cable (and possibly some drivers). To connect:

$ screen /dev/tty.usbmodem1411 115200,cs8,-parenb,-cstopb

Note: The numbers following tty.usbmodem may vary slightly. On the Zybo, replace usbmodem with usbserial- and on the ZC706, replace it with SLAB_USBtoUART.

Ethernet

The board has an IP of 192.168.1.5 and can be accessed by username/password of root/root on telnet and ssh. For example:

Note: Make sure your development system ethernet interface is configured to be on the 192.168.1.x subnet. The default configuration intends for the board to be directly attached to the development system (single cable). If you want to place the board on a larger network, we recommend changing the root password to something stronger and changing the IP configuration to mesh well with your network.

B) Getting Files On & Off the Board

Copying Files over Ethernet

The easiest way to get a file onto the board is to copy it with scp over ethernet:

$ scp file [email protected]:~/

Note: Linux is running out of a RAMdisk, so to make a file available after a reboot, copy it to the SD card or modify the RAMdisk.

Changing the RAMDisk

Requires: u-boot and sudo

The RAMDisk (uramdisk.image.gz) that holds Linux for the ARM cores is a gzipped cpio archive with a u-boot header for the board. To open the RAMdisk:

$ make ramdisk-open

When changing or adding files, be sure to keep track of owners, groups, and permissions. When you are done, to package it back up:

$ make ramdisk-close

A useful application of this is to add your SSH public key to .ssh/authorized_keys so you can have passwordless login to the board.

Note: Since these ramdisk operations use sudo on files, they may not work on a network mounted filesystem. To get around this limitation, it is easiest to just copy it to a local filesystem when modifying the ramdisk.

C) Working with Vivado

Requires: Vivado 2016.2 and its settings64.sh sourced

First, enter into the directory for your board (current options are zybo, zedboard, and zc706). To generate a bitstream, you will need a Vivado project. You should only need to generate it once, but the automation this repo provides makes it easy to generate again if you delete the project. To generate a Vivado project from scratch:

$ make project

To generate a bitstream from the command-line:

$ make bitstream

To launch Vivado in GUI mode:

$ make vivado

D) Changing the Processor's Clockrate

You can change the clockrate for the rocket chip by changing RC_CLK_MULT and RC_CLK_DIVIDE within a board's src/verilog/clocking.vh. After that change, you will need to generate a new bitstream (and boot.bin).

Note: Although rarely needed, it is possible to change the input clockrate to the FPGA by changing it within the block design, src/constrs/base.xdc, and ZYNQ_CLK_PERIOD within src/verilog/clocking.vh. This will also require regenerating FSBL.elf, the bitstream, and of course boot.bin.

E) Contents of the SD Card

The SD card is used by the board to configure the FPGA and boot up the ARM core. All of these files are available within a board's fpga-images submodule, but they can also be built from scratch. Here is a summary of the files and their purposes:

  • boot.bin is generated by the Xilinx SDK and is actually three files. To generate it from scratch, follow the instructions from Section 3 up through Section 3.5 Creating boot.bin. To repack it from existing components, follow Repacking boot.bin. boot.bin contains:
    • Bitstream (rocketchip_wrapper.bit) configures the FPGA with the rocket chip design. To build it with the GUI, see Section 3.2 Generating a Bitstream and to build it with the command-line, see: Working with Vivado.
    • First Stage Bootloader (FSBL.elf) - This bootloader configures the Zynq processing system based on the block design in the Vivado project. The FSBL will hand-off to u-boot once the processing system is setup. We build the FSBL using the Xilinx SDK and hardware information exported from Vivado. (see Section 3.3)
    • u-boot (u-boot.elf) - This bootloader takes configuration information and prepares the ARM processing system for booting linux. Once configuration is complete, u-boot will hand-off execution to the ARM linux kernel. We build u-boot directly from the Xilinx u-boot repository, with some configuration modifications to support Rocket. (see Section 3.4)
  • ARM Linux (uImage) - This is a copy of linux designed to run on the ARM processing system. From within this linux environment, we will be able to run tools (like fesvr-zedboard) to interact with the RISC-V Rocket Core. We build directly from the Xilinx linux repository, with a custom device tree file to support Rocket. (see Section 3.6)
  • ARM RAMDisk (uramdisk.image.gz) - The RAMDisk is mounted by ARM Linux and contains the root filesystem. For obtaining it, see Section 3.6, and for modifying it, see Appendix B.
  • devicetree.dtb - Contains information about the ARM core's peripherals for Linux. (See Section 3.6)

F) Building fesvr-zynq

The riscv-fesvr repo provides against which the zynq-fesvr is linked. Additionally, common/csrc includes source for main, and a simple driver, which hands off debug module requests and reponses between the ARM core and rocket chip. Before building, make sure the 2016.2 version of settings64.sh is sourced. To build the riscv-fesvr binary for Linux ARM target (to run on Zynq board), type:

$ make fesvr-zynq

and make sure you have the Xilinx SDK in your PATH, and the riscv-tools/riscv-fesvr submodule initialized in your rocket chip directory. When installing fesvr-zynq, don't forget to copy the library as well (common/build/libfesvr.so to /usr/local/lib on the board).

G) Building riscv-tools for Zybo

The Zybo build was last tested with this version of the toolchain.

Because the Zybo board uses ZynqSmallConfig, riscv-tools must be recompiled to omit floating point instructions. Add the --with-arch=RV64IMA tag to the line in build.sh that builds riscv-gnu-toolchain. It should read as follows:

build_project riscv-gnu-toolchain --prefix=$RISCV --with-arch=RV64IMA

Then run ./build.sh as normal.

When testing on spike, run spike with the --isa=RV64IMA flag.

If pk does not work, make sure it is being built using this version of the toolchain, since it is specifically generated to not have floating point instructions. Also make sure any binaries you want to run on the Zybo are compiled using this toolchain.

Acknowledgments

In addition to those that contributed to rocket chip, this repository is based on internal repositories contributed by:

  • Rimas Avizienis
  • Jonathan Bachrach
  • David Biancolin
  • Scott Beamer
  • Sagar Karandikar
  • Deborah Soung
  • Andrew Waterman

fpga-zynq's People

Contributors

albert-magyar avatar arunthomas avatar bkoppelmann avatar ccelio avatar davidbiancolin avatar dsoung avatar ewoldtcl avatar sagark avatar sbeamer avatar seldridge avatar xfguo avatar yunsup avatar zhemao 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  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

fpga-zynq's Issues

errors when make project

et/scala-2.11/classes...
[error] /home/hars/rocket-chip/fpga-zynq/common/src/main/scala/Top.scala:8: object GeneratorUtils is not a member of package rocketchip
[error] import rocketchip.GeneratorUtils._
[error] ^
[error] /home/hars/rocket-chip/fpga-zynq/common/src/main/scala/Top.scala:29: value <> is not a member of Option[uncore.devices.DebugBusIO]
[error] rocket.io.debug <> adapter.io.debug
[error] ^
[error] /home/hars/rocket-chip/fpga-zynq/common/src/main/scala/Top.scala:61: not found: value getParameters
[error] val paramsFromConfig = getParameters(config)
[error] ^
[error] /home/hars/rocket-chip/fpga-zynq/common/src/main/scala/Top.scala:63: not found: value elaborate
[error] elaborate(s"$projectName.$topModuleName", args.drop(3), paramsFromConfig)
[error] ^
[error] four errors found
error Compilation failed
[error] Total time: 3 s, completed Aug 28, 2016 10:53:51 PM
../common/Makefrag:71: recipe for target '/home/hars/rocket-chip/fpga-zynq/common/build/Top.DefaultFPGAConfig.fir' failed
make: *** [/home/hars/rocket-chip/fpga-zynq/common/build/Top.DefaultFPGAConfig.fir] Error 1

Cycle count of rocket chip zynq infrastructure

Hi there,

Maybe I post this in the wrong forum, but I have searched many places and couldn't find answer to it.

How could we count how many cycles each instruction takes to be executed for a C program running on top of rocket chip FPGA infrastructure (say default config, i.e. pre-built image)?

The closest answer I could find is to compile the C++ cycle emulator and to simulate it, but even a simple "hello world" C program takes long time to be simulated.

Any help would be much appreciated! Thanks.

Ken

How to build riscv-linux from source for zybo?

make fetch-riscv-linux-deliver would download the latest version of Pre-Built Binary and Root FS. But I used the old version of rocket chip (ba96ad2b383a97a15b2d95b1acfd551f576c8faa) , fesvr and bbl. It is too old to use the latest version of pre-built Binary and Root FS. So where to get a modified version of the kernel that ignores FPU instructions?

Errors building the FSBL

Hello,

When bulding the FSBL, I got errors for make.

Problems:

Description	Resource	Path	Location	Type
make: *** [ps7_cortexa9_0/libsrc/coresightps_dcc_v1_2/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/devcfg_v3_4/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/dmaps_v2_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/emacps_v3_2/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/gpiops_v3_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/qspips_v3_3/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scugic_v3_3/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scutimer_v2_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scuwdt_v2_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/sdps_v2_8/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/standalone_v5_5/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/ttcps_v3_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/uartps_v3_1/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/usbps_v2_4/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/xadcps_v2_2/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/xilffs_v3_3/src/make.libs] Error 2	FSBL_bsp		 	C/C++ Problem
make: *** [src/fsbl_handoff.o] Error 1	FSBL		 	C/C++ Problem
make: Target `all' not remade because of errors.	FSBL_bsp		 	C/C++ Problem
make[1]: *** [cc932.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [diskio.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [ff.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [standalone_libs] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xadcps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xadcps_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xadcps_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xadcps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xadcps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xcoresightpsdcc.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdevcfg.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdmaps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdmaps_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdmaps_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdmaps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xdmaps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_bdring.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_control.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xemacps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xgpiops.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips_options.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xqspips.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscugic.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscutimer_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscutimer_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscutimer_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscutimer.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscuwdt_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscuwdt_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscuwdt_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xscuwdt.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xsdps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xsdps_options.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xsdps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xsdps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xttcps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xttcps_options.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xttcps_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xttcps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xttcps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_options.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_selftest.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xuartps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps_endpoint.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps_g.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps_hw.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps_intr.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps_sinit.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: *** [xusbps.o] Error 1	FSBL_bsp		 	C/C++ Problem
make[1]: Target `libs' not remade because of errors.	FSBL_bsp		 	C/C++ Problem

Console:

make pre-build main-build 
a9-linaro-pre-build-step
 
Building file: ../src/fsbl_handoff.S
Invoking: ARM v7 gcc compiler
arm-none-eabi-gcc -Wall -O0 -g3 -I"/home/alpha/fpga-zynq/zedboard/zedboard_rocketchip_ZynqConfig/zedboard_rocketchip_ZynqConfig.sdk/rocketchip_wrapper_hw_platform_0" -c -fmessage-length=0 -MT"src/fsbl_handoff.o" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../FSBL_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/fsbl_handoff.d" -MT"src/fsbl_handoff.o" -o "src/fsbl_handoff.o" "../src/fsbl_handoff.S"
arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [src/fsbl_handoff.o] Error 1

Is this because of CROSS_COMPILE in SDK ? How do I know that I have the right gcc to compile C++ code in SDK ? Or is there another problem ?

Thank you

How to add my programs into uarmdisk.image.gz

Hi all,

I have implemented loading rocket to my zedboard , want add my compiled programs into RAM linux (ur amdisk.image.gz) to running,just like hello(./fesvr-zynq pk hello).But I don't know what to do, plaese help me.Thanks~

Quick instructions not working on Zedboard

After:

$ make fetch-images
$ make fetch-riscv-linux
$ make load-sd SD=path_to_mounted_sdcard

and trying to boot from the SD card nothing happens. I suppose that the case is in the format of the SD.
It has two partitions. The first one is formatted as fat and it will be used for the bootloader while the second one is formatted as ext4 to hold the file system.

As long as Quick Instructions are based on RAMDisk, the ext4 filesystem is not used. So the path_to_mounted_sdcard in our case is the fat formatted partition.

Other petalinux projects boot successfully. I use minicom to connect to the board. In the case of this project's prebuilt images, nothing appears on minicom's screen.

Instructions not working on Zedboard

I followed all the steps, with the Zed booting properly when I login and run
./fesvr-zynq pk hello
or
./fesvr-zynq bbl
the system stucks without the possibility to interrupt with Ctrl+C.

My SD's directory environment:
SD/
-bbl
-BOOT.bin
-uImage
-devicetree.dtb
-uramdisk.image.gz

Any kind of help would be appreciated.
Thanks.

Building a riscv rtos

Hello,

Is it possible to push a small rtos with rocket cores to the fpga instead of riscv-linux, using the build from scratch steps ? The rtos in question has its own gcc.

If this is possible, could you please point out which files are necessary to do so and which steps could be followed in your "build from scratch" steps ?

Regards

make ramdisk-close ERROR mkimage not found

I copied a binary in ramdisk and this happened when closing the ramdisk. Would you know why ?
Thank you !

root@alpha-VirtualBox:/home/alpha/fpga-zynq/zedboard# make ramdisk-close
sh -c 'cd ramdisk/ && sudo find . | sudo cpio -H newc -o' | gzip -9 > uramdisk.cpio.gz
37049 blocks
mkimage -A arm -O linux -T ramdisk -d uramdisk.cpio.gz fpga-images-zedboard/uramdisk.image.gz
/bin/bash: mkimage: command not found
make: *** [ramdisk-close] Error 127

No ZYBO linux image provided

For the time being bbl is not provided with the zybo images; Need to build a new bbl instance with a specific payload for zybo (RV64IMA).

Changing RAMDisk

Hello,

Linux is running out of a RAMdisk and uramdisk.image.gz holds Linux for the ARM cores.

What could be changed by running make ramdisk-open ?

Thank you

"make rocket" fails with a 32 bit architecture

Problem

Building the rocket-chip on a 32-bit architecture causes a failure in

testchipip/src/main/scala/Adapter.scala:99

Steps to reproduce

  1. Start with a fresh repository
  2. Use this configuration file instead in <repo>/common/src/main/scala/
  3. $ cd <repo>/zedboard
    $ make rocket CONFIG=Config32bitsFailure
  4. Observe the same output as here: output_log.txt
  5. You may observe that changing back to 64 bits in the provided configuration file fixes the issue

Additional info

At the point of failure, here's the value of some relevant variables:

64 bits:

w = 32
tlBeatAddrBits = 3
tlByteAddrBits = 3
tlDataBits = 64
pAddrBits = 32
tlDataBeats = 8
tlWriteMaskBits = 8
p(TLId) = L1toL2

32 bits:

w = 32
tlBeatAddrBits = 4
tlByteAddrBits = 2
tlDataBits = 32
pAddrBits = 32
tlDataBeats = 16
tlWriteMaskBits = 4
p(TLId) = L1toL2

The line addr(tlByteAddrBits - 1, log2Up(w/8)) in a 32-bit architecture causes to try accessing addr in the range (1, 2), which is invalid

Quick instructions: git submodule update --init problem

From the very beginning of quick instructions at fpga-zynq's README.md:
First, enter into the directory for your board (current options are zybo, zedboard, and zc706). From there, run the following to download all of the necessary images: $ make fetch-images
But that fails:

[mward@hobby-pc zybo]$ pwd
/home/mward/fpga-zynq/zybo
[mward@hobby-pc zybo]$ make fetch-images
bash /home/mward/fpga-zynq/common/generate-pkg-mk.sh testchipip > /home/mward/fpga-zynq/common/Makefrag.pkgs
git submodule update --init --depth=1 fpga-images-zybo
You need to run this command from the toplevel of the working tree.
make: *** [fpga-images-zybo/boot.bif] Error 1

If I go to the toplevel of the working tree, as the error message suggests:

[mward@hobby-pc fpga-zynq]$ pwd
/home/mward/fpga-zynq
[mward@hobby-pc fpga-zynq]$ make fetch-images
make: *** No rule to make target `fetch-images'.  Stop.
[mward@hobby-pc fpga-zynq]$ git submodule update --init --depth=1 fpga-images-zybo
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]

My git version is 1.8.3.1, but this behaviour has been observed at another PC with older git version, so this problem should be easy to reproduce

Linux on rocket-chip zybo : disk option has no effect

I have a Zybo board loaded with a rocket-chip core (riscv64ima) and I used the linux images obtained with "make fetch-riscv-linux".
I have cross-compiled busybox 1.26.2 and made a new root.bin (removed the old one).
When I use "./fesvr-zynq +disk=/sdcard/riscv/root.bin bbl /sdcard/riscv/vmlinux" or "./fesvr-zynq bbl /sdcard/riscv/vmlinux" it gives me the same result : linux boots and somehow has another filesystem than the one in my root.bin, and contains busybox 1.21.1.

The optional disk option does not seem to have any effect. Since I don't have another root.bin on my sdcard, where does it load busybox from?

No output from fesvr

Hello,
I'm fairly new to the RISC/Rocketchip architecture and I'm trying to get the test program running on a couple of Zynq boards. I'm able to go through all of the steps in the guide expect getting a response from fesvr. It doesn't seem to hang the device and I'm able to Ctrl+C it.

  • I initially tried the zybo but I suspect it fails due to an unresolved issue described here #10
  • I also have a Zynq Mini Module Plus board and I've attempted to add support for it by modifiying some existing files. See repo here. I get the same behaviour from fesvr. I do see a concerning boot up message:

    uio_pdrv_genirq 43c00000.htif: failed to get IRQ
    uio_pdrv_genirq: probe of 43c00000.htif failed with error -22
    I quick google search shows it in the boot up log of someone who was able to still run fesvr.

Any tips on what I'm doing wrong or how I can debug this issue?

Thanks

regenerating ramdisk after modifications

Hi
I have a question regarding re-generating ramdisk after copying a file into the filesystem.

When I open-ramdisk, copy in a binary, then close it, I run make fetch-ramdisk.
When I load the deliver_output files to the SD card, the ramdisk content doesn't change, it doesn't have the binary I added.

Should I make make arm-uboot after closing and removing the ramdisk ?

Thank you very much for your help.

Extending Rocket on Zybo

Hi, so I'm trying to get Rocket to run via some external memory and interface with other peripherals and in so doing have it run programs entirely independently of the ARM APU. I'm assuming that'll take specific handling of the RISC binaries and not using system calls etc, but I've a couple of questions about the structure of Rocket to which I wondered if you wouldn't mind giving brief answers?

I've spent quite a while trying to figure out how everything fits together, and I've made a diagram of how I think things are working with the hope of avoiding pestering you too much!

  1. Is this diagram accurate (w.r.t the default config)?
    rocket-on-zybo

  2. Are the changes (in red) proposed in the second diagram feasible?
    rocket-on-zybo 2

  3. The L1 dcache source is very dense. I'm trying to make it write-through, and I didn't see anything existing that supports that. Is there, and do you think it would be a big task to make it so?

  4. For memory-mapping the LEDs, switches, PMID and other peripherals, to prevent caching, would setting a TileLink RegionType of UNCACHED do it? Do I need to avoid Acquire support?

Apologies if this is the wrong place to ask! If so, any direction on where to point questions would be really appreciated.

Recommended software environment for building October toolchain ?

Last weekends I tried again building riscv-gnu-toolchain using fpga-zynq which is linked to October version of rocket-chip @ 5392219 , with the following software configurations:

  1. CentOS 6.8 with devtoolset-2 which provides gcc 4.8.2 to CentOS 6.8
  2. Fedora 25 with gcc 6.2.1

Both builds are failing, probably because CentOS 6.8 is too old and Fedora 25 is too new for building this toolchain (maybe it treats some earlier warnings as errors...)
Please tell, what software configuration are you using?
[] Linux distribution, its version number and architecture? (i386 or x86_64)
[
] version of gcc?
This information will be very helpful, because the official readme says that any gcc >4.8 is OK, but sadly it isn't...

Build from fresh clone broken (firrtl unresolved dependencies)

Building from a fresh clone using the instructions in the readme gives the following error

(Reproduced on two different platforms)

[info] Set current project to rocketchip (in build file:/home/jsren/fpga-zynq2/rocket-chip/)
[info] Updating {file:/home/jsren/fpga-zynq2/rocket-chip/}cde...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] Scala version was updated by one of library dependencies:
[warn] 	* org.scala-lang:scala-library:2.11.6 -> 2.11.7
[warn] To force scalaVersion, add the following:
[warn] 	ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating {file:/home/jsren/fpga-zynq2/rocket-chip/}coreMacros...
[info] Resolving edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT ...
[warn] 	module not found: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT
[warn] ==== local: tried
[warn]   /home/jsren/.ivy2/local/edu.berkeley.cs/firrtl_2.11/1.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1-SNAPSHOT/firrtl_2.11-1.1-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[info] downloading https://repo1.maven.org/maven2/org/scalamacros/paradise_2.11.7/2.1.0/paradise_2.11.7-2.1.0.jar ...
[info] 	[SUCCESSFUL ] org.scalamacros#paradise_2.11.7;2.1.0!paradise_2.11.7.jar (209ms)
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn] 	Note: Unresolved dependencies path:
[warn] 		edu.berkeley.cs:firrtl_2.11:1.1-SNAPSHOT
[warn] 		  +- edu.berkeley.cs:coremacros_2.11:3.1-SNAPSHOT
[info] Compiling 4 Scala sources to /home/jsren/fpga-zynq2/rocket-chip/context-dependent-environments/target/scala-2.11/classes...
[warn] there were 6 feature warnings; re-run with -feature for details
[warn] one warning found
[info] Packaging /home/jsren/fpga-zynq2/rocket-chip/context-dependent-environments/target/scala-2.11/cde_2.11-1.0.jar ...
[info] Done packaging.
sbt.ResolveException: unresolved dependency: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
	at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
	at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
	at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
	at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
	at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
	at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
	at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
	at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
	at xsbt.boot.Using$.withResource(Using.scala:10)
	at xsbt.boot.Using$.apply(Using.scala:9)
	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[error] (coreMacros/*:update) sbt.ResolveException: unresolved dependency: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found

See also chipsalliance/rocket-chip#573

priv-1.9-rc0-like branch for fpga-zynq and rocket-chip

Hi,

riscv-tools and spike have priv-1.9-rc0 branches, which I use as I consider them stable (no changes). I've been developing assuming these branches on spike, fesvr and pk/bbl. Now, given that I got a new zybo board, I want to run my programs on fpga-zynq and/or rocket-chip priv-1.9-rc0-compatible branch/tag.

I am able to run pk, hello and linux-riscv on the latest fpga-zynq/zybo (after the UseVM fix #24). However, my binary (seL4-based system), doesn't run on this latest RISC-V/fpga-zynq/rocket-chip revision.

The error/warning that I get is:

root@zynq:~# ./fesvr-zynq /sdcard/riscv/sel4test-driver-image-riscv-spike
warning: tohost and fromhost symbols not in ELF; can't communicate with target

The same binary runs on spike git:(priv-1.9) and riscv-fesvr git:(priv-1.9) fine.

Would appreciate any help how to get priv-1.9(-rc0) implementation of rocket-chip/fpga-zybq on zybo.

Cheers,
Hesham

How to put files into riscv linux

1.We tried to install the rocket chip with risc-v linux on Zedboard, and we had successfully entered riscv linux. However, we couldn't put the files compiled by assembler(using the instruction : riscv64-unknown-linux-gnu-g++) into riscv linux. Would someone please tell me how to put it in? (p.s we tried to mount the files into the file called root.bin,but it seems that risc-v linux doesn't use this file to boot.)
2. If we use the linux instrustion [make CONFIG=RoccExampleConfig] on our workshop, would it be RoCC there? If not, how to enable RoCC?

programming zedboard leds

Hello,

I want to run a program for LEDs (Have rocketchip blink the LEDs) with ./fesvr-zynq pk program-led (elf), but this requires modifying the block design of zedboard_rocketchip.

How do I let rocketchip handle the blinking of LEDs ? If I have an empty application on SDK with the bit file of rocketchip, then making the boot.bin with this empty application dedicated to blink LEDs, will the rocketchip handle the blinking of the LEDs or the ARM ?

Thank you

testchipip submodule not being initialised

Running the instructions in Pushing Your Rocket Modifications to the FPGA doesn't seem to initialise the testchipip submodule, leading to build errors.

I'm not sure if I'm doing something wrong, but I didn't see anything about cloning in the readme. My build script is this (bash shell):

    git clone https://github.com/ucb-bar/fpga-zynq
    cd fpga-zynq
    git submodule update --init testchipip  # <-----
    cd zybo
    make fetch-images
    make fetch-riskv-linux
    make init-rocket-submodule
    patch_config
    make pack-rocket
    make rocket
    make project
    make fpga-images-zybo/boot.bin

(where patch_config is a temporary workaround for #24)

Omitting the indicated line results in make rocket failing.

Frequency of vivado project

I follow the README and generate a default rocket-chip vivado project(zedboard) , but the frequency is only 25MHz. Would you please give me some advice to improve the frequency?

Running rocc on zybo

I want to run rocc (https://github.com/ucb-bar/rocc-template) on zybo, I follow the instructions from 2) Pushing Your Rocket Modifications to the FPGA:

make rocket CONFIG=Sha3CPPConfig
make project CONFIG=Sha3CPPConfig
make fpga-images-zybo/boot.bin CONFIG=Sha3CPPConfig

In make fpga-images-zybo/boot.bin CONFIG=Sha3CPPConfig, it reports the error:

ERROR: [Place 30-640] Place Check : This design requires more LUT as Logic cells than are available in the target device. This design requires 38836 of such cell types but only 17600 compatible sites are available in the target device. Please analyze your synthesis results and constraints to ensure the design is mapped to Xilinx primitives as expected. If so, please consider targeting a larger device. Please set tcl parameter "drc.disableLUTOverUtilError" to 1 to change this error to warning.

So, does it means set_param drc.disableLUTOverUtilError 1 ? If so, which file should I write to ?

Error running 'hello'

I've (hopefully!) followed the excellent readme and have downloaded the pre-built binaries for my Zybo board. When I ssh into it and attempt to run ./fesvr-zynq pk hello however, I'm presented with:

../machine/minit.c:26: assertion failed: EXTRACT_FIELD(ms, MSTATUS_VM) == VM_CHOICE

I've searched through GitHub - looks like the latest source for riscv-pk has an assert
https://github.com/riscv/riscv-pk/blob/8006d004a59618ce455c4365c09e138b06ca7b70/machine/minit.c#L26

whereas the source linked The Zybo build was last tested with [this version ](https://github.com/ucb-bar/rocket-chip/commit/2f71a3da5a7d41b4aa2c7a617902f2aee8f2cbe1)of the toolchain. instead just tests and continues?
https://github.com/riscv/riscv-pk/blob/d37b50edf5faee2fe41a2586479ddab7c8a2ec9b/pk/minit.c#L24

Not sure if that's relevant, whether the assert is actually meant to pass or whether this actually relates to bbl?

Cheers

Hello World not working after bitfile regeneration

Hi,

the prebuild images for the zedboard run fine.

root@zynq:~# ./fesvr-zynq pk hello
hello!

But when I create my own bitfile with Vivado (2014 or 2015, doesn't matter) the Hello World test progam produces no output any more. Seems like it stucks.
I execute the commands, like in your tutorial "2) Pushing Your Rocket Modifications to the FPGA".
Then I replace the file boot.bin on the SD card. But I cannot communicate with the RISCV any more.

ERROR MAKE ROCKET

hars@ubuntu:~/rocket-chip/fpga-zynq/zedboard$ make rocket
cd /home/hars/rocket-chip/fpga-zynq/rocket-chip/fsim;
make verilog CONFIG=DefaultFPGAConfig;
make verilog MODEL=ZynqAdapter CONFIG=DefaultFPGAConfig;
cp generated-src/{Top,ZynqAdapter}.DefaultFPGAConfig.v /home/hars/rocket-chip/fpga-zynq/zedboard/src/verilog
make[1]: Entering directory '/home/hars/rocket-chip/fsim'
make[1]: Nothing to be done for 'verilog'.
make[1]: Leaving directory '/home/hars/rocket-chip/fsim'
make[1]: Entering directory '/home/hars/rocket-chip/fsim'
mkdir -p /home/hars/rocket-chip/fsim/generated-src/
cd /home/hars/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/hars/rocket-chip/sbt-launch.jar "run rocketchip ZynqAdapter DefaultFPGAConfig --W0W --minimumCompatibility 3.0.0 --backend v --configName DefaultFPGAConfig --compileInitializationUnoptimized --targetDir /home/hars/rocket-chip/fsim/generated-src --configDump --noInlineMem"
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /home/hars/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/home/hars/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip ZynqAdapter DefaultFPGAConfig --W0W --minimumCompatibility 3.0.0 --backend v --configName DefaultFPGAConfig --compileInitializationUnoptimized --targetDir /home/hars/rocket-chip/fsim/generated-src --configDump --noInlineMem
[info] [0.013] Elaborating design...
error java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at rocketchip.TestGenerator$$anonfun$23.apply(Testing.scala:182)
at rocketchip.TestGenerator$$anonfun$23.apply(Testing.scala:179)
at chisel3.core.Module$.do_apply(Module.scala:30)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:111)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:111)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:121)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:119)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at chisel3.internal.Builder$.build(Builder.scala:119)
at chisel3.Driver$.elaborate(Driver.scala:111)
Caused by: java.lang.IllegalArgumentException: requirement failed: TODO reimplement using debug port, not HTIF
at scala.Predef$.require(Predef.scala:219)
at rocketchip.ZynqAdapter.(Fpga.scala:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at rocketchip.TestGenerator$$anonfun$23.apply(Testing.scala:182)
at rocketchip.TestGenerator$$anonfun$23.apply(Testing.scala:179)
at chisel3.core.Module$.do_apply(Module.scala:30)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:111)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:111)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:121)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:119)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:2077)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:2077)
at scala.Option.foreach(Option.scala:236)
at sbt.BuildCommon$class.toError(Defaults.scala:2077)
at sbt.Defaults$.toError(Defaults.scala:39)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$38$$anonfun$apply$39.apply(Defaults.scala:750)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$38$$anonfun$apply$39.apply(Defaults.scala:748)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
error Nonzero exit code: 1
[error] Total time: 9 s, completed Aug 29, 2016 6:23:11 PM
make[1]: Leaving directory '/home/hars/rocket-chip/fsim'
cp: cannot stat 'generated-src/ZynqAdapter.DefaultFPGAConfig.v': No such file or directory
../common/Makefrag:39: recipe for target 'rocket' failed
make: *** [rocket] Error 1

Im using bf6d00c for this repo

Make rocket error

[root@localhost zedboard]# make rocket
bash /usr/local/fpga-zynq/common/generate-pkg-mk.sh testchipip > /usr/local/fpga-zynq/common/Makefrag.pkgs
cd /usr/local/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /usr/local/rocket-chip/sbt-launch.jar pack
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /usr/local/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/usr/local/rocket-chip/)
[info] Compiling 1 Scala source to /usr/local/rocket-chip/chisel3/target/scala-2.11/classes...
[info] Packaging /usr/local/rocket-chip/chisel3/target/scala-2.11/chisel3_2.11-3.1-SNAPSHOT.jar ...
[info] Done packaging.
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[info] Creating a distributable package in target/pack
[info] Copying libraries to target/pack/lib
[info] project jars:
[info] target/scala-2.11/rocketchip_2.11-1.2.jar
[info] chisel3/target/scala-2.11/chisel3_2.11-3.1-SNAPSHOT.jar
[info] chisel3/coreMacros/target/scala-2.11/coremacros_2.11-3.1-SNAPSHOT.jar
[info] chisel3/chiselFrontend/target/scala-2.11/chiselfrontend_2.11-3.1-SNAPSHOT.jar
[info] hardfloat/target/scala-2.11/hardfloat_2.11-1.2.jar
[info] project dependencies:
[info] org.scala-lang:scala-reflect:2.11.7
[info] com.github.scopt:scopt_2.11:3.4.0
[info] org.scala-lang:scala-library:2.11.7
[info] unmanaged dependencies:
[info] /usr/local/rocket-chip/lib/firrtl.jar
[info] /usr/local/rocket-chip/lib/firrtl.jar
[info] /usr/local/rocket-chip/lib/firrtl.jar
[info] /usr/local/rocket-chip/lib/firrtl.jar
[info] explicit dependencies:
[info] Create a bin folder: target/pack/bin
[info] Generating launch scripts
[info] main class for generator: unittest.Generator
[info] Generating target/pack/bin/generator
[info] Generating target/pack/bin/generator.bat
[info] main class for driver: chisel3.Driver
[info] Generating target/pack/bin/driver
[info] Generating target/pack/bin/driver.bat
[info] main class for fma-test: hardfloat.FMATest
[info] Generating target/pack/bin/fma-test
[info] Generating target/pack/bin/fma-test.bat
[info] packed resource directories = /usr/local/rocket-chip/src/pack
[info] Generating target/pack/Makefile
[info] Generating target/pack/VERSION
[info] done.
[success] Total time: 6 s, completed Jul 7, 2017 7:45:55 PM
mkdir -p /usr/local/fpga-zynq/common/lib
cp /usr/local/rocket-chip/target/pack/lib/* /usr/local/fpga-zynq/common/lib
touch /usr/local/fpga-zynq/common/lib/rocketchip.stamp
rm -f /usr/local/fpga-zynq/common/../testchipip/lib
ln -s /usr/local/fpga-zynq/common/lib /usr/local/fpga-zynq/common/../testchipip/lib
cd /usr/local/fpga-zynq/common/../testchipip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /usr/local/rocket-chip/sbt-launch.jar package
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Set current project to testchipip (in build file:/usr/local/fpga-zynq/testchipip/)
[info] Updating {file:/usr/local/fpga-zynq/testchipip/}testchipip...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Packaging /usr/local/fpga-zynq/testchipip/target/scala-2.10/testchipip_2.10-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 1 s, completed Jul 7, 2017 7:45:59 PM
cp /usr/local/fpga-zynq/common/../testchipip/target/scala-2.11/.jar /usr/local/fpga-zynq/common/lib
cp: cannot stat '/usr/local/fpga-zynq/common/../testchipip/target/scala-2.11/
.jar': No such file or directory
/usr/local/fpga-zynq/common/Makefrag.pkgs:2: recipe for target '/usr/local/fpga-zynq/common/lib/testchipip.stamp' failed
make: *** [/usr/local/fpga-zynq/common/lib/testchipip.stamp] Error 1

That happens because in this: /fpga-zynq/testchipip/target there is this: scala-2.10 and not 2.11.
I changed it from common/Makefrag.pkgs to 2.10, the error gone but I got a bunch of other errors situated in:

  1. /usr/local/fpga-zynq/common/src/main/scala/Configs.scala
  2. /usr/local/fpga-zynq/common/src/main/scala/SerialDriver.scala
  3. /usr/local/fpga-zynq/common/src/main/scala/Top.scala
  4. /usr/local/fpga-zynq/common/src/main/scala/TestHarness.scala
    (sum of 72 errors)
    Taking this:
    [error] Total time: 5 s, completed Jul 7, 2017 7:19:11 PM
    ../common/Makefrag:85: recipe for target '/usr/local/fpga-zynq/common/build/Top.ZynqConfig.fir' failed
    make: *** [/usr/local/fpga-zynq/common/build/Top.ZynqConfig.fir] Error 1

What I'm doing wrong?
Any kind of help would be appreciated.
Thanks!

testchipip build error - Adapter.scala:14: not found: object cde

I am trying to follow the instructions from README.md at "Working with Vivado" chapter to build a vivado project. When I enter make project command, I run into many build issues. The first issue is Adapter.scala:14: not found: object cde, and I am not sure how and where to get this "object cde" ! Below is a full error log:

[mward@hobby-pc zybo]$ pwd
/home/mward/fpga-zynq/zybo
[mward@hobby-pc zybo]$ make project
rm -f /home/mward/fpga-zynq/common/../testchipip/lib
ln -s /home/mward/fpga-zynq/common/lib /home/mward/fpga-zynq/common/../testchipip/lib
cd /home/mward/fpga-zynq/common/../testchipip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/mward/fpga-zynq/rocket-chip/sbt-launch.jar package
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Set current project to testchipip (in build file:/home/mward/fpga-zynq/testchipip/)
[info] Compiling 12 Scala sources to /home/mward/fpga-zynq/testchipip/target/scala-2.11/classes...
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:14: not found: object cde
[error] import cde.{Parameters, Field}
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:16: not found: type Field
[error] case object SerialInterfaceWidth extends Field[Int]
[error]                                          ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:19: not found: type Parameters
[error]   def apply(p: Parameters) = p.alterPartial({
[error]                ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:28: not found: type Parameters
[error] class SerialAdapter(implicit p: Parameters) extends TLModule()(p) {
[error]                                 ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:29: overloaded method value apply with alternatives:
[error]   [T](pname: config.Field[T], site: config.View)T <and>
[error]   [T](pname: config.Field[T])T
[error]  cannot be applied to (testchipip.SerialInterfaceWidth.type)
[error]   val w = p(SerialInterfaceWidth)
[error]           ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:32: could not find implicit value for parameter p: config.Parameters
[error]     val mem = new ClientUncachedTileLinkIO
[error]               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:75: could not find implicit value for parameter p: config.Parameters
[error]   val put_acquire = Put(
[error]                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:82: could not find implicit value for parameter p: config.Parameters
[error]   val get_acquire = Get(
[error]                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:183: not found: type Parameters
[error]   implicit val p: Parameters
[error]                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:192: not found: type Parameters
[error]   implicit val p: Parameters
[error]                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:198: not found: type Parameters
[error]   implicit val p: Parameters
[error]                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:202: class BaseCoreplexBundle takes type parameters
[error]   val coreplexIO: BaseCoreplexBundle
[error]                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Adapter.scala:214: class BaseCoreplexBundle takes type parameters
[error]   val coreplexIO: BaseCoreplexBundle
[error]                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:5: not found: object cde
[error] import cde.Parameters
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:12: not found: type Parameters
[error] class ChannelAddressMapper(n: Int)(implicit p: Parameters) extends Module {
[error]                                                ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:14: could not find implicit value for parameter p: config.Parameters
[error]     val in  = Vec(n, new ClientUncachedTileLinkIO).flip
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:15: could not find implicit value for parameter p: config.Parameters
[error]     val out = Vec(n, new ClientUncachedTileLinkIO)
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:38: not found: type Parameters
[error] class ChannelAddressUnmapper(n: Int, c: Clock = null, r: Bool = null)(implicit p: Parameters)
[error]                                                                                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:41: could not find implicit value for parameter p: config.Parameters
[error]     val in =  Vec(n, new ClientUncachedTileLinkIO).flip
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:42: could not find implicit value for parameter p: config.Parameters
[error]     val out = Vec(n, new ClientUncachedTileLinkIO)
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:62: not found: type Parameters
[error]   def map(in: Seq[ClientUncachedTileLinkIO])(implicit p: Parameters): Seq[ClientUncachedTileLinkIO] = {
[error]                                                          ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/ChannelMapper.scala:68: not found: type Parameters
[error]   def unmap(in: Seq[ClientUncachedTileLinkIO])(implicit p: Parameters): Seq[ClientUncachedTileLinkIO] = {
[error]                                                            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Configs.scala:5: object NCoreplexExtClients is not a member of package rocketchip
[error] import rocketchip.{BaseConfig, NCoreplexExtClients}
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Configs.scala:7: not found: object cde
[error] import cde.{Parameters, Config, CDEMatchError}
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Configs.scala:9: not found: type Config
[error] class WithTestChipUnitTests extends Config(
[error]                                     ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Configs.scala:18: not found: type Config
[error] class TestChipUnitTestConfig extends Config(
[error]                                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Configs.scala:21: not found: type Config
[error] class WithSerialAdapter extends Config(
[error]                                 ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/SCR.scala:5: not found: object cde
[error] import cde.Parameters
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/SCR.scala:16: not found: type Parameters
[error]     (implicit p: Parameters)
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/SCR.scala:23: could not find implicit value for parameter p: config.Parameters
[error]     val tl = (new ClientUncachedTileLinkIO).flip
[error]               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/SCR.scala:77: not found: type Parameters
[error]   def generate(start: BigInt, c: Clock = null, r: Bool = null)(implicit p: Parameters): SCRFile = {
[error]                                                                            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:7: not found: object cde
[error] import cde.{Parameters, Field}
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:25: not found: type Parameters
[error] abstract class TLSerBundle(implicit val p: Parameters)
[error]                                            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:29: not found: type Parameters
[error] abstract class TLSerModule(_clock: Clock = null, _reset: Bool = null)(implicit val p: Parameters)
[error]                                                                                       ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:32: not found: type Parameters
[error] class TLSerChannel(implicit p: Parameters)
[error]                                ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:39: not found: type Parameters
[error] class TLSerializedIO(implicit p: Parameters) extends TLSerBundle()(p) {
[error]                                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:51: not found: type Parameters
[error]   def serialize(in: Acquire)(implicit p: Parameters): TLSerChannel = {
[error]                                          ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:59: not found: type Parameters
[error]   def serialize(in: Probe)(implicit p: Parameters): TLSerChannel = {
[error]                                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:68: not found: type Parameters
[error]   def serialize(in: Release)(implicit p: Parameters): TLSerChannel = {
[error]                                          ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:76: not found: type Parameters
[error]   def serialize(in: Grant)(implicit p: Parameters): TLSerChannel = {
[error]                                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:84: not found: type Parameters
[error]   def serialize(in: Finish)(implicit p: Parameters): TLSerChannel = {
[error]                                         ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:93: not found: type Parameters
[error] class ClientTileLinkIOSerdes(w: Int, _clock: Clock = null, _reset: Bool = null)(implicit p: Parameters)
[error]                                                                                             ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:96: could not find implicit value for parameter p: config.Parameters
[error]     val tl = (new ClientTileLinkIO).flip
[error]               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:127: not found: type Parameters
[error] class ClientTileLinkIODesser(w: Int, _clock: Clock = null, _reset: Bool = null)(implicit p: Parameters)
[error]                                                                                             ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:131: could not find implicit value for parameter p: config.Parameters
[error]     val tl = new ClientTileLinkIO
[error]              ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:161: not found: type Parameters
[error] class ClientUncachedTileLinkIOSerdes(w: Int, _clock: Clock = null, _reset: Bool = null)(implicit p: Parameters)
[error]                                                                                                     ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:165: could not find implicit value for parameter p: config.Parameters
[error]     val tl = (new ClientUncachedTileLinkIO).flip
[error]               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:182: not found: type Parameters
[error] class ClientUncachedTileLinkIODesser(w: Int, _clock: Clock = null, _reset: Bool = null)(implicit p: Parameters)
[error]                                                                                                     ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:186: could not find implicit value for parameter p: config.Parameters
[error]     val tl = new ClientUncachedTileLinkIO
[error]              ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:203: not found: type Parameters
[error]     w: Int, _clock: Clock = null, _reset: Bool = null)(implicit p: Parameters)
[error]                                                                    ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:207: could not find implicit value for parameter p: config.Parameters
[error]     val tl_client = new ClientUncachedTileLinkIO
[error]                     ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Serdes.scala:208: could not find implicit value for parameter p: config.Parameters
[error]     val tl_manager = new ClientUncachedTileLinkIO().flip
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:5: not found: object cde
[error] import cde.{Parameters, Field}
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:92: not found: type Parameters
[error]     (implicit p: Parameters) extends TLModule()(p)
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:96: could not find implicit value for parameter p: config.Parameters
[error]     val in = Vec(nInputChannels, new ClientTileLinkIO).flip
[error]                                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:97: could not find implicit value for parameter p: config.Parameters
[error]     val out = Vec(nOutputChannels, new ClientTileLinkIO)
[error]                                    ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:129: not found: type Parameters
[error]     (implicit p: Parameters) extends TLModule()(p)
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:134: could not find implicit value for parameter p: config.Parameters
[error]     val in = Vec(nInputChannels, new ClientUncachedTileLinkIO).flip
[error]                                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Switcher.scala:135: could not find implicit value for parameter p: config.Parameters
[error]     val out = Vec(nOutputChannels, new ClientUncachedTileLinkIO)
[error]                                    ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/TestHarness.scala:5: not found: object cde
[error] import cde.Parameters
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/TestHarness.scala:9: not found: type Parameters
[error] class TestHarness(implicit p: Parameters) extends unittest.TestHarness
[error]                               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/TestHarness.scala:9: could not find implicit value for parameter p: config.Parameters
[error] class TestHarness(implicit p: Parameters) extends unittest.TestHarness
[error]                                                            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:10: not found: object cde
[error] import cde.Parameters
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:13: not found: type Parameters
[error]   def fullDriverSet(sweepDepth: Int)(implicit p: Parameters) = {
[error]                                                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:17: not found: type Parameters
[error]       (driverParams: Parameters) => {
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:20: could not find implicit value for parameter p: config.Parameters
[error]           Module(new PutSweepDriver(sweepDepth)),
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:21: could not find implicit value for parameter p: config.Parameters
[error] Error occurred in an application involving default arguments.
[error]           Module(new PutMaskDriver),
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:22: could not find implicit value for parameter p: config.Parameters
[error] Error occurred in an application involving default arguments.
[error]           Module(new PutAtomicDriver),
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:23: could not find implicit value for parameter p: config.Parameters
[error] Error occurred in an application involving default arguments.
[error]           Module(new PutBlockSweepDriver(sweepDepth / tlDataBeats)),
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:24: could not find implicit value for parameter p: config.Parameters
[error] Error occurred in an application involving default arguments.
[error]           Module(new PrefetchDriver),
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:25: could not find implicit value for parameter p: config.Parameters
[error] Error occurred in an application involving default arguments.
[error]           Module(new GetMultiWidthDriver))
[error]                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:16: could not find implicit value for parameter p: config.Parameters
[error]     Module(new DriverSet(
[error]            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:30: not found: type Parameters
[error] class TileLinkSwitcherTest(implicit val p: Parameters)
[error]                                            ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:44: could not find implicit value for parameter p: config.Parameters
[error]   val testrams = Seq.fill(2) { Module(new TileLinkTestRAM(depth)) }
[error]                                       ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:45: could not find implicit value for parameter p: config.Parameters
[error]   val interconnect = Module(new TileLinkMemoryInterconnect(1, 2))
[error]                             ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:47: could not find implicit value for parameter p: config.Parameters
[error]   val router = Module(new ClientUncachedTileLinkIORouter(2, addrToRoute _))
[error]                       ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:59: not found: type Parameters
[error] class UncachedTileLinkSwitcherTest(implicit val p: Parameters)
[error]                                                    ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:73: could not find implicit value for parameter p: config.Parameters
[error]   val testrams = Seq.fill(2) { Module(new TileLinkTestRAM(depth)) }
[error]                                       ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:74: could not find implicit value for parameter p: config.Parameters
[error]   val interconnect = Module(new TileLinkMemoryInterconnect(1, 2))
[error]                             ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:76: could not find implicit value for parameter p: config.Parameters
[error]   val router = Module(new ClientUncachedTileLinkIORouter(2, addrToRoute _))
[error]                       ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:88: not found: type Parameters
[error] class TileLinkSerdesTest(implicit val p: Parameters)
[error]                                          ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:97: could not find implicit value for parameter p: config.Parameters
[error]   val testram = Module(new TileLinkTestRAM(depth))
[error]                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:107: not found: type Parameters
[error] class UncachedTileLinkSerdesTest(implicit val p: Parameters)
[error]                                                  ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:116: could not find implicit value for parameter p: config.Parameters
[error]   val testram = Module(new TileLinkTestRAM(depth))
[error]                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:126: not found: type Parameters
[error] class BidirectionalSerdesTest(implicit val p: Parameters)
[error]                                               ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:136: could not find implicit value for parameter p: config.Parameters
[error]   val testram = Module(new TileLinkTestRAM(depth))
[error]                        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:144: not found: type Parameters
[error] class SCRFileTest(implicit val p: Parameters) extends UnitTest {
[error]                                   ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Unittests.scala:195: not found: type Parameters
[error]   def apply(implicit p: Parameters): Seq[UnitTest] =
[error]                         ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:9: not found: object cde
[error] import cde.Parameters
[error]        ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:13: type mismatch;
[error]  found   : chisel3.core.Direction.Input.type
[error]  required: Boolean
[error]     val reset = Bool(INPUT)
[error]                      ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:14: type mismatch;
[error]  found   : chisel3.core.Direction.Output.type
[error]  required: Boolean
[error]     val reset_sync = Bool(OUTPUT)
[error]                           ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:32: recursive value value needs type
[error]     val value = UInt(OUTPUT, width = w)
[error]                              ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:52: not found: type Parameters
[error] class PutSeqDriver(val s: Seq[Tuple2[BigInt,Int]])(implicit p: Parameters) extends Driver()(p) {
[error]                                                                ^
[error] /home/mward/fpga-zynq/testchipip/src/main/scala/Util.scala:62: could not find implicit value for parameter p: config.Parameters
[error]     Put(UInt(0), blockAddr, beatAddr, UInt(d))
[error]        ^
[error] 94 errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 8 s, completed Dec 14, 2016 4:34:48 PM
make: *** [/home/mward/fpga-zynq/common/lib/testchipip.stamp] Error 1

ERROR make arm-uboot: arm-xilinx-linux-gnueabi-gcc: not found

Hello,
I have the following error in zedboard while running make arm-uboot. Could you please tell me how to solve it?

Thank you !

alpha@alpha-VirtualBox:~/fpga-zynq/zedboard$ make arm-uboot
# compile board-compatible u-boot
git submodule update --init /home/alpha/fpga-zynq/common/u-boot-xlnx
# copy relevant configuration files
if [ -a soft_config/boards.cfg ] ; \
	then \
	    cp soft_config/boards.cfg /home/alpha/fpga-zynq/common/u-boot-xlnx/ ; \
	fi;
cp soft_config/zynq_zed.h /home/alpha/fpga-zynq/common/u-boot-xlnx/include/configs/
# actually build
cd /home/alpha/fpga-zynq/common/u-boot-xlnx && make CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_zed_config
make[1]: Entering directory `/home/alpha/fpga-zynq/common/u-boot-xlnx'
Configuring for zynq_zed board...
make[1]: Leaving directory `/home/alpha/fpga-zynq/common/u-boot-xlnx'
cd /home/alpha/fpga-zynq/common/u-boot-xlnx && make CROSS_COMPILE=arm-xilinx-linux-gnueabi- -j16
make[1]: execvp: arm-xilinx-linux-gnueabi-gcc: Not a directory
make[1]: Entering directory `/home/alpha/fpga-zynq/common/u-boot-xlnx'
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
  GEN     include/autoconf.mk.dep
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
  GEN     include/autoconf.mk
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/version_autogenerated.h
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
/bin/sh: 1: arm-xilinx-linux-gnueabi-ld: not found
  CC      lib/asm-offsets.s
  CC      arch/arm/lib/asm-offsets.s
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
make[2]: *** [lib/asm-offsets.s] Error 127
make[2]: *** Waiting for unfinished jobs....
/bin/sh: 1: arm-xilinx-linux-gnueabi-gcc: not found
make[2]: *** [arch/arm/lib/asm-offsets.s] Error 127
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/home/alpha/fpga-zynq/common/u-boot-xlnx'
make: *** [arm-uboot] Error 2

make rocket fails with java.lang.reflect.InvocationTargetException

Commands to reproduce:

git clone [email protected]:ucb-bar/fpga-zynq.git
cd fpga-zynq/zybo
make init-submodules
make rocket

Error:

[error] (run-main-0) java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at util.HasGeneratorUtilities$$anonfun$2.apply(GeneratorUtils.scala:47)
at util.HasGeneratorUtilities$$anonfun$2.apply(GeneratorUtils.scala:44)
at chisel3.core.Module$.do_apply(Module.scala:35)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:91)
at chisel3.Driver$$anonfun$elaborate$1.apply(Driver.scala:91)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:218)
at chisel3.internal.Builder$$anonfun$build$1.apply(Builder.scala:216)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at chisel3.internal.Builder$.build(Builder.scala:216)
at chisel3.Driver$.elaborate(Driver.scala:91)
Caused by: chisel3.core.Binding$BindingException: t (chisel3.core.UInt@4ae48) must be unbound Type. Try using cloneType?: Already bound to OpBinding(zynq.NastiFIFO@4ac1e)
at chisel3.core.Binding$.checkUnbound(Binding.scala:115)
at chisel3.core.Reg$.makeType(Reg.scala:15)
at chisel3.core.Reg$.do_apply(Reg.scala:63)
at chisel3.core.Reg$.apply(Reg.scala:46)
at chisel3.core.Reg$.apply(Reg.scala:53)
at zynq.NastiFIFO.<init>(Top.scala:156)
at zynq.ZynqAXISlave$$anonfun$14.apply(Top.scala:57)
at zynq.ZynqAXISlave$$anonfun$14.apply(Top.scala:57)
at chisel3.core.Module$.do_apply(Module.scala:35)
at zynq.ZynqAXISlave.<init>(Top.scala:57)
at zynq.Top$$anonfun$12.apply(Top.scala:28)
at zynq.Top$$anonfun$12.apply(Top.scala:28)
at chisel3.core.Module$.do_apply(Module.scala:35)
at zynq.Top.<init>(Top.scala:28)
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:2081)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:2081)
at scala.Option.foreach(Option.scala:236)
at sbt.BuildCommon$class.toError(Defaults.scala:2081)
at sbt.Defaults$.toError(Defaults.scala:39)
at  sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$38$$anonfun$apply$39.apply(Defaults.scala:750)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$38$$anonfun$apply$39.apply(Defaults.scala:748)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)

rocket-chip commit: f3299ae91d3f01d0349eb4746886e303e8fb1b41

UPD: "make rocket" in fpga-zynq #8d5981cdab99e8af9ab462a972ad2efcd25a0dc5 (before transition to chisel3) finishes successfully.

How to customize the number of tiles/cores ?

I want to increase the number of cores/tiles in my project. So, what i need to do, and how i can check/confirm it`s working?

I change the parameter NTILES for 4(fpga-zynq/rocket-chip/src/main/scala/uncore/builder.scala) and after this i executed the command $ make fpga-images-zezboard/boot.bin on zedboard directory.

Copy the files inside /fpga-zynq/zedboard/ for SD, insert SD on the Zedboard and turn on the board.
When i execute "grep -c ^processor /proc/cpuinfo", i got 2 as response for the command.
If a execute ./fesvr-zynq bbl and try execute "grep -c ^processor /proc/cpuinfo" again, i got 0 as response.

Vivado (still, 2016.2) cannot retime FPU.

This is a known issue, but there have been some recent developments in the retiming flow in Vivado so i took the time to re-investigate why this continues to be case.

As of 2015.3, synthesis supports retiming with either a custom synthesis strategy enabling it, or by passing -retime on to synth_design. (See UG901)AFAICT, Vivado can now retime in both directions. In any case, i've tried moving the pipeline registers in the FPU to the front of the sub units to no effect.

Pipeline registers behind:

INFO: [Synth 8-5816] Retiming module `FPU__GB0_tempName`                            

    Effective logic levels on critical path before retiming is: 43                                                                                                                                                                            
    Total number of crtical paths = 252                                             
                                                                                    
    Optimizing at the module level                                                  
    Optimizing locally to improve critical paths(may not reduce worst delay)    
                                                                                    
    Effective logic levels on critical path after retiming is: 43                   
    Total number of crtical paths = 684                                             
    Numbers of forward move = 0, and backward move = 65 

Pipeline registers in front:

INFO: [Synth 8-5816] Retiming module `FPU__GB0_tempName`                        
    Effective logic levels on critical path before retiming is: 43              
    Total number of crtical paths = 875                                         
                                                                                
    Optimizing at the module level                                              
    Cannot find a feasible solution:                                            
        Effective logic levels from fpuOpti_0/top/target/coreplex/tiles_0/fpuOpt/FPUFMAPipe_1_1/fma/T_7__2(fixed:BRAM/DSP/SRL) to fpuOpti_0/top/target/coreplex/tiles_0/fpuOpt/FPUFMAPipe_1_1/T_370_data_reg[0](fixed:OUTPUT) is: 43
        Effective logic levels found across for latency (=1) is: 43             
    Optimizing locally to improve critical paths(may not reduce worst delay)    
                                                                                
    Effective logic levels on critical path after retiming is: 43               
    Total number of crtical paths = 250                                         
    Numbers of forward move = 8, and backward move = 5                          
                                                         

I will continue to update this issue as I find the time to investigate further.

Changing the Processor's Clockrate

When I try to modify the RC_CLK_MULT and RC_CLK_DIVIDE variables in the file src/verilog/clocking.vh to increase the processor frequency, Vivado seems to ignore the RC_CLK_DIVIDE value and use 1 (the value for RC_CLK_MULT seems right) causing a constraint violation and aborting the implementation.
The default values are 10.0 / 40.0 and I'm trying to use 27.0 / 100.0 which is near to the maximum allowed frequency in my board before violating the timing reports. Also, I experimented with other values for RC_CLK_DIVIDE and the same error appeared.

Port fpga-zync to myr z-turn board

Dear you all, i'm trying to get a vivado project for porting to z-turn board , with no luck

There is no way to add to git repositories a vivado project for zedboard and/or zybo to syntetize ?

[ERROR] : Can't read BIT file rocketchip_wrapper.bit

Hello,

When I make fpga-images-zedboard/boot.bin for zed I get the following error.

Does anyone know where this is coming from ?

PS: I've checked my licence and it's working.

Thank you

`---------------------------------------------------------------------------------
Start Technology Mapping

Parent process (pid 8629) has died. This helper process will now exit
/home/alpha/Xilinx/Vivado/2016.2/bin/loader: line 164: 8629 Killed "$RDI_PROG" "$@"
[Wed Jul 12 04:26:08 2017] synth_1 finished
wait_on_run: Time (s): cpu = 00:00:00.78 ; elapsed = 00:19:26 . Memory (MB): peak = 1271.480 ; gain = 8.000 ; free physical = 1492 ; free virtual = 2174

launch_runs impl_1 -to_step write_bitstream

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.

INFO: [Common 17-206] Exiting Vivado at Wed Jul 12 04:31:22 2017...
ln -sf ../../zedboard_rocketchip_ZynqConfig/zedboard_rocketchip_ZynqConfig.runs/impl_1/rocketchip_wrapper.bit fpga-images-zedboard/boot_image/rocketchip_wrapper.bit
cd fpga-images-zedboard; bootgen -image boot.bif -w -o boot.bin
[ERROR] : Can't read BIT file - boot_image/rocketchip_wrapper.bit
make: *** [fpga-images-zedboard/boot.bin] Error 1

Error " ../pk/elf.c:46: assertion failed: !(eh.e_flags) & EF_RISCV_RVC " .

I installed riscv-tools on my ubuntu system. Then I wrote a simple hello world program in C. I cross compiled it using "riscv64-unknown-elf-gcc -O2 -o hello1 hello.c". Then I dumped the executable file on petalinux on zedboard, connected to my PC via UART. Here is the problem. While running this "hello" file, I get this error " ../pk/elf.c:46: assertion failed: !(eh.e_flags) & EF_RISCV_RVC " .

Quick instructions not working on Zybo

I have followed 1) Quick Instructions for Zybo and board boots to ARM-Linux. But neither Hello nor RISCV-Linux works for me. There is no output but fesvr-zynq can be interrupted with ^C.

make fetch-images
make fetch-riscv-linux
make load-sd SD=/media/user/C4CA-9924
...
PetaLinux v2013.10 (Yocto 1.4) zynq ttyPS0                                      

zynq login: root                                                                
Password:                                                                       
login[812]: root login  on `ttyPS0'                                             

root@zynq:~# ./fesvr-zynq pk hello
^C
root@zynq:~# ls                                                                 
bbl         fesvr-zynq  hello       pk

[Branch new-devices] Icenet not publically accessible

I'm working on getting Rocket and Boom running in a quadcore configuration each on ZC706.

The master branch of fpga-zynq is rather stale (nearly a year behind) and development of the other projects has continued.

Thus, I wanted to use the new-devices branch, given it seems rather active and maintained. Sadly, I cannot find the Icenet submodule.

[submodule "icenet"] path = icenet url = [email protected]:firesim/icenet.git

This project is not public. Thus, I decided on using the last commit before the introduction of Icenet.

fpga-zynq: dcXT4§D1KSDDOiXIat3xQBlw0XsqxjSP6c6

With the above, I managed to synthesize a quadcore Rocket with 4 BigCores.
Unfortunately, I seem to be unable to find the correct riscv-linux with SMP support.

origin/riscv-4.12-v7 without SMP support works on the fpga running the new bitstream. Compiling with SMP option and using spike -p4 also works. Unfortunately, the kernel hangs on the fpga when initializing the other CPUs:

[ 0.000000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.000000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.000000] smp: Bringing up secondary CPUs ...

I've tried building other branches or commits, but most of these ended in failure (compilation errors or hanging). I assume the problem lies in finding the correct Linux complying with the associated privileged ISA specification (1.10).

Any recommendations on fpga-zynq and riscv-linux compatibility (especially in regards to SMP support)?

Hello World not working after bitfile regeneration

Hi,

the prebuild images for the zedboard run fine.

root@zynq:~# ./fesvr-zynq pk hello
hello!

But when I create my own bitfile with Vivado (2014 or 2015, doesn’t matter) the Hello World test progam
produces no output any more. Seems like it stucks.
I execute the commands like in your tutorial "2) Pushing Your Rocket Modifications to the FPGA”

Then I replace the file boot.bin on the SD card. But I cannot communicate with the RISCV any more.

make arm-uboot error

Hello, when I try to make arm-uboot from my zedboard directory:

[root@localhost zedboard]# make arm-uboot

compile board-compatible u-boot

git submodule update --init /run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx

copy relevant configuration files

if [ -a soft_config/boards.cfg ] ;
then
cp soft_config/boards.cfg /run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx/ ;
fi;
cp soft_config/zynq_zed.h /run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx/include/configs/

actually build

cd /run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx && make CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_zed_config
make[1]: Entering directory '/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx'
Configuring for zynq_zed board...
make[1]: Leaving directory '/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx'
cd /run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx && make CROSS_COMPILE=arm-xilinx-linux-gnueabi- -j16
make[1]: Entering directory '/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx'
make[1]: arm-xilinx-linux-gnueabi-gcc: Command not found
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information.
GEN include/autoconf.mk.dep
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
GEN include/autoconf.mk
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CHK include/generated/version_autogenerated.h
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
/bin/sh: arm-xilinx-linux-gnueabi-ld: command not found
CC lib/asm-offsets.s
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx/./Kbuild:34: recipe for target 'lib/asm-offsets.s' failed
make[2]: *** [lib/asm-offsets.s] Error 127
make[2]: *** Waiting for unfinished jobs....
CC arch/arm/lib/asm-offsets.s
/bin/sh: arm-xilinx-linux-gnueabi-gcc: command not found
/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx/./Kbuild:83: recipe for target 'arch/arm/lib/asm-offsets.s' failed
make[2]: *** [arch/arm/lib/asm-offsets.s] Error 127
Makefile:1075: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory '/run/media/kllbrd/work/fpga-zynq/common/u-boot-xlnx'
../common/Makefrag:133: recipe for target 'arm-uboot' failed
make: *** [arm-uboot] Error 2

Any ideas?
Thank you.

Port to PYNQ-Z1 board locks up when running fesvr

I'm porting fpga-zynq to the Digilent PYNQ-Z1 board (my fork) for which I used the Zybo as a reference. The problem is that when I run the fesvr-zynq pk hello command, the entire system locks up.

I've had many issues that any access of the GP0 AXI port would lock up the system, but I've managed to solve that issue. I can attach and use other peripherals on the AXI interconnect that also connects to the RISCV slave block without a problem. Now I suspect that there is something wrong on the RISCV side.

I've routed the target reset signal from the resetter IP and the target clock to the LEDs as a means of debugging, and confirmed that the clock is 50MHz and the reset remains asserted until I run fesvr so the RISCV core should be out of reset. I'm running out of ideas as what could be the problem.

Any pointers on where I should look?

How to increase BTB entries for normal operation on FPGA

Hi. I have a question about increasing BTB entries.
I want to increase the BTB entries of rocket-chip from 62 to 254 (considering 2 RAS entries).
For this configuation, I change the value of a parameter, NBTBEntries, written in rocket-chip/src/main/scala/PublicConfigs.scala.

And then, I generate verilog codes & a bitstream for zc706 FPGA.
I'm trying to run lua benchmark using a lua interpreter on zc706 FPGA, but it shows me a error message, illegal instruction. This lua interpreter is compiled for riscv ISA, and normally running on the original rocket image for zc706 FPGA.

Is there something more I did't know to change BTB entry size?

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.