change dir structure

This commit is contained in:
alonamid 2019-03-07 14:18:24 -08:00 committed by abejgonzalez
parent 17c38a502a
commit 2def0dfea7
11 changed files with 17 additions and 17 deletions

6
.gitmodules vendored
View File

@ -1,9 +1,9 @@
[submodule "rocket-chip"]
path = rocket-chip
path = generators/rocket-chip
url = https://github.com/ucb-bar/rocket-chip.git
[submodule "testchipip"]
path = testchipip
path = generators/testchipip
url = https://github.com/ucb-bar/testchipip.git
[submodule "barstools"]
path = barstools
path = tools/barstools
url = https://github.com/ucb-bar/barstools.git

View File

@ -1,5 +1,5 @@
ROCKETCHIP_DIR=$(base_dir)/rocket-chip
TESTCHIP_DIR = $(base_dir)/testchipip
ROCKETCHIP_DIR=$(base_dir)/generators/rocket-chip
TESTCHIP_DIR = $(base_dir)/generators/testchipip
SCALA_VERSION=2.12.4
SCALA_VERSION_MAJOR=$(basename $(SCALA_VERSION))
@ -9,7 +9,7 @@ SBT ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar $(ROCKETCHIP_DIR)/sbt-launch
lookup_scala_srcs = $(shell find $(1)/ -iname "*.scala" 2> /dev/null)
PACKAGES=rocket-chip testchipip
SCALA_SOURCES=$(foreach pkg,$(PACKAGES),$(call lookup_scala_srcs,$(base_dir)/$(pkg)/src/main/scala)) $(call lookup_scala_srcs,$(base_dir)/src/main/scala)
SCALA_SOURCES=$(foreach pkg,$(PACKAGES),$(call lookup_scala_srcs,$(base_dir)/generators/$(pkg)/src/main/scala)) $(call lookup_scala_srcs,$(base_dir)/src/main/scala)
ROCKET_CLASSES ?= "$(ROCKETCHIP_DIR)/target/scala-$(SCALA_VERSION_MAJOR)/classes:$(ROCKETCHIP_DIR)/chisel3/target/scala-$(SCALA_VERSION_MAJOR)/*"
TESTCHIPIP_CLASSES ?= "$(TESTCHIP_DIR)/target/scala-$(SCALA_VERSION_MAJOR)/classes"
@ -39,16 +39,16 @@ REPL_SEQ_MEM = --repl-seq-mem -c:$(MODEL):-o:$(SMEMS_CONF)
# This should match whatever the commonSettings version is in build.sbt
BARSTOOLS_VER=1.0
TAPEOUT_JAR=$(base_dir)/barstools/tapeout/target/scala-$(SCALA_VERSION_MAJOR)/tapeout-assembly-$(BARSTOOLS_VER).jar
MACROCOMPILER_JAR=$(base_dir)/barstools/macros/target/scala-$(SCALA_VERSION_MAJOR)/barstools-macros-assembly-$(BARSTOOLS_VER).jar
TAPEOUT_JAR=$(base_dir)/tools/barstools/tapeout/target/scala-$(SCALA_VERSION_MAJOR)/tapeout-assembly-$(BARSTOOLS_VER).jar
MACROCOMPILER_JAR=$(base_dir)/tools/barstools/macros/target/scala-$(SCALA_VERSION_MAJOR)/barstools-macros-assembly-$(BARSTOOLS_VER).jar
TAPEOUT ?= java -Xmx8G -Xss8M -cp $(ROCKET_CLASSES):$(TESTCHIPIP_CLASSES):$(TAPEOUT_JAR)
MACROCOMPILER ?= java -Xmx8G -Xss8M -cp $(ROCKET_CLASSES):$(TESTCHIPIP_CLASSES):$(MACROCOMPILER_JAR)
$(TAPEOUT_JAR): $(call lookup_scala_srcs, $(base_dir)/barstools/tapeout/src/main/scala)
$(TAPEOUT_JAR): $(call lookup_scala_srcs, $(base_dir)/tools/barstools/tapeout/src/main/scala)
cd $(base_dir) && $(SBT) "tapeout/assembly"
$(MACROCOMPILER_JAR): $(call lookup_scala_srcs, $(base_dir)/barstools/macros/src/main/scala) $(call lookup_scala_srcs, $(base_dir)/barstools/mdf/scalalib/src/main/scala)
$(MACROCOMPILER_JAR): $(call lookup_scala_srcs, $(base_dir)/tools/barstools/macros/src/main/scala) $(call lookup_scala_srcs, $(base_dir)/tools/barstools/mdf/scalalib/src/main/scala)
cd $(base_dir) && $(SBT) "barstools-macros/assembly"
.PHONY: jars

View File

@ -19,9 +19,9 @@ lazy val commonSettings = Seq(
Resolver.sonatypeRepo("releases"),
Resolver.mavenLocal))
lazy val rocketchip = RootProject(file("rocket-chip"))
lazy val rocketchip = RootProject(file("generators/rocket-chip"))
lazy val testchipip = project.settings(commonSettings)
lazy val testchipip = (project in file("generators/testchipip")).settings(commonSettings)
.dependsOn(rocketchip)
// Checks for -DROCKET_USE_MAVEN.
@ -39,12 +39,12 @@ def conditionalDependsOn(prj: Project): Project = {
lazy val example = conditionalDependsOn(project in file("."))
.settings(commonSettings)
lazy val tapeout = conditionalDependsOn(project in file("./barstools/tapeout/"))
lazy val tapeout = conditionalDependsOn(project in file("./tools/barstools/tapeout/"))
.settings(commonSettings)
lazy val mdf = (project in file("./barstools/mdf/scalalib/"))
lazy val mdf = (project in file("./tools/barstools/mdf/scalalib/"))
lazy val `barstools-macros` = conditionalDependsOn(project in file("./barstools/macros/"))
lazy val `barstools-macros` = conditionalDependsOn(project in file("./tools/barstools/macros/"))
.enablePlugins(sbtassembly.AssemblyPlugin)
.settings(commonSettings)
.dependsOn(mdf)

View File

@ -1,4 +1,4 @@
base_dir=$(abspath ..)
base_dir=$(abspath ../..)
sim_dir=$(abspath .)
PROJECT ?= example

View File

@ -1,4 +1,4 @@
base_dir=$(abspath ..)
base_dir=$(abspath ../..)
sim_dir=$(abspath .)
PROJECT ?= example