Giter VIP home page Giter VIP logo

rocket-chip's Introduction

Rocket Chip Generator 🚀 Build Status

This repository contains the Rocket chip generator necessary to instantiate the RISC-V Rocket Core. For more information on Rocket Chip, please consult our technical report.

RocketChip Dev Meeting

RocketChip development meetings happen every 2 weeks on Wednesday 17:00 – 18:00am CST (Pacific Time - Los Angeles) with meeting notes here:

  • Click here to subscribe Meeting Schedule(iCal format)
  • Click here to view Meeting Schedule via Google Calendar
  • Click here to join Zoom meeting (ID: 93899365000, passcode: 754340)

For possible time adjustments, they will be negotiated in Slack and published in the calendar.

Table of Contents

Quick Instructions

Checkout The Code

$ git clone https://github.com/ucb-bar/rocket-chip.git
$ cd rocket-chip
$ git submodule update --init

Install Necessary Dependencies

You may need to install some additional packages to use this repository. Rather than list all dependencies here, please see the appropriate section of the READMEs for each of the subprojects:

Building The Project

Generating verilog

$ make verilog

Generating verilog for a specific Config

$ make verilog CONFIG=DefaultSmallConfig

Keeping Your Repo Up-to-Date

If you are trying to keep your repo up to date with this GitHub repo, you also need to keep the submodules and tools up to date.

$ # Get the newest versions of the files in this repo
$ git pull origin master
$ # Make sure the submodules have the correct versions
$ git submodule update --init --recursive

If rocket-tools version changes, you should recompile and install rocket-tools according to the directions in the rocket-tools/README.

$ cd rocket-tools
$ ./build.sh
$ ./build-rv32ima.sh (if you are using RV32)

What's in the Rocket chip generator repository?

The rocket-chip repository is a meta-repository that points to several sub-repositories using Git submodules. Those repositories contain tools needed to generate and test SoC designs. This respository also contains code that is used to generate RTL. Hardware generation is done using Chisel, a hardware construction language embedded in Scala. The rocket-chip generator is a Scala program that invokes the Chisel compiler in order to emit RTL describing a complete SoC. The following sections describe the components of this repository.

Git Submodules

Git submodules allow you to keep a Git repository as a subdirectory of another Git repository. For projects being co-developed with the Rocket Chip Generator, we have often found it expedient to track them as submodules, allowing for rapid exploitation of new features while keeping commit histories separate. As submoduled projects adopt stable public APIs, we transition them to external dependencies. Here are the submodules that are currently being tracked in the rocket-chip repository:

Scala Packages

In addition to submodules that track independent Git repositories, the rocket-chip code base is itself factored into a number of Scala packages. These packages are all found within the src/main/scala directory. Some of these packages provide Scala utilities for generator configuration, while other contain the actual Chisel RTL generators themselves. Here is a brief description of what can be found in each package:

  • amba This RTL package uses diplomacy to generate bus implementations of AMBA protocols, including AXI4, AHB-lite, and APB.
  • config This utility package provides Scala interfaces for configuring a generator via a dynamically-scoped parameterization library.
  • coreplex This RTL package generates a complete coreplex by gluing together a variety of components from other packages, including: tiled Rocket cores, a system bus network, coherence agents, debug devices, interrupt handlers, externally-facing peripherals, clock-crossers and converters from TileLink to external bus protocols (e.g. AXI or AHB).
  • devices This RTL package contains implementations for peripheral devices, including the Debug module and various TL slaves.
  • diplomacy This utility package extends Chisel by allowing for two-phase hardware elaboration, in which certain parameters are dynamically negotiated between modules. For more information about diplomacy, see this paper.
  • groundtest This RTL package generates synthesizable hardware testers that emit randomized memory access streams in order to stress-tests the uncore memory hierarchy.
  • jtag This RTL package provides definitions for generating JTAG bus interfaces.
  • regmapper This utility package generates slave devices with a standardized interface for accessing their memory-mapped registers.
  • rocket This RTL package generates the Rocket in-order pipelined core, as well as the L1 instruction and data caches. This library is intended to be used by a chip generator that instantiates the core within a memory system and connects it to the outside world.
  • tile This RTL package contains components that can be combined with cores to construct tiles, such as FPUs and accelerators.
  • tilelink This RTL package uses diplomacy to generate bus implementations of the TileLink protocol. It also contains a variety of adapters and protocol converters.
  • system This top-level utility package invokes Chisel to elaborate a particular configuration of a coreplex, along with the appropriate testing collateral.
  • unittest This utility package contains a framework for generateing synthesizable hardware testers of individual modules.
  • util This utility package provides a variety of common Scala and Chisel constructs that are re-used across multiple other packages,

Other Resources

Outside of Scala, we also provide a variety of resources to create a complete SoC implementation and test the generated designs.

  • bootrom Sources for the first-stage bootloader included in the BootROM.
  • csrc C sources for use with Verilator simulation.
  • docs Documentation, tutorials, etc for specific parts of the codebase.
  • emulator Directory in which Verilator simulations are compiled and run.
  • regression Defines continuous integration and nightly regression suites.
  • scripts Utilities for parsing the output of simulations or manipulating the contents of source files.
  • vsim Directory in which Synopsys VCS simulations are compiled and run.
  • vsrc Verilog sources containing interfaces, harnesses and VPI.

IDEs Support

The Rocket Chip Scala build uses mill as build tool.

IDEs like IntelliJ and VSCode are popular in the Scala community and work with Rocket Chip.

The Rocket Chip currently uses nix to configure the build and/or development environment, you need to install it first depending on your OS distro.

Then follow the steps:

  1. Generate BSP config by running:

    mill mill.bsp.BSP/install
    
  2. Patch the argv in .bsp/mill-bsp.json, from

    {"name":"mill-bsp","argv":["/usr/bin/mill","--bsp","--disable-ticker","--color","false","--jobs","1"],"millVersion":"0.10.9","bspVersion":"2.0.0","languages":["scala","java"]}

    to

    {"name":"mill-bsp","argv":["/usr/bin/nix","develop","-c","mill","--bsp","--disable-ticker","--color","false","--jobs","1"],"millVersion":"0.10.9","bspVersion":"2.0.0","languages":["scala","java"]}

For IntelliJ users

  1. Install and configure Scala plugin.

  2. BSP should be automatically run. If it doesn't, click bsp on the right bar, then right-click on your project to reload.

For VSCode users

  1. Install and configure Metals extension.

  2. Execute VSCode command Metals: Import build.

Contributors

Contributing guidelines can be found in CONTRIBUTING.md.

A list of contributors can be found here.

Attribution

If used for research, please cite Rocket Chip by the technical report:

Krste Asanović, Rimas Avižienis, Jonathan Bachrach, Scott Beamer, David Biancolin, Christopher Celio, Henry Cook, Palmer Dabbelt, John Hauser, Adam Izraelevitz, Sagar Karandikar, Benjamin Keller, Donggyu Kim, John Koenig, Yunsup Lee, Eric Love, Martin Maas, Albert Magyar, Howard Mao, Miquel Moreto, Albert Ou, David Patterson, Brian Richards, Colin Schmidt, Stephen Twigg, Huy Vo, and Andrew Waterman, The Rocket Chip Generator, Technical Report UCB/EECS-2016-17, EECS Department, University of California, Berkeley, April 2016

rocket-chip's People

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  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

rocket-chip's Issues

Compiling simulator for cadence irun

Hi,

cd vsim
make

What needs to be modified in the Makefile to target the simulator to Cadence Incisive simulator ?

The Cadence verilog compiler command-line starts with "irun".

Thanks,

David

make
ar rcs libdramsim.a /home/dfong/workspace/riscv/rocket-chip/dramsim2/AddressMapping.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/Transaction.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/BusPacket.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/BankState.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/Rank.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/MemorySystem.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/SimulatorObject.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/TraceBasedSim.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/Bank.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/CommandQueue.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/MemoryController.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/MultiChannelMemorySystem.o /home/dfong/workspace/riscv/rocket-chip/dramsim2/IniReader.o
echo "#ifndef CONST_H" > /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h
echo "#define CONST_H" >> /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h
sed -r 's/(([A-Za-z0-9_]+),([A-Za-z0-9_]+))/#define \1 \2/' /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/Top.DefaultVLSIConfig.prm >> /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h
echo "#define TBFRAG "Top.DefaultVLSIConfig.tb.cpp"" >> /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h
echo "#endif // CONST_H" >> /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h
cd . &&
rm -rf csrc &&
vcs -full64 -notice -line +lint=all,noVCDE,noONGS,noUI -error=PCWM-L -timescale=1ns/10ps -quiet +rad +v2k +vcs+lic+wait +vc+list -CC "-I/include" -CC "-I/usr/bin/riscv/include" -CC "-I/home/dfong/workspace/riscv/rocket-chip/dramsim2" -CC "-std=c++11" -CC "-Wl,-rpath,/usr/bin/riscv/lib" -CC "-include /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.h" -e vcs_main /usr/bin/riscv/lib/libfesvr.so ./libdramsim.a +incdir+/home/dfong/workspace/riscv/rocket-chip/vsim/generated-src +define+CLOCK_PERIOD=0.5 /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/Top.DefaultVLSIConfig.v /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/consts.DefaultVLSIConfig.vh /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/memdessertMemDessert.DefaultVLSIConfig.v /home/dfong/workspace/riscv/rocket-chip/vsrc/rocketTestHarness.v /home/dfong/workspace/riscv/rocket-chip/vsrc/backup_mem.v /home/dfong/workspace/riscv/rocket-chip/csrc/vcs_main.rocketTestHarness.cc /home/dfong/workspace/riscv/rocket-chip/csrc/mm.cc /home/dfong/workspace/riscv/rocket-chip/csrc/mm_dramsim2.cc +define+PRINTF_COND=rocketTestHarness.verbose +libext+.v -o ./simv-Top-DefaultVLSIConfig
-debug_pp \

/bin/bash: line 2: vcs: command not found
Makefrag:57: recipe for target 'simv-Top-DefaultVLSIConfig' failed
make: *** [simv-Top-DefaultVLSIConfig] Error 127

failed to make emulator

I have issues building rocket-chip emulator from scratch.

Environment:

$ uname -r
3.16.7-24-desktop

Steps to reproduce:

$ git clone [email protected]:ucb-bar/rocket-chip.git
$ cd rocket-chip/
$ git submodule update --init
$ cd riscv-tools/
$ git submodule update --init --recursive riscv-tests
$ cd ..
$ export RISCV=/home/drom/work/github/ucb-bar/rocket-chip/riscv-tools
$ cd ../emulator/
$ make
...
[info] [9.517] checking for combinational loops
[info] [9.700] NO COMBINATIONAL LOOP FOUND
[info] [10.035] populating clock domains
CppBackend::elaborate: need 604, redundant 770 shadow registers
[info] [10.595] generating cpp files
CppBackend: createCppFile Top.DefaultCPPConfig-0.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-1.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-2.cpp
[warn] tilelink.scala:989: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)> in class uncore.ManagerTileLinkNetworkPort
[warn] tilelink.scala:991: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)> in class uncore.ManagerTileLinkNetworkPort
[warn] nbdcache.scala:501: UNABLE TO FIND data IN <replay_arb (class Chisel.Arbiter)> in class rocket.MSHRFile
[warn] Testing.scala:151: Width.op- setting width to Width(0): 1 < 10 in class rocketchip.TestGenerator$
[success] Total time: 102 s, completed Oct 31, 2015 2:31:45 PM
g++ -O1 -std=c++11 -I/home/drom/work/github/ucb-bar/rocket-chip/riscv-tools/include -I/home/drom/work/github/ucb-bar/rocket-chip/csrc -I/home/drom/work/github/ucb-bar/rocket-chip/dramsim2 -include /home/drom/work/github/ucb-bar/rocket-chip/emulator/generated-src/Top.DefaultCPPConfig.h -I/home/drom/work/github/ucb-bar/rocket-chip/emulator/generated-src -c -o emulator.o /home/drom/work/github/ucb-bar/rocket-chip/csrc/emulator.cc
In file included from /home/drom/work/github/ucb-bar/rocket-chip/csrc/emulator.cc:3:0:
/home/drom/work/github/ucb-bar/rocket-chip/csrc/htif_emulator.h:6:32: fatal error: fesvr/htif_pthread.h: No such file or directory
 #include <fesvr/htif_pthread.h>
                                ^
compilation terminated.
Makefile:36: recipe for target 'emulator.o' failed
make: *** [emulator.o] Error 1

How to simulate the RISCV Rocket chip

We are trying to simulate design in verilog way. According to the riscv-gcc compiler we are generated the ELF and binary file. This binary file data are feeding to rocket chip through this signals. io_host_in_valid, input [15:0] io_host_in_bits.

Here io_host_in_bits is 16-bit, so we are driving the 2-times for each instruction data in little-Endian mode. We are not getting any response from Rocket core (HTIF). How to simulate the Rocket core and if it is possible to simulate in Xilinx Vivado-2014 as well as debug the design. Can any one help me about this.

how to convert the scala sources to verilog

Hi all,
I have changed the zscale. Mainly is to change the bus. I want to convert the scala sources to verilog in rocket-chip. What should i do ?

Thanks a lot for your feedback.

Chisel3 builds are broken

These have been broken for a day or two


[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:52: value name is not a member of Chisel.Data
[error]   def attach(data: Data): Data = attach(data, data.name, false, false)
[error]                                                    ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:54: value name is not a member of Chisel.Data
[error]   def attach(data: Data, addReg: Boolean): Data = attach(data, data.name, false, false)
[error]                                                                     ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:55: value name is not a member of Chisel.Data
[error]   def attach(data: Data, addReg: Boolean, readOnly: Boolean): Data = attach(data, data.name, readOnly, false)
[error]                                                                                        ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:68: inferred type arguments [Chisel.Data] do not conform to method apply's type parameter bounds [T <: Chisel.Bits]
[error]       rdata(addr) := Cat(UInt(0, width=(scrDataBits-data.getWidth)),reg)
[error]                      ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:68: type mismatch;
[error]  found   : Chisel.UInt
[error]  required: T
[error]       rdata(addr) := Cat(UInt(0, width=(scrDataBits-data.getWidth)),reg)
[error]                              ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:68: type mismatch;
[error]  found   : Chisel.Data
[error]  required: T
[error]       rdata(addr) := Cat(UInt(0, width=(scrDataBits-data.getWidth)),reg)
[error]                                                                     ^
[error] /vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/uncore/src/main/scala/scr.scala:79: Cannot prove that Chisel.Bundle <:< Option[B].
[error]     bundle.flatten.map { x =>
[error]            ^
[error] 7 errors found
[error] (uncore/compile:compileIncremental) Compilation failed
[error] Total time: 44 s, completed Feb 26, 2016 1:43:45 AM
make[1]: *** [/vm/home/buildbot/slave/chisel3-chip_chisel3-chip_CONFIG_DefaultCPPConfig_TORTURE_CONFIG_default/build/vsim/generated-src/Top.DefaultCPPConfig.fir] Error 1

Unable to get the RoCC accelerator built with the default Accumulator example

Tried building the RoCC accelerator default accumulator example for zed board, but getting an error of "illegal instruction"

I tried the below config in the configs.scala file:-

class WithAccumRocc extends Config(
(pname,site,here) => pname match {
case RoccNMemChannels => 1
case RoccMaxTaggedMemXacts => 0
case BuildRoCC => {
Some((p: Parameters) =>
Module(new AccumulatorExample()(p.alterPartial({ case CoreName => "AccumRocc" }))))
}
}
)
class WithRoCCConfig extends Config(new WithAccumRocc ++ new DefaultFPGAConfig)

The bitstream was generated successfully but when i ran the dummy_rocc_test binary generated from the example given in riscv-isa-sim, i got the following error on the zed board.

root@zynq:~# ./fesvr-zynq pk /sdcard/Custom\ elfs/dummy_rocc
z 0000000000000000 ra 0000000000010044 sp 000000000feffb10 gp 0000000000017880
tp 0000000000000000 t0 0000000000017178 t1 0000000000017178 t2 0000000000000000
s0 000000000feffb40 s1 0000000000000000 a0 0000000000000001 a1 000000000feffb48
a2 0000000000000000 a3 0000000000000000 a4 0000000000000000 a5 000000000000007b
a6 0000000000000000 a7 0000000000000001 s2 0000000000000000 s3 0000000000000000
s4 0000000000000000 s5 0000000000000000 s6 0000000000000000 s7 0000000000000000
s8 0000000000000000 s9 0000000000000000 sA 0000000000000000 sB 0000000000000000
t3 0000000000000000 t4 0000000000000000 t5 0000000000000000 t6 0000000000000000
pc 0000000000010168 va 0000000000010168 insn 0027e00b sr 8000000000003008
An illegal instruction was executed!

Any help here would be greatly appreciated.

P.S. :- The dummy_rocc_test example is working fine with spike and has been compiled with riscv64-unknown-elf-gcc

Heterogeneous Core configs do not generate correct L1toL2 network

The current L1toL2 network is parameterized assuming all Tiles have the same number of TileLink ports (see the multiply in the following snippet from Configs.scala):

          nCachelessClients = site(ExtraL1Clients) +
                   site(NTiles) *
                    (1 + (if(site(BuildRoCC).isEmpty) 0
                           else site(RoccNMemChannels)))

Creating a config in which different tiles have different numbers of TileLink ports (for example, if one tile includes a RoCC accelerator with a TileLink port, but another does not) produces the bug.

Seperate "Fast" Mul from "Early Out" Divide

Filing this for tracking purposes.

Right now there is only one parameter, "FastMulDiv", which controls the speed of the multiplier and divider. If you have hardware that can do a fast multiply but not necessarily a divide (or vice versa), you can't independently control that.

Suggest that we replace the top-level/core "FastMulDiv" parameter with two top-level / core parameters,
MulUnroll:Int and EarlyOutDiv:Boolean.

emulator make error

I want to build a C emulator that is capable of generating VCD waveform, so I enter the directory of emulator and compile with "make debug". Then I find the an error (gcc version is 5.3.1 20160413, OS is Ubuntu-16.04):

jiaxun@ubuntu:~/rocket-chip/emulator$ make debug
cd /home/jiaxun/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar sbt-launch.jar "project rocketchip" "run rocketchip

Top DefaultCPPCofig --W0W --minimumCompatibility 3.0.0 --backend c --configName DefaultCPPConfig --

compileInitializationUnoptimized --targetDir /home/jiaxun/rocet-chip/emulator/generated-src --noIoDebug"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /home/jiaxun/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/home/jiaxun/rocket-chip/)
[info] Set current project to rocketchip (in build file:/home/jiaxun/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip Top DefaultCPPConfig --W0W --minimumCompatibility 3.0.0 --backend c --

configName DefaultCPPCofig --compileInitializationUnoptimized --targetDir /home/jiaxun/rocket-chip/emulator/generated-src --

noIoDebug
Generated Address Map
mem 0 - 3fffffff
conf:devicetree 40000000 - 40007fff
conf:csr0 40008000 - 4000ffff
conf:csr1 40010000 - 40017fff
conf:scr 40018000 - 400181ff
Generated Configuration String
platform {
vendor ucb;
arch rocket;
};
ram {
0 {
addr 0;
size 0x40000000;
};
};
core {
0 {
0 {
isa rv64;
addr 0x40008000;
};
};
1 {
0 {
isa rv64;
addr 0x40010000;
};
};
};

UNCORE_SCR: 40018000 -> N_CORES
UNCORE_SCR: 40018001 -> MMIO_BASE
UNCORE_SCR: 40018002 -> MEMORY_CHANNEL_MUX_SELECT
UNCORE_SCR: 4001803f -> HTIF_IO_CLOCK_DIVISOR
CPP elaborate
[info] [8.337] // COMPILING < (class rocketchip.Top)>(12)
[info] [9.003] giving names
[info] [9.453] executing custom transforms
[info] [9.454] convert masked writes of inline mems
[info] [9.721] adding clocks and resets
[info] [11.000] inferring widths
[info] [11.577] eliminating W0W (pre width check)
[info] [11.845] checking widths
[info] [12.019] eliminating W0W (post width check)
[info] [12.313] lowering complex nodes to primitives
[info] [12.313] removing type nodes
[info] [12.540] compiling 105641 nodes
[info] [12.540] computing memory ports
[info] [12.860] resolving nodes to the components
[info] [14.166] creating clock domains
[info] [14.281] pruning unconnected IOs
[info] [14.305] checking for combinational loops
[info] [14.598] NO COMBINATIONAL LOOP FOUND
[info] [14.967] populating clock domains
CppBackend::elaborate: need 1317, redundant 1028 shadow registers
[info] [15.820] generating cpp files
CppBackend: createCppFile Top.DefaultCPPConfig-0.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-1.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-2.cpp
[warn] converters.scala:127: UNABLE TO FIND manager_id IN <ClientTileLinkNetworkPort (class uncore.ClientTileLinkNetworkPort)>

in class uncore.CientTileLinkNetworkPort
[warn] converters.scala:127: UNABLE TO FIND manager_id IN <ClientTileLinkNetworkPort_1 (class

uncore.ClientTileLinkNetworkPort)> in class uncoreClientTileLinkNetworkPort
[warn] converters.scala:208: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)>

in class uncore.anagerTileLinkNetworkPort
[warn] converters.scala:210: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)>

in class uncore.anagerTileLinkNetworkPort
[warn] converters.scala:208: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort_1 (class

uncore.ManagerTileLinkNetworkPort)> in class uncor.ManagerTileLinkNetworkPort
[warn] converters.scala:210: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort_1 (class

uncore.ManagerTileLinkNetworkPort)> in class uncor.ManagerTileLinkNetworkPort
[warn] NastiROM.scala:28: UNABLE TO FIND data IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] NastiROM.scala:28: UNABLE TO FIND last IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] NastiROM.scala:28: UNABLE TO FIND resp IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] nbdcache.scala:538: UNABLE TO FIND data IN <replay_arb (class Chisel.Arbiter)> in class rocket.MSHRFile
[warn] nbdcache.scala:538: UNABLE TO FIND data IN <replay_arb (class Chisel.Arbiter)> in class rocket.MSHRFile
[warn] Testing.scala:206: Width.op- setting width to Width(0): 1 < 10 in class rocketchip.TestGenerator$
[warn] Testing.scala:206: Width.op- setting width to Width(0): 1 < 10 in class rocketchip.TestGenerator$
[success] Total time: 19 s, completed Apr 28, 2016 9:09:39 AM
cd /home/jiaxun/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar sbt-launch.jar "project rocketchip" "run rocketchip

Top DefaultCPPCofig --W0W --minimumCompatibility 3.0.0 --backend c --configName DefaultCPPConfig --

compileInitializationUnoptimized --targetDir /home/jiaxun/rocet-chip/emulator/generated-src-debug --debug --vcd --ioDebug"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /home/jiaxun/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/home/jiaxun/rocket-chip/)
[info] Set current project to rocketchip (in build file:/home/jiaxun/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip Top DefaultCPPConfig --W0W --minimumCompatibility 3.0.0 --backend c --

configName DefaultCPPCofig --compileInitializationUnoptimized --targetDir /home/jiaxun/rocket-chip/emulator/generated-src-debug

--debug --vcd --ioDebug
Generated Address Map
mem 0 - 3fffffff
conf:devicetree 40000000 - 40007fff
conf:csr0 40008000 - 4000ffff
conf:csr1 40010000 - 40017fff
conf:scr 40018000 - 400181ff
Generated Configuration String
platform {
vendor ucb;
arch rocket;
};
ram {
0 {
addr 0;
size 0x40000000;
};
};
core {
0 {
0 {
isa rv64;
addr 0x40008000;
};
};
1 {
0 {
isa rv64;
addr 0x40010000;
};
};
};

UNCORE_SCR: 40018000 -> N_CORES
UNCORE_SCR: 40018001 -> MMIO_BASE
UNCORE_SCR: 40018002 -> MEMORY_CHANNEL_MUX_SELECT
UNCORE_SCR: 4001803f -> HTIF_IO_CLOCK_DIVISOR
CPP elaborate
[info] [8.811] // COMPILING < (class rocketchip.Top)>(12)
[info] [9.412] giving names
[info] [9.913] executing custom transforms
[info] [9.914] convert masked writes of inline mems
[info] [10.177] adding clocks and resets
[info] [10.495] inferring widths
[info] [11.135] eliminating W0W (pre width check)
[info] [11.385] checking widths
[info] [11.562] eliminating W0W (post width check)
[info] [11.747] lowering complex nodes to primitives
[info] [11.747] removing type nodes
[info] [12.022] compiling 105641 nodes
[info] [12.022] computing memory ports
[info] [12.333] resolving nodes to the components
[info] [13.600] creating clock domains
[info] [13.705] pruning unconnected IOs
[info] [13.728] checking for combinational loops
[info] [14.015] NO COMBINATIONAL LOOP FOUND
[info] [14.333] populating clock domains
CppBackend::elaborate: need 1317, redundant 1028 shadow registers
[info] [15.256] generating cpp files
CppBackend: createCppFile Top.DefaultCPPConfig-0.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-1.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-2.cpp
CppBackend: createCppFile Top.DefaultCPPConfig-3.cpp
[warn] converters.scala:127: UNABLE TO FIND manager_id IN <ClientTileLinkNetworkPort (class uncore.ClientTileLinkNetworkPort)>

in class uncore.CientTileLinkNetworkPort
[warn] converters.scala:127: UNABLE TO FIND manager_id IN <ClientTileLinkNetworkPort_1 (class

uncore.ClientTileLinkNetworkPort)> in class uncoreClientTileLinkNetworkPort
[warn] converters.scala:208: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)>

in class uncore.anagerTileLinkNetworkPort
[warn] converters.scala:210: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort (class uncore.ManagerTileLinkNetworkPort)>

in class uncore.anagerTileLinkNetworkPort
[warn] converters.scala:208: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort_1 (class

uncore.ManagerTileLinkNetworkPort)> in class uncor.ManagerTileLinkNetworkPort
[warn] converters.scala:210: UNABLE TO FIND client_id IN <ManagerTileLinkNetworkPort_1 (class

uncore.ManagerTileLinkNetworkPort)> in class uncor.ManagerTileLinkNetworkPort
[warn] NastiROM.scala:28: UNABLE TO FIND data IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] NastiROM.scala:28: UNABLE TO FIND last IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] NastiROM.scala:28: UNABLE TO FIND resp IN <Queue (class Chisel.Queue)> in class uncore.NastiROM
[warn] nbdcache.scala:538: UNABLE TO FIND data IN <replay_arb (class Chisel.Arbiter)> in class rocket.MSHRFile
[warn] nbdcache.scala:538: UNABLE TO FIND data IN <replay_arb (class Chisel.Arbiter)> in class rocket.MSHRFile
[warn] Testing.scala:206: Width.op- setting width to Width(0): 1 < 10 in class rocketchip.TestGenerator$
[warn] Testing.scala:206: Width.op- setting width to Width(0): 1 < 10 in class rocketchip.TestGenerator$
[success] Total time: 20 s, completed Apr 28, 2016 9:10:05 AM
echo "#ifndef CONST_H" > /home/jiaxun/rocket-chip/emulator/generated-src-debug/consts.DefaultCPPConfig.h
echo "#define CONST_H" >> /home/jiaxun/rocket-chip/emulator/generated-src-debug/consts.DefaultCPPConfig.h
sed -r 's/(([A-Za-z0-9_]+),([A-Za-z0-9_]+))/#define \1 \2/' /home/jiaxun/rocket-chip/emulator/generated-src-

debug/Top.DefaultCPPConfig.prm >> home/jiaxun/rocket-chip/emulator/generated-src-debug/consts.DefaultCPPConfig.h
echo "#define TBFRAG "Top.DefaultCPPConfig.tb.cpp"" >> /home/jiaxun/rocket-chip/emulator/generated-src-

debug/consts.DefaultCPPConfig.h
echo "#endif // CONST_H" >> /home/jiaxun/rocket-chip/emulator/generated-src-debug/consts.DefaultCPPConfig.h
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2 -

include /home/jiaxu/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig.scr_map.h -include /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaltCPPConfig.h -include /home/jiaxun/rocket-chip/emulator/generated-src-

debug/consts.DefaultCPPConfig.h -I/home/jiaxun/rocket-chip/emulator/generted-src-debug -c -o emulator.debug.o

/home/jiaxun/rocket-chip/csrc/emulator.cc
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2 -

include /home/jiaxu/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig.scr_map.h -include /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaltCPPConfig.h -include /home/jiaxun/rocket-chip/emulator/generated-src-

debug/consts.DefaultCPPConfig.h -I/home/jiaxun/rocket-chip/emulator/generted-src-debug -c -o mm.debug.o /home/jiaxun/rocket-

chip/csrc/mm.cc
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2 -

include /home/jiaxu/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig.scr_map.h -include /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaltCPPConfig.h -include /home/jiaxun/rocket-chip/emulator/generated-src-

debug/consts.DefaultCPPConfig.h -I/home/jiaxun/rocket-chip/emulator/generted-src-debug -c -o mm_dramsim2.debug.o

/home/jiaxun/rocket-chip/csrc/mm_dramsim2.cc
make -j /home/jiaxun/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o /home/jiaxun/rocket-

chip/emulator/generated-src-debug/TopDefaultCPPConfig-1.o /home/jiaxun/rocket-chip/emulator/generated-src-

debug/Top.DefaultCPPConfig-2.o /home/jiaxun/rocket-chip/emulator/generated-rc-debug/Top.DefaultCPPConfig-3.o
make[1]: Entering directory '/home/jiaxun/rocket-chip/emulator'
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2

-c -o /home/jiaxunrocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.cp
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2

-c -o /home/jiaxunrocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.o /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.cp
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2

-c -o /home/jiaxunrocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-2.o /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaultCPPConfig-2.cp
g++ -O1 -std=c++11 -I/home/jiaxun/riscv_install/include -I/home/jiaxun/rocket-chip/csrc -I/home/jiaxun/rocket-chip/dramsim2

-c -o /home/jiaxunrocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-3.o /home/jiaxun/rocket-

chip/emulator/generated-src-debug/Top.DefaultCPPConfig-3.cp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-5/README.Bugs for instructions.
: recipe for target '/home/jiaxun/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o' failed
make[1]: *** [/home/jiaxun/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o] Error 4
make[1]: *** Waiting for unfinished jobs....
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-5/README.Bugs for instructions.
: recipe for target '/home/jiaxun/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.o' failed
make[1]: *** [/home/jiaxun/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.o] Error 4
make[1]: Leaving directory '/home/jiaxun/rocket-chip/emulator'
Makefile:29: recipe for target 'Top.DefaultCPPConfig.debug.o' failed
make: *** [Top.DefaultCPPConfig.debug.o] Error

Use simpler manager-client bridge when possible

In certain cases (single Tile, no L2 cache, ...) we can use a simpler, stateless bridge and MEI protocol instead of MESI. Figure out a way to cleanly apply this simplified configuration.

Rocket frontend mask logic change of behavior

Introduced by commit https://github.com/ucb-bar/rocket/commit/d91be2b545ea0eb704bf3c2b02b5d200f27426fa#diff-dbf1307484c9f6974955adde94a99967, the behavior of the masking logic has changed (https://github.com/ucb-bar/rocket-chip/blob/master/rocket/src/main/scala/frontend.scala#L128):

io.cpu.resp.bits.mask := UInt((1 << fetchWidth)-1) << s2_pc.extract(log2Up(fetchWidth)+log2Up(coreInstBytes)-1, log2Up(coreInstBytes))

For fetchWidth=1, coreInstBytes=4, that reduces to

mask := UInt(1) << s2_pc(1+2-1, 2)
mask := 1 << pc(2,2)

This means mask can be 0.

The old behavior, for fetchWidth = 1, was for mask to be set to UInt(1) (as the one instruction will always be valid if imem.valid is true).

Is the changed behavior intentional?

Can't generate ZynqAdapter.DefaultFPGAConfig.v

I run the command "make rocket" under fpga-zynq/zedboard.

When it run to the 40 line in the fpga-zynq/common/Makefrag :
make verilog MODEL=ZynqAdapter CONFIG=$(CONFIG); \

It will occur the error.

cd /home/test/Program/rocket-chip && java -Xmx4G -Xss512M -XX:MaxPermSize=256M -jar /home/test/Program/rocket-chip/sbt-launch.jar "run rocketchip ZynqAdapter DefaultFPGAConfig --W0W --minimumCompatibility 3.0.0 --backend v --configName DefaultFPGAConfig --compileInitializationUnoptimized --targetDir /home/test/Program/rocket-chip/fsim/generated-src --configDump --noInlineMem"
[info] Loading project definition from /home/test/Program/rocket-chip/project
Using addons: 
[info] Set current project to rocketchip (in build file:/home/test/Program/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip ZynqAdapter DefaultFPGAConfig --W0W --minimumCompatibility 3.0.0 --backend v --configName DefaultFPGAConfig --compileInitializationUnoptimized --targetDir /home/test/Program/rocket-chip/fsim/generated-src --configDump --noInlineMem
[info] [0.004] Elaborating design...
[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:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    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.<init>(Fpga.scala:24)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    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] (rocketchip/compile:run) Nonzero exit code: 1
[error] Total time: 3 s, completed Jul 21, 2016 2:30:25 PM
make[1]: Leaving directory `/home/test/Program/rocket-chip/fsim'
cp: cannot stat ‘generated-src/{Top,ZynqAdapter}.DefaultFPGAConfig.v’: No such file or directory
make: *** [rocket] Error 1

Synopsys-VCS emulator error

What is the usable version of Synopsys-vcs when emulating the rocket-chip? I used vcs-2014.03, but I got the following error when I typed "make" in the rocket-chip/vsim subdirectory.

_csrc0.so: undefined reference to `QRD_VCSgd_RecFNToIN_1_jIVhfe_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_3_TfB2eb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_L2BroadcastHub_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_12_2yUUxc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPToInt_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkEnqueuer_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ProbeUnit_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FinishQueue_0_9unCvd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_0_Jc4xyd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_0_Qyvlbb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_IntToFP_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_1_2bZmDd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_7_aV9ube_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_5_2J1lmd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientTilenkEnqueuer_eaOaic_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BasicCrossbar_2_kTNPed_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_3_GhDzsd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_2_6sS4Mc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ROMSlave_0_hISk4b_1'
_csrc0.so: undefined reference to `QRD_VCSgd_RecFNToRecFN_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Frontend_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingArbiter_0_3XHOh_1'
_csrc0.so: undefined reference to `QRD_VCSgd_MulDiv_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_12_f3SeVb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_MSHR_1_IeNvRb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_MMIOTileLinkManager_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_5_0gQH0d_1'
_csrc0.so: undefined reference to `QRD_VCSgd_MetadataArray_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkIONarrower_1_xXLhbd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_HellaCacheArbiter_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FinishQueue_1_6atNqd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_5_FwQ3Oc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_DataArray_1'
_csrc0.so: undefined reference to `QRD_VCSgd_SlowIO_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientUncaworkPort_0_ACkGE_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_3_cANWPd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_DivSqrtRecF64_1'
_csrc0.so: undefined reference to `QRD_VCSgd_RocketCAM_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ICache_T178_I4Sv6b_1'
_csrc0.so: undefined reference to `QRD_VCSgd_PRCI_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ManagerTilworkPort_0_wbBDb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientUncaworkPort_1_vqQmI_1'
_csrc0.so: undefined reference to `QRD_VCSgd_MSHRFile_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkIONarrower_0_0vHT5c_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_4_IeSKP_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPUFMAPipe_1_zat2Kd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientUncaOArbiter_2_uR9Uj_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientTileOUnwrapper_jtllye_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Top_1'
_csrc0.so: undefined reference to `QRD_VCSgd_AMOALU_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ClientTileetworkPort_uOE6L_1'
_csrc0.so: undefined reference to `QRD_VCSgd_PTW_1'
_csrc0.so: undefined reference to `QRD_VCSgd_HellaCache_1'
_csrc0.so: undefined reference to `QRD_VCSgd_WritebackUnit_1'
_csrc0.so: undefined reference to `QRD_VCSgd_SCRFile_1'
_csrc0.so: undefined reference to `QRD_VCSgd_OuterMemorySystem_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPUFMAPipe_0_0JbMGd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_11_hwTXMc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_RecFNToRecFN_1_3cSMgb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_RTC_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_2_JZ7Sod_1'
_csrc0.so: undefined reference to `QRD_VCSgd_NastiIOTilonverter_1_zfOGRd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_5_dBoVK_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_6_fC289c_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPToFP_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_4_YDXrUc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ROMSlave_1_04wJ9b_1'
_csrc0.so: undefined reference to `QRD_VCSgd_NastiIOTilonverter_0_cLS4Wd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_1_Hs3v6_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_6_suWO1c_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_2_mKFJib_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BroadcastAeTracker_4_9l9whd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPU_1'
_csrc0.so: undefined reference to `QRD_VCSgd_INToRecFN_1_7Y3Vmd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_4_tqt65d_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BasicCrossbar_1_TA9Whd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ManagerTilworkPort_1_Vc5sg_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkEnqueuer_1_XCfYV_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BasicCrossbar_0_AMRcmd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_rocketTestHarness_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BasicCrossbar_4_oSIdDd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_FPUDecoder_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ALU_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkMeterconnect_xd7dhe_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_1_NYV2xc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_IOMSHR_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_6_FTrLfe_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BTB_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TLB_1'
_csrc0.so: undefined reference to `QRD_VCSgd_TileLinkRerconnect_1_jQZqjd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_CSRFile_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_1_8ojqHd_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Queue_6_MPIpZ_1'
_csrc0.so: undefined reference to `QRD_VCSgd_ReorderQueue_1_0xsDJb_1'
_csrc0.so: undefined reference to `QRD_VCSgd_BasicCrossbar_3_BmIr9c_1'
_csrc0.so: undefined reference to `QRD_VCSgd_RocketTile_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Arbiter_3_378OIc_1'
_csrc0.so: undefined reference to `QRD_VCSgd_Mul54_1'
_csrc0.so: undefined reference to `QRD_VCSgd_LockingRRArbiter_0_V4XOMd_1'
_csrc0.so: undefined reference to `M_VCSgd_rocketTestHarness_1'

The following file keeps the trace of the emulating process:
vcs-emulator-error.txt

Generate Makefrag and C++/Verilog in different runs

Our current way of producing the Makefile fragment for testing and the C++/Verilog for compilation in the same sbt run causes all sorts of headaches. I think we should separate the two out. One run will produce the test fragment, and another will produce the source files. What do you guys think?

Error with "make verilog CONFIG=SmallConfig"

Hi,

I'm getting an error using the cmd-line below (see (1) below)

cd rocket-chip/vsim
make verilog CONFIG=SmallConfig

Is there something wrong in my cmd-line setting and what's the correction?
I didn't modify any other files like Makefile

Thanks,

David

(1) screen output from cmd-line above is below:

cd /home/dfong/workspace/riscv/rocket-chip && mkdir -p /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src && java -Xmx2048M -Xss8M -XX:MaxPermSize=256M -jar sbt-launch.jar "run rocketchip Top SmallConfig --W0W --minimumCompatibility 3.0.0 --backend rocketchip.RocketChipBackend --configName SmallConfig --compileInitializationUnoptimized --targetDir /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src --configDump --noInlineMem"
[info] Loading project definition from /home/dfong/workspace/riscv/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/home/dfong/workspace/riscv/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip Top SmallConfig --W0W --minimumCompatibility 3.0.0 --backend rocketchip.RocketChipBackend --configName SmallConfig --compileInitializationUnoptimized --targetDir /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src --configDump --noInlineMem
error java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:148)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:145)
at Chisel.Driver$$anonfun$executeUnwrapped$2$$anonfun$apply$1.apply(Driver.scala:96)
at Chisel.Driver$$anonfun$executeUnwrapped$2$$anonfun$apply$1.apply(Driver.scala:96)
at Chisel.Module$.Chisel$Module$$init(Module.scala:65)
at Chisel.Module$.apply(Module.scala:50)
at Chisel.Driver$$anonfun$executeUnwrapped$2.apply(Driver.scala:96)
at Chisel.Driver$$anonfun$executeUnwrapped$2.apply(Driver.scala:96)
at Chisel.Driver$.execute(Driver.scala:101)
at Chisel.Driver$.executeUnwrapped(Driver.scala:96)
Caused by: cde.ParameterUndefinedException: Parameter HtifKey undefined.
at cde.World$TopLookup$1.apply(Parameters.scala:150)
at cde.Parameters.apply(Parameters.scala:313)
at rocketchip.HasTopLevelParameters$class.htifW(RocketChip.scala:45)
at rocketchip.BasicTopIO.htifW$lzycompute(RocketChip.scala:70)
at rocketchip.BasicTopIO.htifW(RocketChip.scala:70)
at rocketchip.BasicTopIO.(RocketChip.scala:72)
at rocketchip.TopIO.(RocketChip.scala:76)
at rocketchip.Top.(RocketChip.scala:96)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:148)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:145)
Caused by: scala.MatchError: HtifKey (of class uncore.HtifKey$)
at rocketchip.SmallConfig$$anonfun$21.apply(Configs.scala:352)
at rocketchip.SmallConfig$$anonfun$21.apply(Configs.scala:352)
at cde.World$TopLookup$1.apply(Parameters.scala:148)
at cde.Parameters.apply(Parameters.scala:313)
at rocketchip.HasTopLevelParameters$class.htifW(RocketChip.scala:45)
at rocketchip.BasicTopIO.htifW$lzycompute(RocketChip.scala:70)
at rocketchip.BasicTopIO.htifW(RocketChip.scala:70)
at rocketchip.BasicTopIO.(RocketChip.scala:72)
at rocketchip.TopIO.(RocketChip.scala:76)
at rocketchip.Top.(RocketChip.scala:96)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:1943)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:1943)
at scala.Option.foreach(Option.scala:236)
at sbt.BuildCommon$class.toError(Defaults.scala:1943)
at sbt.Defaults$.toError(Defaults.scala:38)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$36$$anonfun$apply$37.apply(Defaults.scala:719)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$36$$anonfun$apply$37.apply(Defaults.scala:717)
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:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
error Nonzero exit code: 1
[error] Total time: 9 s, completed Feb 23, 2016 4:57:41 PM
cd /home/dfong/workspace/riscv/rocket-chip && mkdir -p /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src && java -Xmx2048M -Xss8M -XX:MaxPermSize=256M -jar sbt-launch.jar "run rocketchip Top SmallConfig --W0W --minimumCompatibility 3.0.0 --backend rocketchip.RocketChipBackend --configName SmallConfig --compileInitializationUnoptimized --targetDir /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src --configDump --noInlineMem"
[info] Loading project definition from /home/dfong/workspace/riscv/rocket-chip/project
Using addons:
[info] Set current project to rocketchip (in build file:/home/dfong/workspace/riscv/rocket-chip/)
[info] Running rocketchip.TestGenerator rocketchip Top SmallConfig --W0W --minimumCompatibility 3.0.0 --backend rocketchip.RocketChipBackend --configName SmallConfig --compileInitializationUnoptimized --targetDir /home/dfong/workspace/riscv/rocket-chip/vsim/generated-src --configDump --noInlineMem
error java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:148)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:145)
at Chisel.Driver$$anonfun$executeUnwrapped$2$$anonfun$apply$1.apply(Driver.scala:96)
at Chisel.Driver$$anonfun$executeUnwrapped$2$$anonfun$apply$1.apply(Driver.scala:96)
at Chisel.Module$.Chisel$Module$$init(Module.scala:65)
at Chisel.Module$.apply(Module.scala:50)
at Chisel.Driver$$anonfun$executeUnwrapped$2.apply(Driver.scala:96)
at Chisel.Driver$$anonfun$executeUnwrapped$2.apply(Driver.scala:96)
at Chisel.Driver$.execute(Driver.scala:101)
at Chisel.Driver$.executeUnwrapped(Driver.scala:96)
Caused by: cde.ParameterUndefinedException: Parameter HtifKey undefined.
at cde.World$TopLookup$1.apply(Parameters.scala:150)
at cde.Parameters.apply(Parameters.scala:313)
at rocketchip.HasTopLevelParameters$class.htifW(RocketChip.scala:45)
at rocketchip.BasicTopIO.htifW$lzycompute(RocketChip.scala:70)
at rocketchip.BasicTopIO.htifW(RocketChip.scala:70)
at rocketchip.BasicTopIO.(RocketChip.scala:72)
at rocketchip.TopIO.(RocketChip.scala:76)
at rocketchip.Top.(RocketChip.scala:96)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:148)
at rocketchip.TestGenerator$$anonfun$15.apply(Testing.scala:145)
Caused by: scala.MatchError: HtifKey (of class uncore.HtifKey$)
at rocketchip.SmallConfig$$anonfun$21.apply(Configs.scala:352)
at rocketchip.SmallConfig$$anonfun$21.apply(Configs.scala:352)
at cde.World$TopLookup$1.apply(Parameters.scala:148)
at cde.Parameters.apply(Parameters.scala:313)
at rocketchip.HasTopLevelParameters$class.htifW(RocketChip.scala:45)
at rocketchip.BasicTopIO.htifW$lzycompute(RocketChip.scala:70)
at rocketchip.BasicTopIO.htifW(RocketChip.scala:70)
at rocketchip.BasicTopIO.(RocketChip.scala:72)
at rocketchip.TopIO.(RocketChip.scala:76)
at rocketchip.Top.(RocketChip.scala:96)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:1943)
at sbt.BuildCommon$$anonfun$toError$1.apply(Defaults.scala:1943)
at scala.Option.foreach(Option.scala:236)
at sbt.BuildCommon$class.toError(Defaults.scala:1943)
at sbt.Defaults$.toError(Defaults.scala:38)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$36$$anonfun$apply$37.apply(Defaults.scala:719)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$36$$anonfun$apply$37.apply(Defaults.scala:717)
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:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
error Nonzero exit code: 1
[error] Total time: 6 s, completed Feb 23, 2016 4:57:58 PM
/home/dfong/workspace/riscv/rocket-chip/vsim/Makefrag-verilog:6: recipe for target '/home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/Top.SmallConfig.v' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/vsim/generated-src/Top.SmallConfig.v] Error 1

Non-existent Chisel Commit

It looks like the Chisel submodule is now pointing at an invalid commit ID (ededc302ed1fc9ba9d583cf32d50deec55683952).

Chisel is being invoked too many times on error (3x)?

I'm trying to generate C++ emulators, and if I have a Chisel compile error, I get Chisel being invoked three times (I'm expecting Chisel to be invoked twice, the first to attempt to compile the hardware quickly, and the second to generate the proper stack trace as required if an error is found).

I'm wondering if the emulator/Makefile may be the culprit:

44 $(generated_dir)/$(MODEL).$(CONFIG).d $(model_header) $(params_file): $(chisel_srcs)                   
45    cd $(base_dir) && $(SBT) "project $(PROJECT)" "run $(CHISEL_ARGS) --noIoDebug"                      
46                                                                                                        

Is anyone else seeing this behavior?

Where to download the untethered lowRisc by Wei Song ?

Hi,

I'm a little confused by the various implementations of RISCV :

RocketChip (original SOC from UCB with HTIF)
zscale (RISCV 3 pipeline with no cache)

but where to find the untethered lowRISC by Wei Song ?

Or is the untethered lowRISC now the official rocket-chip release?
If yes, how to add the "minion" RISCV to the rocket-chip?

Thanks,

David

Unable to run c code when FPU is disabled in rocket chip.

I wrote a c code and compiled it with riscv64-unknown-elf-gcc and ran it on the rocket chip instantiated on a zedboard using the proxy kernel and front end server(./fesvr-zynq pk ).

The same binary works on the zedboard when the fpu is enabled from configs.scala but the binary just doesn't execute when the fpu is disabled.

Unable to generate bistream for Zedboard

I wasn't able to generate a bistream for the Zedboard. I followed the flow described in https://github.com/ucb-bar/fpga-zynq/blob/master/README.md. Here's the error output I see:

arun@yoshi:~/riscv/rocket-chip/fpga-zynq/zedboard$ make fpga-images-zedboard/boot.bin 
...
ERROR: [Synth 8-439] module 'ICache_tag_array' not found [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:4645]
ERROR: [Synth 8-285] failed synthesizing module 'ICache' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:4176]
ERROR: [Synth 8-285] failed synthesizing module 'Frontend' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:5613]
ERROR: [Synth 8-285] failed synthesizing module 'RocketTile' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:35154]
ERROR: [Synth 8-285] failed synthesizing module 'Top' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:53055]
ERROR: [Synth 8-285] failed synthesizing module 'rocketchip_wrapper' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/rocketchip_wrapper.v:4]

Here's the relevant snippet from Top.DefaultFPGAConfig.v:

  ICache_tag_array tag_array (
    .CLK(clk),
    .RW0A(FlowThroughSerializer_1_io_done ? s2_idx : T131),
    .RW0E(T133 || FlowThroughSerializer_1_io_done),
    .RW0W(FlowThroughSerializer_1_io_done),
    .RW0I(T128),
    .RW0M(T121),
    .RW0O(T119)
  );

Other modules in Top.DefaultFPGAConfig.v did syntehsize:

INFO: [Synth 8-638] synthesizing module 'Top' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:53055]
INFO: [Synth 8-638] synthesizing module 'RocketTile' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:35154]
INFO: [Synth 8-638] synthesizing module 'Frontend' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:5613]
INFO: [Synth 8-638] synthesizing module 'BTB' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:1]
INFO: [Synth 8-256] done synthesizing module 'BTB' (47#1) [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:1]
INFO: [Synth 8-638] synthesizing module 'ICache' [/home/arun/riscv/rocket-chip/fpga-zynq/zedboard/src/verilog/Top.DefaultFPGAConfig.v:4176]

I'm happy to provide any other info you need to track this down.

Thanks for your help,
Arun

Add info to README on submodule update procedure

Can we update the README with instructions on what to do when the submodules are updated? The dependencies (if any) are not clear or automated by the build flow.

  • Do I need to rebuild & re-install riscv-tools (yes)
  • Do I need to rebuild chisel3 ? If so, what is the command?
  • Do I need to rebuild firrtl? If so, what is the command?
    -Anything else?

4496e8d Failing Uncore Assertion

I just bumped my rocket-chip version and started getting a broadcast.scala (from uncore) assertion failure when running the C++ emulator. I bisected and it's originating in 4496e8d.

For a basic hello world C program, when running the C++ emulator on 56ecdff (one behind 4496e8d), I see:

$ ./emulator-Top-DefaultCPPConfig pk hello.rv
hello

When switching to 4496e8d, I get:

$ ./emulator-Top-DefaultCPPConfig pk hello.rv
Assertion failed: AcquireTracker initialized with a tail data beat

I'm using the current rocket-chip submodule references for riscv-tools.

dataBits and dataBeats parameters in HasHtifParameters

trait HasHtifParameters {
  implicit val p: Parameters
  val htifExternal = p(HtifKey)
  val dataBits = p(TLKey(p(TLId))).dataBitsPerBeat
  val dataBeats = p(TLKey(p(TLId))).dataBeats
  val w = htifExternal.width
  val nSCR = htifExternal.nSCR
  val scrAddrBits = log2Up(nSCR)
  val scrDataBits = 64
  val scrDataBytes = scrDataBits / 8
  val csrDataBits = htifExternal.csrDataBits
  val csrDataBytes = csrDataBits / 8
  val offsetBits = htifExternal.offsetBits
  val nCores = htifExternal.nCores
}

In the above code snippet from htif.scala, the TLKey(p(TLId)) corresponds to TLKey("L1toL2") in Configs.scala. Thus, p(TLKey(p(TLId))) equals to the TileLinkParameters defined by TLKey("L1toL2"). However, neither dataBits or dataBeats shows in this definition.

Chisel3 generation creates empty begin/end bodies

From vsim, when I build the verilog with CHISEL_VERSION=3 CONFIG=DefaultRV32Config, there are many empty begin-end bodies generated. This is legal in SystemVerilog, but not Verilog, and some tools complain.

Is this sort of output expected? I can set my tool to accept SystemVerilog inputs but this could cause other issues.

Example: first occurrence is in HTIF, line 613 of my generated output:

always @(posedge clk) begin
if(reset) begin
rx_count <= 15'h0;
end else begin
if(T_1391) begin
if(T_1392) begin
rx_count <= 1'h0;
end else begin
if(T_1225) begin
rx_count <= T_1228;
* end else begin
;
end
*
end

...

Known issues in DebugModule

Two issues that need to be resolved in the DebugModule (I will fix)

  1. Bug in the stall logic on the Tile Link interface
  2. The Default Debug ROM code is not in line with the size of the Debug RAM. Need to produce different ROM versions for the different RAM sizes.

Request to remove tracegen scripts

Commit https://github.com/ucb-bar/groundtest/commit/ee8e226b7f22166adac53dced39f3134cc41fe0c has put the tracegen scripts into groundtest, including a bugfix from @mwachs5.

Would someone with write access please remove the following files from rocket-chip:

  • scripts/toaxe.py
  • scripts/tracegen+check.sh
  • scripts/tracegen.py
  • scripts/tracestats.py

The only remaining file in the scripts directory should be a Makefile by @zhemao which is not related to tracegen.

Feel free to bump to the latest groundtest too.

GLIBC version used

Hi,

I am having some issues while compiling the design using VCS. The errors are coming from the g++ invocation by VCS. Can you please tell which version of glibc was used for the project. The one I am using is:

%ldd --version

ldd (Ubuntu EGLIBC 2.15-0ubuntu10.12) 2.15
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Thanks a lot :)

Device tree generation

I see there is an automatic device tree generation in the current Rocket-chip generator.
Can I somehow get a dts file from it instead a dtb file?
I am trying to catch up with the latest development.
Is the generated dtb file utilized in emulator/vsim/FPGA?
Also is the current RISC-V Linux kernel reads this file?

Thanks!

Error compiling emulator "make -j8 run-asm-tests"

Hi,

I was able to compile the emulator with no error

cd emulator
make debug

I get this error related to

riscv64-unknown-elf-gcc: error: ./../env/entry.S: No such file or directory
and it's probably related to the installation.

Which make or build cmd-line will install the relevant files under
/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/env

Thanks,

David

make -j8 run-asm-tests-debug
(installation echoed out to screen)
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-simple.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-add.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-addi.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-and.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-andi.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-auipc.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-beq.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-bge.hex
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
riscv64-unknown-elf-gcc -DENTROPY=19162 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/simple.S -lc -o rv64ui-v-simple
riscv64-unknown-elf-gcc -DENTROPY=19164 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/andi.S -lc -o rv64ui-v-andi
riscv64-unknown-elf-gcc -DENTROPY=19166 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/auipc.S -lc -o rv64ui-v-auipc
riscv64-unknown-elf-gcc -DENTROPY=19169 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/bge.S -lc -o rv64ui-v-bge
riscv64-unknown-elf-gcc -DENTROPY=19168 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/and.S -lc -o rv64ui-v-and
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
riscv64-unknown-elf-gcc: error: ./../env/v/vm.c: No such file or directory
riscv64-unknown-elf-gcc -DENTROPY=19163 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/addi.S -lc -o rv64ui-v-addi
riscv64-unknown-elf-gcc -DENTROPY=19165 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/add.S -lc -o rv64ui-v-add
Makefile:77: recipe for target 'rv64ui-v-simple' failed
make[1]: *** [rv64ui-v-simple] Error 1
riscv64-unknown-elf-gcc -DENTROPY=19167 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/beq.S -lc -o rv64ui-v-beq
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
riscv64-unknown-elf-gcc: error: ./../env/v/vm.c: No such file or directory
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-simple.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-add.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-addi.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-and.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-andi.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-auipc.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-beq.hex
make -C /home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/ rv64ui-v-bge.hex
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
make[1]: Entering directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
riscv64-unknown-elf-gcc -DENTROPY=19162 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/simple.S -lc -o rv64ui-v-simple
riscv64-unknown-elf-gcc -DENTROPY=19164 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/andi.S -lc -o rv64ui-v-andi
riscv64-unknown-elf-gcc -DENTROPY=19166 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/auipc.S -lc -o rv64ui-v-auipc
riscv64-unknown-elf-gcc -DENTROPY=19169 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/bge.S -lc -o rv64ui-v-bge
riscv64-unknown-elf-gcc -DENTROPY=19168 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/and.S -lc -o rv64ui-v-and
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
riscv64-unknown-elf-gcc: error: ./../env/v/vm.c: No such file or directory
riscv64-unknown-elf-gcc -DENTROPY=19163 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/addi.S -lc -o rv64ui-v-addi
riscv64-unknown-elf-gcc -DENTROPY=19165 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/add.S -lc -o rv64ui-v-add
Makefile:77: recipe for target 'rv64ui-v-simple' failed
make[1]: *** [rv64ui-v-simple] Error 1
riscv64-unknown-elf-gcc -DENTROPY=19167 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -std=gnu99 -O2 -I./../env/v -I./macros/scalar -T./../env/v/link.ld ./../env/v/entry.S ./../env/v/vm.c rv64ui/beq.S -lc -o rv64ui-v-beq
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
riscv64-unknown-elf-gcc: error: ./../env/v/vm.c: No such file or directory
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
riscv64-unknown-elf-gcc: error: ./../env/v/entry.S: No such file or directory
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
Makefile:77: recipe for target 'rv64ui-v-beq' failed
make[1]: *** [rv64ui-v-beq] Error 1
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
/home/dfong/workspace/riscv/rocket-chip/Makefrag:43: recipe for target '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-bge.hex' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-bge.hex] Error 2
Makefile:77: recipe for target 'rv64ui-v-addi' failed
make[1]: *** [rv64ui-v-addi] Error 1
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
/home/dfong/workspace/riscv/rocket-chip/Makefrag:43: recipe for target '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-and.hex' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-and.hex] Error 2
make[1]: Leaving directory '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa'
/home/dfong/workspace/riscv/rocket-chip/Makefrag:43: recipe for target '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-add.hex' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-add.hex] Error 2
/home/dfong/workspace/riscv/rocket-chip/Makefrag:43: recipe for target '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-beq.hex' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-beq.hex] Error 2
/home/dfong/workspace/riscv/rocket-chip/Makefrag:43: recipe for target '/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-addi.hex' failed
make: *** [/home/dfong/workspace/riscv/rocket-chip/riscv-tools/riscv-tests/isa/rv64ui-v-addi.hex] Error 2

Atomic increment using LR/SC

Hi,

I have a barrier implementation which works when the atomic increment part is implemented using an amoadd.d:

amoadd.d a0, %1, (%0)

but not when using an LR/SC:

1:
lr.d   a0, 0(%0)
add    a0, a0, %1
sc.d   a0, a0, 0(%0)
bnez   a0, 1b

I've made a simplified, self-contained implementation that demonstrates the problem:

  1. Download the source files at:

    http://www.cl.cam.ac.uk/~mn416/rocket-lrsc-issue/

  2. Build by running make.sh to produce main.hex

  3. Pass main.hex to a rocket-chip emulator compiled with `NTILES=2':

> ./emulator +loadmem=main.hex

When using amoadd.d, the program prints

Started
Finished

When using LR/SC, we only see Started. The second half of the barrier, which waits until every core has incremented a shared variable, doesn't seem to terminate.

Atomic swap using LR/SC

The tracegen+check.sh script is showing some odd LR/SC behaviour:

  1. a very low LR/SC success rate;
  2. successful SCs that are not atomic.

I'm still trying to figure out the reason for (1), but I've managed to reproduce (2) in an ISA-level test. I will focus on this ISA-level test below. (If you'd prefer to see it using tracegen+check.sh then you need to uncomment line 429 in tracegen.scala and comment line 430.)

The problem seems to occur when there is no dependency between an LR and an SC, as would arise when implementing an atomic swap using LR/SC. In other words: when the SC is issued before the LR response is received.

I'm using litmus tests to observe the bad behaviour. (I ported CHERI-Litmus to rocket-chip.)

Here is the litmus test:

RISCV
"LR/SC atomic swap test"
{
0:r2=x;
1:r2=x;
}
 P0                  | P1 ;
 lr.w r1, 0(r2)      | lr.w r1, 0(r2) ;
 li r3, 1            | li r3, 2 ; 
 sc.w r4, r3, 0(r2)  | sc.w r4, r3, 0(r2) ;
exists
(0:r4=0 /\ 1:r4=0 /\ 0:r1=0 /\ 1:r1=0)

Unpacking this:

  • we have one shared variable x, implicitly initialised to 0
  • we have two processes, both performing an LR/SC to x
  • one process writes 1, the other writes 2
  • the exists condition is looking for the case where both SCs succeed and both LRs return 0, which should be impossible

Running the test we get:

Observed outcomes:
751: 0:r4=0 1:r4=0 0:r1=0 1:r1=1
1: 0:r4=1 1:r4=0 0:r1=0 1:r1=0
248: 0:r4=0 1:r4=0 0:r1=0 1:r1=0
OBSERVED

The condition that should be impossible is observed 248 times out of a 1000.

When I replace the two li instructions with add r3, r1, 1, i.e. turning the swaps into increments and introducing a dependency between the LR and SC, then I am unable to observe any bad behaviour.

Elfs, objdumps, and hexes are available here:

http://www.cl.cam.ac.uk/~mn416/lrsc-issue/

The test takes about a minute to complete.

Dumps and instructions

Hi everyone, and thanks for your work.

I'm doing "homework" with the rocket chip, we'd like to understand, and even help with the coherence protocols. Initially, we wanted to implement MOESI, but we're seeing we're out of time for that.

So, let's get to the "issue", whenever I compile the cycle precise emulator, and test it with the tests found at riscv-tools/riscv-tests, I get a dump, which, AFAIK, corresponds to the writeback stage. In the example you show at the README.md, at the end, there's the decoded instruction. But whenever I execute any test, I don't get any of these.

Is this feature implemented somewhere?
If not, I'll probably write it myself, where do you think it should be added?
Thanks!

TestHarness and Rocket default VLSI port mismatch

Hi,

I am trying to run VCS with the latest rocketTestHarness.

I run make -j16 run in rocket-chip/vsim, and I get many of these errors: Lint-[TFIPC-L] Too few instance port connections.

Is this only an issue on my end? Please help.

Thanks,
Weidong

ZscaleConfig no longer works

There seem to be two issues:

  1. the top-level module name and testbench name need to be manually changed, in addition to the config name.

  2. the testbench no longer builds.

I wonder if the right thing to do is to split Zscale out into its own top-level project, rather than being a part of rocket-chip.

riscv-tools needs a bump

There is an issue with current version of riscv-tools (7219be435a89277603e566e806ae8540c7f9a917).

$ echo -e '#include <stdio.h>\n int main(void) { printf("Hello world!\n"); return 0; }' > hello.c
$ riscv64-unknown-elf-gcc -o hello hello.c
$ spike pk hello

The sequence above would currently result in a segmentation fault.

Described here : https://groups.google.com/a/groups.riscv.org/forum/#!topic/sw-dev/YK7xA9sfVZc

Turns out that updating to latest riscv-tools (816a2527a0c2181a5d2150b3412399b523afc106) solves this issue.

Can riscv-tools be bumped please? Thanks.

Infinite loop on rv64ui-v* tests using Chisel2

I'm cloning a clean copy of the rocket-chip repo, building the tools from scratch, and changing Chisel version in ./Makefrag to CHISEL_VERSION ?= 2.

Steps to reproduce:

git clone https://github.com/ucb-bar/rocket-chip.git clean-rocket-chip
cd clean-rocket-chip/
git submodule update --init
cd riscv-tools/
git submodule update --init --recursive
./build.sh
cd ..; vim Makefrag (change Chisel version to 2)
cd vsim/; make output/rv64ui-v-simple.out
... hangs ...

This only occurs in vsim.*

if I look at the processor printout, it's stuck on sd gp, 24(sp):

C0:     103136 [1] pc=[ffffe000c8] W[r 2=ffffffffffe086d0][1] R[r 2=0000000000000000] R[r 0=0000000000000000] inst=[14011173] csrrw   sp, sscratch, sp
C0:     103137 [0] pc=[ffffe000c8] W[r 0=0000000000000000][0] R[r 2=0000000000000000] R[r 0=0000000000000000] inst=[14011173] csrrw   sp, sscratch, sp
C0:     103138 [0] pc=[ffffe000c8] W[r 0=0000000000000000][0] R[r 2=0000000000000000] R[r 0=0000000000000000] inst=[14011173] csrrw   sp, sscratch, sp
C0:     103139 [0] pc=[ffffe000cc] W[r 0=ffffffffffe086d8][0] R[r 2=ffffffffffe086d0] R[r 1=0000000000000000] inst=[00113423] sd      ra, 8(sp)
C0:     103140 [0] pc=[ffffe000d0] W[r 0=ffffffffffe086e8][0] R[r 2=ffffffffffe086d0] R[r 3=0000000000000000] inst=[00313c23] sd      gp, 24(sp)
C0:     103141 [0] pc=[ffffe000d0] W[r 0=ffffffffffe086e8][0] R[r 2=ffffffffffe086d0] R[r 3=0000000000000000] inst=[00313c23] sd      gp, 24(sp)
C0:     103142 [0] pc=[ffffe000d0] W[r 0=ffffffffffe086e8][0] R[r 2=ffffffffffe086d0] R[r 3=0000000000000000] inst=[00313c23] sd      gp, 24(sp)
C0:     103143 [0] pc=[ffffe000d0] W[r 0=ffffffffffe086e8][0] R[r 2=ffffffffffe086d0] R[r 3=0000000000000000] inst=[00313c23] sd      gp, 24(sp)
C0:     103144 [0] pc=[ffffe000d0] W[r 0=ffffffffffe086e8][0] R[r 2=ffffffffffe086d0] R[r 3=0000000000000000] inst=[00313c23] sd      gp, 24(sp)
... "sd gp, 24(sp)" ad infinitum ...

Is anybody else seeing this? Is this a known problem?


*Actually, I also hit an assertion failure in NASTI when trying "make run" in emulator:

 C0:      56299 [1] pc=[0080000304] W[r 2=0000000000ff00ff][1] R[r 3=0000000080002000] R[r 0=0000000000000000] inst=[0001a103] lw      sp, 0(gp)
 Invalid read address 701082c0                                                                                            
 C0:      56300 [0] pc=[0080000304] W[r 0=0000000080002000][0] R[r 3=0000000080002000] R[r 0=0000000000000000] inst=[0001a103] lw      sp, 0(gp)
 C0:      56301 [0] pc=[0080000304] W[r 0=0000000080002000][0] R[r 3=0000000080002000] R[r 0=0000000000000000] inst=[0001a103] lw      sp, 0(gp)
 Assertion failed: NASTI read error                                                                                       
 emulator-Top-DefaultConfig: ../fesvr/dtm.cc:297: void dtm_t::tick(bool, bool, dtm_t::resp): Assertion `resp_wait' failed.

Compilation fails with Chisel2

I just tried this from a clean repo. Building the default config with CHISEL_VERSION=2 yields the following error in during uncore compilation:

[error] /scratch/bkeller/test/rocket-chip/uncore/src/main/scala/dma.scala:372: inferred type arguments [Chisel.UInt,uncore.Acquire] do not conform to method apply's type parameter bounds [S <: Chisel.UInt,T <: Chisel.Bits]
[error]   io.mem.acquire.bits := MuxLookup(
[error]                          ^
[error] /scratch/bkeller/test/rocket-chip/uncore/src/main/scala/dma.scala:373: type mismatch;
[error]  found   : Chisel.UInt
[error]  required: S
[error]     state, prefetch_acquire, Seq(
[error]     ^
[error] /scratch/bkeller/test/rocket-chip/uncore/src/main/scala/dma.scala:373: type mismatch;
[error]  found   : uncore.Acquire
[error]  required: T
[error]     state, prefetch_acquire, Seq(
[error]            ^
[error] /scratch/bkeller/test/rocket-chip/uncore/src/main/scala/dma.scala:373: type mismatch;
[error]  found   : Seq[(Chisel.UInt, uncore.Acquire)]
[error]  required: Seq[(S, T)]
[error]     state, prefetch_acquire, Seq(
[error]                                 ^
[error] four errors found
[error] (uncore/compile:compileIncremental) Compilation failed
[error] Total time: 20 s, completed Jun 23, 2016 10:25:46 AM

I understand that Chisel2 builds are no longer checked by Travis, but if they're not working and not going to work then we should probably remove the option from the make infrastructure.

weird output of C emulator

I did a C simulator and this is the output file for rv64ui-p-add.out

C0: 0 [0] pc=[529b4473c8] W[r 0=0000000000000000][0] R[r 4=b9c1d835c084f7a4] R[r16=1ffebe133e9aa313] inst=[db025a65] DASM(db025a65)
C0: 1 [0] pc=[529b4473c8] W[r 0=0000000000000000][0] R[r 4=b9c1d835c084f7a4] R[r16=1ffebe133e9aa313] inst=[db025a65] DASM(db025a65)
C0: 2 [0] pc=[529b4473c8] W[r 0=0000000000000000][0] R[r 4=b9c1d835c084f7a4] R[r16=1ffebe133e9aa313] inst=[db025a65] DASM(db025a65)
C0: 3 [0] pc=[529b4473c8] W[r 0=0000000000000000][0] R[r 4=b9c1d835c084f7a4] R[r16=1ffebe133e9aa313] inst=[db025a65] DASM(db025a65)

can anyone help me what might be the reason for this ?

[rocket] blocking cache loses result in back-to-back write

This problem came up when using the trace generator with the blocking L1 DCache. If two writes to different blocks with the same index go into the cache back-to-back and the first write was a hit on a previously clean line, the result of the first write will be lost.

The issue is that the first write updates the metadata state to dirty. However, the second write reads the metadata before this update occurs, believes that it can evict the block without writeback (since it's clean), and overwrites the change made by the first write.

AXE reports failing case with random seed 3 using TraceGenL2Config with L1D_MSHRS set to 0 and NTiles set to 1. Shrunken AXE trace as follows.

0: { M[3] == 0; M[3] := 32} @ 489:
0: M[3] := 54 @ 904:
0: M[3] == 32 @ 1092:1172

Waveform is on i0 under /home/zhemao/tracegen.vcd.

Unable to compile using make in vsim directory

Hi,

I am trying to make vcs simulator but getting the following errors:

Warning-[ERASM] Argument size mismatch
/ufs/vlsi/nks45/RISCV/rocket-chip/vsrc/rocketTestHarness.v, 396
"htif_fini(1'b1);"
External routine argument size mismatch.
Use +lint=ERASM-L for details.

50 modules and 2 UDPs read.
However, due to incremental compilation, no re-compilation is necessary.
make[1]: Entering directory /ufs/vlsi/nks45/RISCV/rocket-chip/vsim/csrc' make[1]: Warning: Filefilelist.cu' has modification time 2 s in the future
ld -shared -o .//../simv-DefaultVLSIConfig.daidir//_csrc0.so objs/udps/zTfCi.o objs/udps/iMDw8.o
rm -f _csrc0.so
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsGroupGetActive' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tomiHeapProf_init'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to printIclBeginMarker' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCallocFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to executeTclProc' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckMallocFromGroupFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to waitForUserInput' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference tostoreSimLogFileHandle'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsSetOutOfMemoryRoutine' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference toregisterPreRestartFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to initNativeUcli' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckReallocFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsNamedAllocateGroup' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference toprintIclEndMarker'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsCallocFromGroup' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsHighMemory'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsStrdupFunc' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckMallocFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsGetMemBytes' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsMallocFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsReallocFromGroup' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckCallocFromGroupFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to execMhpiTclCommand' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsMallocFromGroup'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsSetHook' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsFreeFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsMemSetLogFileHandle' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsFreeGroup'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsOutOfMem' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsNamedPushGroup'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to miHeapOn' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference tosetIclCmd_ResVars'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to setEnvPair' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsLowMemory'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsCheckFreeFunc' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference toregisterOutOfMemHandle'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to vcsRunUcliErrorScript' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference toshutDownNativeUcli'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsMemManagerIsActive' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsDoStackUnwind'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to breakNativeTclLoop' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckCallocFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsNamedPopGroup' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference tostoreMiscTfCb'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsCurrentGroup' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference toisUcliEngineStarted'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsPrintf' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsCheckStrdupFunc'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsucli.so: undefined reference to execMhpiTclCommandNoPrint' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsGetHook'
/ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference to snpsReallocFunc' /ufs/cad/synopsys/vcs-K-2015.09/linux64/lib/libvcsnew.so: undefined reference tosnpsGroupSize'
collect2: error: ld returned 1 exit status
make[1]: *** [product_timestamp] Error 1
make[1]: Leaving directory `/ufs/vlsi/nks45/RISCV/rocket-chip/vsim/csrc'
Make exited with status 2
make: *** [simv-DefaultVLSIConfig] Error 2

errors occur when compiling Scala sources for Rocket

I run the command "make verilog" under vsim, and I get the following errors:

[info] Compiling 21 Scala sources to /home/meac/rocket-chip/rocket/target/scala-2.11/classes...
[error] /home/meac/rocket-chip/rocket/src/main/scala/idecode.scala:78: type mismatch;
[error]  found   : chisel3.core.UInt
[error]  required: Chisel.BitPat
[error]     (which expands to)  chisel3.util.BitPat
[error]     BNE->       List(Y,    N,N,Y,N,N,Y,Y,A2_RS2, A1_RS1, IMM_SB,DW_X,  FN_SNE,   N,M_X,      MT_X, N,N,N,N,N,N,CSR.N,N,N,N),
[error]                                          ^
[error] /home/meac/rocket-chip/rocket/src/main/scala/idecode.scala:78: type mismatch;
[error]  found   : chisel3.core.UInt
[error]  required: Chisel.BitPat
[error]     (which expands to)  chisel3.util.BitPat
[error]     BNE->       List(Y,    N,N,Y,N,N,Y,Y,A2_RS2, A1_RS1, IMM_SB,DW_X,  FN_SNE,   N,M_X,      MT_X, N,N,N,N,N,N,CSR.N,N,N,N),

rocket-chip is unable to generate verilog code for boom core

Recently, I find that rocket-chip generator is unable to generate verilog code for boom core, and I am suspecting that it is caused by the undefined macro $(ROCKETCHIP_ADDONS) in /rocket-chip/Makefrag, which was assigned "boom" previously.

Doubt regarding DMA controller

I saw this new configuration in configs.scala as shown below

class WithDmaController extends Config( (pname, site, here) => pname match { case UseDma => true case BuildRoCC => Seq( RoccParameters( opcodes = OpcodeSet.custom2, generator = (p: Parameters) => Module(new DmaController()(p)), useDma = true)) case RoccMaxTaggedMemXacts => 1 })

I can see that the custom2 opcode is being mapped to DmaController() but i am unable to see the definition of DmaController in rocc.scala. Where is it defined

DivSqrtRecF64 is no longer retime-able in synthesis

The divide/square-root unit in the FPU used to be a valid target for retiming, but recently I've been getting the following message from the synthesis tool running on DefaultVLSIConfig:

Information: Checking pipeline property of cell RocketTile/FPU/DivSqrtRecF64 (design DivSqrtRecF64). 
Information: Pipeline detection aborted. Reason: cell RocketTile/FPU/DivSqrtRecF64/ds/*cell*151366 is in a feedback loop.
Information: Aborted pipeline detection on cell RocketTile/FPU/DivSqrtRecF64 (design DivSqrtRecF64).

Is this no longer a valid pipeline for retiming? Do we care?

ExampleSmallConfig Fails run-bmark-tests

I believe the issue has to do with the fact that ExampleSmallConfig has no FPU.
The code jumps to the trap_handler during the boot code, because it seems to execute the fssr rather than taking the branch around the FPU setup code.

At first I thought it might be due to a branch mis-predict but I think rather the check here

  ## if that didn't stick, we don't have a FPU, so don't initialize it                                                                                                              
  li t1, MSTATUS_FS                                                                                                                                                                 
  and t1, t0, t1                                                                                                                                                                    
  beqz t1, 1f   

is not actually branch around the FPU setup code.

Should be replicable on master with

make CONFIG=ExampleSmallConfig output/median.riscv.out

Convert the scala sources of Zscale(changed) to verilog in rocket-chip.

Hi everyone, and thanks for your work.
I have changed the Zscale. Mainly is to change the bus. I want to Convert the scala sources of Zscale i changed to verilog in rocket-chip. I only need Zscale. Using the Zscale i changed replaces the zscale in Rocket-chip, and then "make CONFIG=ZscaleConfig MODEL=ZscaleTop verilog", but Something is wrong. I do not know how to config. Do me need to change other place? as makefile or some configuration, then convert the scala sources of Zscale i changed to verilog in rocket-chip.
thanks for your help!

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.