support rocketchip longname from generator | extra comments | subprojects specify configs

This commit is contained in:
abejgonzalez
2019-04-23 18:34:42 -07:00
parent e0d1ba285d
commit 017a3c2350

View File

@@ -26,15 +26,21 @@ SBT_PROJECT ?= $(PROJECT)
TB ?= TestDriver TB ?= TestDriver
TOP ?= RocketTop TOP ?= RocketTop
# make it so that you only change 1 param to change most or all of them! #########################################################################################
# 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 SUB_PROJECT ?= example
# for a BOOM based system (provides all necessary params)
# for a BOOM based example system
ifeq ($(SUB_PROJECT),boomexample) ifeq ($(SUB_PROJECT),boomexample)
MODEL=BoomTestHarness MODEL=BoomTestHarness
CONFIG=DefaultBoomConfig
TOP=BoomTop TOP=BoomTop
endif endif
# for BOOM developers (only need to provide a CONFIG) # for BOOM developers
ifeq ($(SUB_PROJECT),boom) ifeq ($(SUB_PROJECT),boom)
PROJECT=boom.system PROJECT=boom.system
MODEL=TestHarness MODEL=TestHarness
@@ -46,12 +52,11 @@ endif
ifeq ($(SUB_PROJECT),rocketchip) ifeq ($(SUB_PROJECT),rocketchip)
PROJECT=freechips.rocketchip.system PROJECT=freechips.rocketchip.system
MODEL=TestHarness MODEL=TestHarness
CONFIG=DefaultConfig
CFG_PROJECT=freechips.rocketchip.system CFG_PROJECT=freechips.rocketchip.system
SBT_PROJECT=rebarrocketchip SBT_PROJECT=rebarrocketchip
TOP=ExampleRocketSystem TOP=ExampleRocketSystem
endif endif
# for Hwacha developers (only need to provide a CONFIG) # for Hwacha developers
ifeq ($(SUB_PROJECT),hwacha) ifeq ($(SUB_PROJECT),hwacha)
PROJECT=freechips.rocketchip.system PROJECT=freechips.rocketchip.system
MODEL=TestHarness MODEL=TestHarness
@@ -59,7 +64,6 @@ ifeq ($(SUB_PROJECT),hwacha)
SBT_PROJECT=hwacha SBT_PROJECT=hwacha
TOP=ExampleRocketSystem TOP=ExampleRocketSystem
TB=TestDriver TB=TestDriver
CONFIG=HwachaConfig
endif endif
######################################################################################### #########################################################################################
@@ -75,8 +79,8 @@ REBAR_FIRRTL_DIR = $(base_dir)/tools/firrtl
long_name = $(PROJECT).$(MODEL).$(CONFIG) long_name = $(PROJECT).$(MODEL).$(CONFIG)
# if building from rocketchip, override the long_name to match what they expect # if building from rocketchip, override the long_name to match what they expect
ifeq ($(SBT_PROJECT),rebarrocketchip) ifeq ($(PROJECT),freechips.rocketchip.system)
long_name=$(PROJECT).$(CONFIG) long_name=$(CFG_PROJECT).$(CONFIG)
endif endif
FIRRTL_FILE ?= $(build_dir)/$(long_name).fir FIRRTL_FILE ?= $(build_dir)/$(long_name).fir