Merge pull request #12 from ucb-bar/fix-firrtl-error
Build firrtl first so we dont get that weird error
This commit is contained in:
10
Makefrag
10
Makefrag
@@ -11,7 +11,10 @@ lookup_scala_srcs = $(shell find $(1)/ -iname "*.scala" 2> /dev/null)
|
||||
|
||||
libs: $(rocketchip_stamp) $(extra_stamps)
|
||||
|
||||
$(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR))
|
||||
FIRRTL_JAR ?= $(ROCKETCHIP_DIR)/firrtl/utils/bin/firrtl.jar
|
||||
FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
|
||||
|
||||
$(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR)) $(FIRRTL_JAR)
|
||||
cd $(ROCKETCHIP_DIR) && $(SBT) pack
|
||||
mkdir -p $(lib_dir)
|
||||
cp $(ROCKETCHIP_DIR)/target/pack/lib/*.jar $(lib_dir)
|
||||
@@ -22,11 +25,10 @@ $(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR))
|
||||
$(base_dir)/Makefrag.pkgs: $(base_dir)/generate-pkg-mk.sh
|
||||
bash $(base_dir)/generate-pkg-mk.sh $(EXTRA_PACKAGES) > $@
|
||||
|
||||
FIRRTL_JAR ?= $(ROCKETCHIP_DIR)/firrtl/utils/bin/firrtl.jar
|
||||
FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
|
||||
|
||||
$(FIRRTL_JAR): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR)/firrtl/src/main/scala)
|
||||
$(MAKE) -C $(ROCKETCHIP_DIR)/firrtl SBT="$(SBT)" root_dir=$(ROCKETCHIP_DIR)/firrtl build-scala
|
||||
mkdir -p $(ROCKETCHIP_DIR)/lib
|
||||
cp -p $(FIRRTL_JAR) $(ROCKETCHIP_DIR)/lib
|
||||
|
||||
build_dir=$(sim_dir)/generated-src
|
||||
|
||||
|
||||
13
README.md
13
README.md
@@ -34,18 +34,7 @@ the following steps are necessary.
|
||||
To compile the example design, run make in the "verisim" directory.
|
||||
This will elaborate the DefaultExampleConfig in the example project.
|
||||
|
||||
Note that due to mismanaged Chisel/Firrtl dependencies in the upstream
|
||||
code, you may see an error like this:
|
||||
|
||||
[error] (coreMacros/*:update) sbt.ResolveException: unresolved dependency: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
|
||||
|
||||
You can work around this error by first building Firrtl and publishing
|
||||
the jar locally:
|
||||
|
||||
cd rocket-chip/firrtl; sbt publish-local
|
||||
|
||||
Once these issues are resolved, an executable called
|
||||
simulator-example-DefaultExampleConfig will be produced.
|
||||
An executable called simulator-example-DefaultExampleConfig will be produced.
|
||||
You can then use this executable to run any compatible RV64 code. For instance,
|
||||
to run one of the riscv-tools assembly tests.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user