get icenet and testchipip unit tests working

This commit is contained in:
Howard Mao
2020-04-22 19:58:24 -07:00
parent e22ff880e2
commit b813caf6fd
6 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
package chipyard.unittest
import chisel3._
import freechips.rocketchip.config.Parameters
class TestHarness(implicit val p: Parameters) extends Module {
val io = IO(new Bundle { val success = Output(Bool()) })
io.success := Module(new UnitTestSuite).io.finished
}

View File

@@ -0,0 +1,8 @@
package chipyard.unittest
import freechips.rocketchip.config.Parameters
import freechips.rocketchip.util.{ElaborationArtefacts, PlusArgArtefacts}
class UnitTestSuite(implicit p: Parameters) extends freechips.rocketchip.unittest.UnitTestSuite {
ElaborationArtefacts.add("plusArgs", PlusArgArtefacts.serialize_cHeader)
}

View File

@@ -56,7 +56,7 @@ VCS_CC_OPTS = \
VCS_NONCC_OPTS = \
+lint=all,noVCDE,noONGS,noUI \
-error=PCWM-L \
-timescale=1ns/10ps \
-timescale=1ns/1ps \
-quiet \
-q \
+rad \

View File

@@ -50,6 +50,30 @@ ifeq ($(SUB_PROJECT),hwacha)
TB ?= TestDriver
TOP ?= ExampleRocketSystem
endif
# For TestChipIP developers
ifeq ($(SUB_PROJECT),testchipip)
SBT_PROJECT ?= chipyard
MODEL ?= TestHarness
VLOG_MODEL ?= TestHarness
MODEL_PACKAGE ?= chipyard.unittest
CONFIG ?= TestChipUnitTestConfig
CONFIG_PACKAGE ?= testchipip
GENERATOR_PACKAGE ?= chipyard
TB ?= TestDriver
TOP ?= UnitTestSuite
endif
# For IceNet developers
ifeq ($(SUB_PROJECT),icenet)
SBT_PROJECT ?= chipyard
MODEL ?= TestHarness
VLOG_MODEL ?= TestHarness
MODEL_PACKAGE ?= chipyard.unittest
CONFIG ?= IceNetUnitTestConfig
CONFIG_PACKAGE ?= icenet
GENERATOR_PACKAGE ?= chipyard
TB ?= TestDriver
TOP ?= UnitTestSuite
endif
#########################################################################################
# path to rocket-chip and testchipip