Allow default configs for sub projects | have separate build_dir based on long_name
This commit is contained in:
parent
b88937b8a0
commit
2e53de6f22
81
variables.mk
81
variables.mk
|
@ -3,7 +3,7 @@
|
|||
#########################################################################################
|
||||
|
||||
#########################################################################################
|
||||
# default variables to invoke the generator for a example Rocket system
|
||||
# variables to invoke the generator
|
||||
# descriptions:
|
||||
# SBT_PROJECT = the SBT project that you should find the classes/packages in
|
||||
# MODEL = the top level module of the project in Chisel (normally the harness)
|
||||
|
@ -18,56 +18,73 @@
|
|||
# project specific:
|
||||
# SUB_PROJECT = use the specific subproject default variables
|
||||
#########################################################################################
|
||||
SBT_PROJECT ?= example
|
||||
MODEL ?= RocketTestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= $(SBT_PROJECT)
|
||||
CONFIG ?= DefaultRocketConfig
|
||||
CONFIG_PACKAGE ?= $(SBT_PROJECT)
|
||||
GENERATOR_PACKAGE ?= $(SBT_PROJECT)
|
||||
TB ?= TestDriver
|
||||
TOP ?= RocketTop
|
||||
|
||||
#########################################################################################
|
||||
# subproject overrides
|
||||
# description:
|
||||
# - make it so that you only change 1 param to change most or all of them!
|
||||
# - mainly intended for quick developer setup for common flags
|
||||
# - for each you only need to specify a CONFIG
|
||||
#########################################################################################
|
||||
SUB_PROJECT ?= example
|
||||
|
||||
ifeq ($(SUB_PROJECT),example)
|
||||
SBT_PROJECT ?= example
|
||||
MODEL ?= RocketTestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= $(SBT_PROJECT)
|
||||
CONFIG ?= DefaultRocketConfig
|
||||
CONFIG_PACKAGE ?= $(SBT_PROJECT)
|
||||
GENERATOR_PACKAGE ?= $(SBT_PROJECT)
|
||||
TB ?= TestDriver
|
||||
TOP ?= RocketTop
|
||||
endif
|
||||
# for a BOOM based example system
|
||||
ifeq ($(SUB_PROJECT),boomexample)
|
||||
MODEL=BoomTestHarness
|
||||
TOP=BoomTop
|
||||
SBT_PROJECT ?= example
|
||||
MODEL ?= BoomTestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= $(SBT_PROJECT)
|
||||
CONFIG ?= DefaultBoomConfig
|
||||
CONFIG_PACKAGE ?= $(SBT_PROJECT)
|
||||
GENERATOR_PACKAGE ?= $(SBT_PROJECT)
|
||||
TB ?= TestDriver
|
||||
TOP ?= BoomTop
|
||||
endif
|
||||
# for BOOM developers
|
||||
ifeq ($(SUB_PROJECT),boom)
|
||||
SBT_PROJECT=boom
|
||||
MODEL_PACKAGE=boom.system
|
||||
MODEL=TestHarness
|
||||
CONFIG_PACKAGE=boom.system
|
||||
GENERATOR_PACKAGE=boom.system
|
||||
TOP=ExampleBoomSystem
|
||||
SBT_PROJECT ?= boom
|
||||
MODEL ?= TestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= boom.system
|
||||
CONFIG ?= BoomConfig
|
||||
CONFIG_PACKAGE ?= boom.system
|
||||
GENERATOR_PACKAGE ?= boom.system
|
||||
TB ?= TestDriver
|
||||
TOP ?= ExampleBoomSystem
|
||||
endif
|
||||
# for Rocket-chip developers
|
||||
ifeq ($(SUB_PROJECT),rocketchip)
|
||||
SBT_PROJECT=rebarrocketchip
|
||||
MODEL_PACKAGE=freechips.rocketchip.system
|
||||
MODEL=TestHarness
|
||||
CONFIG_PACKAGE=freechips.rocketchip.system
|
||||
GENERATOR_PACKAGE=freechips.rocketchip.system
|
||||
TOP=ExampleRocketSystem
|
||||
SBT_PROJECT ?= rebarrocketchip
|
||||
MODEL ?= TestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= freechips.rocketchip.system
|
||||
CONFIG ?= DefaultConfig
|
||||
CONFIG_PACKAGE ?= freechips.rocketchip.system
|
||||
GENERATOR_PACKAGE ?= freechips.rocketchip.system
|
||||
TB ?= TestDriver
|
||||
TOP ?= ExampleRocketSystem
|
||||
endif
|
||||
# for Hwacha developers
|
||||
ifeq ($(SUB_PROJECT),hwacha)
|
||||
SBT_PROJECT=hwacha
|
||||
MODEL_PACKAGE=freechips.rocketchip.system
|
||||
MODEL=TestHarness
|
||||
CONFIG_PACKAGE=hwacha
|
||||
GENERATOR_PACKAGE=hwacha
|
||||
TOP=ExampleRocketSystem
|
||||
SBT_PROJECT ?= hwacha
|
||||
MODEL ?= TestHarness
|
||||
VLOG_MODEL ?= TestHarness
|
||||
MODEL_PACKAGE ?= freechips.rocketchip.system
|
||||
CONFIG ?= HwachaConfig
|
||||
CONFIG_PACKAGE ?= hwacha
|
||||
GENERATOR_PACKAGE ?= hwacha
|
||||
TB ?= TestDriver
|
||||
TOP ?= ExampleRocketSystem
|
||||
endif
|
||||
|
||||
#########################################################################################
|
||||
|
@ -121,7 +138,7 @@ output_dir=$(sim_dir)/output
|
|||
#########################################################################################
|
||||
# build output directory for compilation
|
||||
#########################################################################################
|
||||
build_dir=$(sim_dir)/generated-src
|
||||
build_dir=$(sim_dir)/generated-src/$(long_name)
|
||||
|
||||
#########################################################################################
|
||||
# vsrcs needed to run projects
|
||||
|
|
Loading…
Reference in New Issue