Skip to content

Commit

Permalink
Revert "separate generator behavior into phases (#2274)"
Browse files Browse the repository at this point in the history
This reverts commit 9d99750.
  • Loading branch information
debs-sifive committed Mar 10, 2020
1 parent e1fcc1d commit eadc4ec
Show file tree
Hide file tree
Showing 23 changed files with 273 additions and 606 deletions.
9 changes: 2 additions & 7 deletions Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ endif
MODEL ?= TestHarness
PROJECT ?= freechips.rocketchip.system
CFG_PROJECT ?= $(PROJECT)
CONFIG ?= $(CFG_PROJECT).DefaultConfig
CONFIG ?= DefaultConfig
# TODO: For now must match rocketchip.Generator
comma := ,
space := $() $()
splitConfigs := $(subst $(comma), ,$(CONFIG))
configBases := $(foreach config,$(splitConfigs),$(lastword $(subst ., ,$(config))))
CONFIG_STR := $(subst $(space),_,$(configBases))
long_name = $(PROJECT).$(CONFIG_STR)
long_name = $(PROJECT).$(CONFIG)

VLSI_MEM_GEN ?= $(base_dir)/scripts/vlsi_mem_gen

Expand Down
4 changes: 2 additions & 2 deletions emulator/Makefrag-verilator
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ verilog = \

$(generated_dir)/%.fir $(generated_dir)/%.d: $(FIRRTL_JAR) $(chisel_srcs) $(bootrom_img)
mkdir -p $(dir $@)
cd $(base_dir) && $(SBT) "runMain $(PROJECT).Generator -td $(generated_dir) -T $(PROJECT).$(MODEL) -C $(CONFIG)"
cd $(base_dir) && $(SBT) "runMain $(PROJECT).Generator $(generated_dir) $(PROJECT) $(MODEL) $(CFG_PROJECT) $(CONFIG)"

%.v %.conf: %.fir $(FIRRTL_JAR)
mkdir -p $(dir $@)
Expand Down Expand Up @@ -69,7 +69,7 @@ VERILATOR_FLAGS := --top-module $(MODEL) \
--threads $(VERILATOR_THREADS) -Wno-UNOPTTHREADS \
-Wno-STMTDLY --x-assign unique \
-I$(vsrc) \
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -DTEST_HARNESS=V$(MODEL) -include $(csrc)/verilator.h -include $(generated_dir)/$(long_name).plusArgs"
-O3 -CFLAGS "$(CXXFLAGS) -DVERILATOR -DTEST_HARNESS=V$(MODEL) -include $(csrc)/verilator.h -include $(generated_dir)/$(PROJECT).$(CONFIG).plusArgs"
cppfiles = $(addprefix $(csrc)/, $(addsuffix .cc, $(CXXSRCS)))
headers = $(wildcard $(csrc)/*.h)

Expand Down
40 changes: 20 additions & 20 deletions regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,36 @@ endif

ifeq ($(SUITE),RocketSuiteA)
PROJECT=freechips.rocketchip.system
CONFIGS=$(PROJECT).DefaultConfig
CONFIGS=DefaultConfig
endif

ifeq ($(SUITE),RocketSuiteB)
PROJECT=freechips.rocketchip.system
CONFIGS=$(PROJECT).DefaultBufferlessConfig
CONFIGS=DefaultBufferlessConfig
endif

ifeq ($(SUITE),RocketSuiteC)
PROJECT=freechips.rocketchip.system
CONFIGS=$(PROJECT).TinyConfig
CONFIGS=TinyConfig
endif

ifeq ($(SUITE),UnittestSuite)
PROJECT=freechips.rocketchip.unittest
CONFIGS=$(PROJECT).AMBAUnitTestConfig $(PROJECT).TLSimpleUnitTestConfig $(PROJECT).TLWidthUnitTestConfig
CONFIGS=AMBAUnitTestConfig TLSimpleUnitTestConfig TLWidthUnitTestConfig
endif

ifeq ($(SUITE), JtagDtmSuite)
PROJECT=freechips.rocketchip.system

export JTAG_DTM_ENABLE_SBA ?= off
ifeq ($(JTAG_DTM_ENABLE_SBA), off)
CONFIGS_32=$(PROJECT).WithJtagDTMSystem,$(PROJECT).DefaultRV32Config
CONFIGS_64=$(PROJECT).WithJtagDTMSystem,$(PROJECT).DefaultConfig
CONFIGS_32=WithJtagDTMSystem_DefaultRV32Config
CONFIGS_64=WithJtagDTMSystem_DefaultConfig
endif

ifeq ($(JTAG_DTM_ENABLE_SBA), on)
CONFIGS_32=$(PROJECT).WithJtagDTMSystem,$(PROJECT).WithDebugSBASystem,$(PROJECT).DefaultRV32Config
CONFIGS_64=$(PROJECT).WithJtagDTMSystem,$(PROJECT).WithDebugSBASystem,$(PROJECT).DefaultConfig
CONFIGS_32=WithJtagDTMSystem_WithDebugSBASystem_DefaultRV32Config
CONFIGS_64=WithJtagDTMSystem_WithDebugSBASystem_DefaultConfig
endif

CONFIGS += $(CONFIGS_32)
Expand All @@ -89,18 +89,18 @@ endif
ifeq ($(SUITE), Miscellaneous)
PROJECT=freechips.rocketchip.system
CONFIGS=\
$(PROJECT).DefaultSmallConfig \
$(PROJECT).DualBankConfig \
$(PROJECT).DualChannelConfig \
$(PROJECT).DualChannelDualBankConfig \
$(PROJECT).RoccExampleConfig \
$(PROJECT).Edge128BitConfig \
$(PROJECT).Edge32BitConfig \
$(PROJECT).QuadChannelBenchmarkConfig \
$(PROJECT).EightChannelConfig \
$(PROJECT).DualCoreConfig \
$(PROJECT).MemPortOnlyConfig \
$(PROJECT).MMIOPortOnlyConfig
DefaultSmallConfig \
DualBankConfig \
DualChannelConfig \
DualChannelDualBankConfig \
RoccExampleConfig \
Edge128BitConfig \
Edge32BitConfig \
QuadChannelBenchmarkConfig \
EightChannelConfig \
DualCoreConfig \
MemPortOnlyConfig \
MMIOPortOnlyConfig
endif

# These are the named regression targets. While it's expected you run them in
Expand Down
10 changes: 7 additions & 3 deletions src/main/scala/groundtest/Generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package freechips.rocketchip.groundtest

import firrtl.options.StageMain
import freechips.rocketchip.system.RocketChipStage
import freechips.rocketchip.util.GeneratorApp

object Generator extends StageMain(new RocketChipStage)
object Generator extends GeneratorApp {
generateFirrtl
generateAnno
generateTestSuiteMakefrags // TODO: Needed only for legacy make targets
generateArtefacts
}
52 changes: 0 additions & 52 deletions src/main/scala/stage/RocketChipAnnotations.scala

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/scala/stage/RocketChipCli.scala

This file was deleted.

41 changes: 0 additions & 41 deletions src/main/scala/stage/RocketChipOptions.scala

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/scala/stage/package.scala

This file was deleted.

Loading

0 comments on commit eadc4ec

Please sign in to comment.