From eda0b113c1e7f9cd8c2aad49932fae72d019cfcc Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sun, 21 Apr 2019 14:41:02 -0700 Subject: [PATCH] more default subprojects | fix example builds --- src/main/scala/example/Top.scala | 4 ++-- variables.mk | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/scala/example/Top.scala b/src/main/scala/example/Top.scala index aa2f8d0d..6850580f 100644 --- a/src/main/scala/example/Top.scala +++ b/src/main/scala/example/Top.scala @@ -63,13 +63,13 @@ class RocketTopWithBlockDeviceModule(l: RocketTopWithBlockDevice) // BOOM Top Level Systems // ---------------------- -class BoomTop(implicit p: Parameters) extends boom.system.BoomSystem +class BoomTop(implicit p: Parameters) extends boom.system.ExampleBoomSystem with HasNoDebug with HasPeripherySerial { override lazy val module = new BoomTopModule(this) } -class BoomTopModule[+L <: BoomTop](l: L) extends boom.system.BoomSystemModule(l) +class BoomTopModule[+L <: BoomTop](l: L) extends boom.system.ExampleBoomSystemModule(l) with HasRTCModuleImp with HasNoDebugModuleImp with HasPeripherySerialModuleImp diff --git a/variables.mk b/variables.mk index 5aea54a5..7b2f6ba0 100644 --- a/variables.mk +++ b/variables.mk @@ -3,7 +3,7 @@ ######################################################################################### ######################################################################################### -# default variables to invoke the generator +# default variables to invoke the generator for a example Rocket system # descriptions: # PROJECT = the scala package to find the MODEL/Generator in # MODEL = the top level module of the project (normally the harness) @@ -17,17 +17,28 @@ # SUB_PROJECT = use the specific subproject default variables ######################################################################################### PROJECT ?= example -MODEL ?= TestHarness -CONFIG ?= DefaultExampleConfig +MODEL ?= RocketTestHarness +CONFIG ?= DefaultRocketConfig CFG_PROJECT ?= $(PROJECT) SBT_PROJECT ?= $(PROJECT) TB ?= TestDriver -TOP ?= ExampleTop +TOP ?= RocketTop +# make it so that you only change 1 param to change most or all of them! SUB_PROJECT ?= example -ifeq ($(SUB_PROJECT),boom) # make it so that you only change 1 param to change them all! - SBT_PROJECT=boom +ifeq ($(SUB_PROJECT),boomexample) + # for a BOOM based system (provides all necessary params) + MODEL=BoomTestHarness + CONFIG=DefaultBoomConfig + TOP=BoomTop +endif +ifeq ($(SUB_PROJECT),boom) + # for BOOM developers (only need to provide a CONFIG) PROJECT=boom.system + MODEL=TestHarness + #CONFIG: User specified + CFG_PROJECT=boom.system + SBT_PROJECT=boom TOP=ExampleBoomSystem endif