From 24cb846812026a9ccaf3bf997d612626e92ead29 Mon Sep 17 00:00:00 2001 From: Colin Schmidt Date: Thu, 13 Jul 2017 16:58:52 -0700 Subject: [PATCH 1/2] Build firrtl first so we dont get that weird error --- Makefrag | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefrag b/Makefrag index 78393c08..d6fd7ba3 100644 --- a/Makefrag +++ b/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 From 098b031dc609bdcaf0da51406a733c39ec534c85 Mon Sep 17 00:00:00 2001 From: Colin Schmidt Date: Thu, 13 Jul 2017 17:07:28 -0700 Subject: [PATCH 2/2] remove old readme about publish local --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index dce8252a..2ccc7682 100644 --- a/README.md +++ b/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.