Combine Coreplex and System Module Hierarchies (#875)
* coreplex collapse: peripherals now in coreplex * coreplex: better factoring of TLBusWrapper attachement points * diplomacy: allow monitorless :*= and :=* * rocket: don't connect monitors to tile tim slave ports * rename chip package to system * coreplex: only sbus has a splitter * TLFragmenter: Continuing my spot battles on requires without explanatory strings * pbus: toFixedWidthSingleBeatSlave * tilelink: more verbose requires * use the new system package for regression * sbus: add more explicit FIFO attachment points * delete leftover top-level utils * cleanup ResetVector and RTC
This commit is contained in:
84
src/main/scala/system/Configs.scala
Normal file
84
src/main/scala/system/Configs.scala
Normal file
@ -0,0 +1,84 @@
|
||||
// See LICENSE.SiFive for license details.
|
||||
// See LICENSE.Berkeley for license details.
|
||||
|
||||
package freechips.rocketchip.system
|
||||
|
||||
import Chisel._
|
||||
import freechips.rocketchip.config.Config
|
||||
import freechips.rocketchip.coreplex._
|
||||
import freechips.rocketchip.devices.debug._
|
||||
import freechips.rocketchip.devices.tilelink._
|
||||
import freechips.rocketchip.diplomacy._
|
||||
|
||||
class BaseConfig extends Config(new BaseCoreplexConfig().alter((site,here,up) => {
|
||||
// DTS descriptive parameters
|
||||
case DTSModel => "freechips,rocketchip-unknown"
|
||||
case DTSCompat => Nil
|
||||
case DTSTimebase => BigInt(1000000) // 1 MHz
|
||||
case RTCPeriod => Some(1000) // Implies coreplex clock is DTSTimebase * RTCPeriod = 1 GHz
|
||||
// External port parameters
|
||||
case IncludeJtagDTM => false
|
||||
case JtagDTMKey => new JtagDTMKeyDefault()
|
||||
case NExtTopInterrupts => 2
|
||||
case ExtMem => MasterPortParams(
|
||||
base = 0x80000000L,
|
||||
size = 0x10000000L,
|
||||
beatBytes = site(MemoryBusParams).beatBytes,
|
||||
idBits = 4)
|
||||
case ExtBus => MasterPortParams(
|
||||
base = 0x60000000L,
|
||||
size = 0x20000000L,
|
||||
beatBytes = site(MemoryBusParams).beatBytes,
|
||||
idBits = 4)
|
||||
case ExtIn => SlavePortParams(beatBytes = 8, idBits = 8, sourceBits = 4)
|
||||
// Additional device Parameters
|
||||
case ErrorParams => ErrorParams(Seq(AddressSet(0x3000, 0xfff)))
|
||||
case BootROMParams => BootROMParams(contentFileName = "./bootrom/bootrom.img")
|
||||
}))
|
||||
|
||||
class DefaultConfig extends Config(new WithNBigCores(1) ++ new BaseConfig)
|
||||
|
||||
class DefaultBufferlessConfig extends Config(
|
||||
new WithBufferlessBroadcastHub ++ new WithNBigCores(1) ++ new BaseConfig)
|
||||
|
||||
class DefaultSmallConfig extends Config(new WithNSmallCores(1) ++ new BaseConfig)
|
||||
class DefaultRV32Config extends Config(new WithRV32 ++ new DefaultConfig)
|
||||
|
||||
class DualBankConfig extends Config(
|
||||
new WithNBanksPerMemChannel(2) ++ new BaseConfig)
|
||||
|
||||
class DualChannelConfig extends Config(new WithNMemoryChannels(2) ++ new BaseConfig)
|
||||
|
||||
class DualChannelDualBankConfig extends Config(
|
||||
new WithNMemoryChannels(2) ++
|
||||
new WithNBanksPerMemChannel(2) ++ new BaseConfig)
|
||||
|
||||
class RoccExampleConfig extends Config(new WithRoccExample ++ new DefaultConfig)
|
||||
|
||||
class Edge128BitConfig extends Config(
|
||||
new WithEdgeDataBits(128) ++ new BaseConfig)
|
||||
class Edge32BitConfig extends Config(
|
||||
new WithEdgeDataBits(32) ++ new BaseConfig)
|
||||
|
||||
class SingleChannelBenchmarkConfig extends Config(new DefaultConfig)
|
||||
class DualChannelBenchmarkConfig extends Config(new WithNMemoryChannels(2) ++ new SingleChannelBenchmarkConfig)
|
||||
class QuadChannelBenchmarkConfig extends Config(new WithNMemoryChannels(4) ++ new SingleChannelBenchmarkConfig)
|
||||
class OctoChannelBenchmarkConfig extends Config(new WithNMemoryChannels(8) ++ new SingleChannelBenchmarkConfig)
|
||||
|
||||
class EightChannelConfig extends Config(new WithNMemoryChannels(8) ++ new BaseConfig)
|
||||
|
||||
class DualCoreConfig extends Config(
|
||||
new WithNBigCores(2) ++ new BaseConfig)
|
||||
|
||||
class HeterogeneousDualCoreConfig extends Config(
|
||||
new WithNSmallCores(1) ++ new WithNBigCores(1) ++ new BaseConfig)
|
||||
|
||||
class TinyConfig extends Config(
|
||||
new WithNMemoryChannels(0) ++
|
||||
new WithStatelessBridge ++
|
||||
new WithNTinyCores(1) ++
|
||||
new BaseConfig)
|
||||
|
||||
class DefaultFPGAConfig extends Config(new BaseConfig)
|
||||
|
||||
class DefaultFPGASmallConfig extends Config(new WithNSmallCores(1) ++ new DefaultFPGAConfig)
|
26
src/main/scala/system/ExampleRocketSystem.scala
Normal file
26
src/main/scala/system/ExampleRocketSystem.scala
Normal file
@ -0,0 +1,26 @@
|
||||
// See LICENSE.SiFive for license details.
|
||||
|
||||
package freechips.rocketchip.system
|
||||
|
||||
import Chisel._
|
||||
import freechips.rocketchip.config.Parameters
|
||||
import freechips.rocketchip.coreplex._
|
||||
import freechips.rocketchip.devices.tilelink._
|
||||
|
||||
/** Example Top with periphery devices and ports, and a Rocket coreplex */
|
||||
class ExampleRocketSystem(implicit p: Parameters) extends RocketCoreplex
|
||||
with HasAsyncExtInterrupts
|
||||
with HasMasterAXI4MemPort
|
||||
with HasMasterAXI4MMIOPort
|
||||
with HasSlaveAXI4Port
|
||||
with HasPeripheryBootROM
|
||||
with HasPeripheryErrorSlave {
|
||||
override lazy val module = new ExampleRocketSystemModule(this)
|
||||
}
|
||||
|
||||
class ExampleRocketSystemModule[+L <: ExampleRocketSystem](_outer: L) extends RocketCoreplexModule(_outer)
|
||||
with HasRTCModuleImp
|
||||
with HasExtInterruptsModuleImp
|
||||
with HasMasterAXI4MemPortModuleImp
|
||||
with HasMasterAXI4MMIOPortModuleImp
|
||||
with HasSlaveAXI4PortModuleImp
|
92
src/main/scala/system/Generator.scala
Normal file
92
src/main/scala/system/Generator.scala
Normal file
@ -0,0 +1,92 @@
|
||||
// See LICENSE.SiFive for license details.
|
||||
|
||||
package freechips.rocketchip.system
|
||||
|
||||
import freechips.rocketchip.coreplex.RocketTilesKey
|
||||
import freechips.rocketchip.tile.XLen
|
||||
import freechips.rocketchip.util.GeneratorApp
|
||||
|
||||
import scala.collection.mutable.LinkedHashSet
|
||||
|
||||
/** A Generator for platforms containing Rocket Coreplexes */
|
||||
object Generator extends GeneratorApp {
|
||||
|
||||
val rv64RegrTestNames = LinkedHashSet(
|
||||
"rv64ud-v-fcvt",
|
||||
"rv64ud-p-fdiv",
|
||||
"rv64ud-v-fadd",
|
||||
"rv64uf-v-fadd",
|
||||
"rv64um-v-mul",
|
||||
"rv64mi-p-breakpoint",
|
||||
"rv64uc-v-rvc",
|
||||
"rv64ud-v-structural",
|
||||
"rv64si-p-wfi",
|
||||
"rv64um-v-divw",
|
||||
"rv64ua-v-lrsc",
|
||||
"rv64ui-v-fence_i",
|
||||
"rv64ud-v-fcvt_w",
|
||||
"rv64uf-v-fmin",
|
||||
"rv64ui-v-sb",
|
||||
"rv64ua-v-amomax_d",
|
||||
"rv64ud-v-move",
|
||||
"rv64ud-v-fclass",
|
||||
"rv64ua-v-amoand_d",
|
||||
"rv64ua-v-amoxor_d",
|
||||
"rv64si-p-sbreak",
|
||||
"rv64ud-v-fmadd",
|
||||
"rv64uf-v-ldst",
|
||||
"rv64um-v-mulh",
|
||||
"rv64si-p-dirty")
|
||||
|
||||
val rv32RegrTestNames = LinkedHashSet(
|
||||
"rv32mi-p-ma_addr",
|
||||
"rv32mi-p-csr",
|
||||
"rv32ui-p-sh",
|
||||
"rv32ui-p-lh",
|
||||
"rv32uc-p-rvc",
|
||||
"rv32mi-p-sbreak",
|
||||
"rv32ui-p-sll")
|
||||
|
||||
override def addTestSuites {
|
||||
import DefaultTestSuites._
|
||||
val xlen = params(XLen)
|
||||
// TODO: for now only generate tests for the first core in the first coreplex
|
||||
val tileParams = params(RocketTilesKey).head
|
||||
val coreParams = tileParams.core
|
||||
val vm = coreParams.useVM
|
||||
val env = if (vm) List("p","v") else List("p")
|
||||
coreParams.fpu foreach { case cfg =>
|
||||
if (xlen == 32) {
|
||||
TestGeneration.addSuites(env.map(rv32ufNoDiv))
|
||||
} else {
|
||||
TestGeneration.addSuite(rv32udBenchmarks)
|
||||
TestGeneration.addSuites(env.map(rv64ufNoDiv))
|
||||
TestGeneration.addSuites(env.map(rv64udNoDiv))
|
||||
if (cfg.divSqrt) {
|
||||
TestGeneration.addSuites(env.map(rv64uf))
|
||||
TestGeneration.addSuites(env.map(rv64ud))
|
||||
}
|
||||
}
|
||||
}
|
||||
if (coreParams.useAtomics) {
|
||||
if (tileParams.dcache.flatMap(_.scratch).isEmpty)
|
||||
TestGeneration.addSuites(env.map(if (xlen == 64) rv64ua else rv32ua))
|
||||
else
|
||||
TestGeneration.addSuites(env.map(if (xlen == 64) rv64uaSansLRSC else rv32uaSansLRSC))
|
||||
}
|
||||
if (coreParams.useCompressed) TestGeneration.addSuites(env.map(if (xlen == 64) rv64uc else rv32uc))
|
||||
val (rvi, rvu) =
|
||||
if (xlen == 64) ((if (vm) rv64i else rv64pi), rv64u)
|
||||
else ((if (vm) rv32i else rv32pi), rv32u)
|
||||
|
||||
TestGeneration.addSuites(rvi.map(_("p")))
|
||||
TestGeneration.addSuites((if (vm) List("v") else List()).flatMap(env => rvu.map(_(env))))
|
||||
TestGeneration.addSuite(benchmarks)
|
||||
TestGeneration.addSuite(new RegressionTestSuite(if (xlen == 64) rv64RegrTestNames else rv32RegrTestNames))
|
||||
}
|
||||
|
||||
val longName = names.topModuleProject + "." + names.configs
|
||||
generateFirrtl
|
||||
generateTestSuiteMakefrags
|
||||
generateArtefacts
|
||||
}
|
184
src/main/scala/system/RocketTestSuite.scala
Normal file
184
src/main/scala/system/RocketTestSuite.scala
Normal file
@ -0,0 +1,184 @@
|
||||
// See LICENSE.Berkeley for license details.
|
||||
// See LICENSE.SiFive for license details.
|
||||
|
||||
package freechips.rocketchip.system
|
||||
|
||||
import scala.collection.mutable.LinkedHashSet
|
||||
|
||||
abstract class RocketTestSuite {
|
||||
val dir: String
|
||||
val makeTargetName: String
|
||||
val names: LinkedHashSet[String]
|
||||
val envName: String
|
||||
def kind: String
|
||||
def postScript = s"""
|
||||
|
||||
$$(addprefix $$(output_dir)/, $$(addsuffix .hex, $$($makeTargetName))): $$(output_dir)/%.hex: $dir/%.hex
|
||||
\tmkdir -p $$(output_dir)
|
||||
\tln -fs $$< $$@
|
||||
|
||||
$$(addprefix $$(output_dir)/, $$($makeTargetName)): $$(output_dir)/%: $dir/%
|
||||
\tmkdir -p $$(output_dir)
|
||||
\tln -fs $$< $$@
|
||||
|
||||
run-$makeTargetName: $$(addprefix $$(output_dir)/, $$(addsuffix .out, $$($makeTargetName)))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$^ /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
|
||||
run-$makeTargetName-debug: $$(addprefix $$(output_dir)/, $$(addsuffix .vpd, $$($makeTargetName)))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.vpd,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
|
||||
run-$makeTargetName-fst: $$(addprefix $$(output_dir)/, $$(addsuffix .fst, $$($makeTargetName)))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.fst,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
"""
|
||||
}
|
||||
|
||||
class AssemblyTestSuite(prefix: String, val names: LinkedHashSet[String])(val envName: String) extends RocketTestSuite {
|
||||
val dir = "$(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa"
|
||||
val makeTargetName = prefix + "-" + envName + "-asm-tests"
|
||||
def kind = "asm"
|
||||
override def toString = s"$makeTargetName = \\\n" + names.map(n => s"\t$prefix-$envName-$n").mkString(" \\\n") + postScript
|
||||
}
|
||||
|
||||
class BenchmarkTestSuite(makePrefix: String, val dir: String, val names: LinkedHashSet[String]) extends RocketTestSuite {
|
||||
val envName = ""
|
||||
val makeTargetName = makePrefix + "-bmark-tests"
|
||||
def kind = "bmark"
|
||||
override def toString = s"$makeTargetName = \\\n" + names.map(n => s"\t$n.riscv").mkString(" \\\n") + postScript
|
||||
}
|
||||
|
||||
class RegressionTestSuite(val names: LinkedHashSet[String]) extends RocketTestSuite {
|
||||
val envName = ""
|
||||
val dir = "$(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa"
|
||||
val makeTargetName = "regression-tests"
|
||||
def kind = "regression"
|
||||
override def toString = s"$makeTargetName = \\\n" + names.mkString(" \\\n")
|
||||
}
|
||||
|
||||
object TestGeneration {
|
||||
private val suites = collection.mutable.ListMap[String, RocketTestSuite]()
|
||||
|
||||
def addSuite(s: RocketTestSuite) { suites += (s.makeTargetName -> s) }
|
||||
|
||||
def addSuites(s: Seq[RocketTestSuite]) { s.foreach(addSuite) }
|
||||
|
||||
def generateMakefrag: String = {
|
||||
def gen(kind: String, s: Seq[RocketTestSuite]) = {
|
||||
if(s.length > 0) {
|
||||
val envs = s.groupBy(_.envName)
|
||||
val targets = s.map(t => s"$$(${t.makeTargetName})").mkString(" ")
|
||||
s.map(_.toString).mkString("\n") +
|
||||
envs.filterKeys(_ != "").map( {
|
||||
case (env,envsuites) => {
|
||||
val suites = envsuites.map(t => s"$$(${t.makeTargetName})").mkString(" ")
|
||||
s"""
|
||||
run-$kind-$env-tests: $$(addprefix $$(output_dir)/, $$(addsuffix .out, $suites))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$^ /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-$env-tests-debug: $$(addprefix $$(output_dir)/, $$(addsuffix .vpd, $suites))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.vpd,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-$env-tests-fst: $$(addprefix $$(output_dir)/, $$(addsuffix .fst, $suites))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.fst,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-$env-tests-fast: $$(addprefix $$(output_dir)/, $$(addsuffix .run, $suites))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$^ /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
"""} } ).mkString("\n") + s"""
|
||||
run-$kind-tests: $$(addprefix $$(output_dir)/, $$(addsuffix .out, $targets))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$^ /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-tests-debug: $$(addprefix $$(output_dir)/, $$(addsuffix .vpd, $targets))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.vpd,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-tests-fst: $$(addprefix $$(output_dir)/, $$(addsuffix .fst, $targets))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$(patsubst %.fst,%.out,$$^) /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
run-$kind-tests-fast: $$(addprefix $$(output_dir)/, $$(addsuffix .run, $targets))
|
||||
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if( /\\*{3}(.{8})\\*{3}(.*)/ || /ASSERTION (FAILED)/i )' $$^ /dev/null | perl -ne 'if(/(.*)/){print "$$$$1\\n\\n"; exit(1) if eof()}'
|
||||
"""
|
||||
} else { "\n" }
|
||||
}
|
||||
|
||||
suites.values.toSeq.groupBy(_.kind).map { case (kind, s) => gen(kind, s) }.mkString("\n")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object DefaultTestSuites {
|
||||
val rv32uiNames = LinkedHashSet(
|
||||
"simple", "add", "addi", "and", "andi", "auipc", "beq", "bge", "bgeu", "blt", "bltu", "bne", "fence_i",
|
||||
"jal", "jalr", "lb", "lbu", "lh", "lhu", "lui", "lw", "or", "ori", "sb", "sh", "sw", "sll", "slli",
|
||||
"slt", "slti", "sra", "srai", "srl", "srli", "sub", "xor", "xori")
|
||||
val rv32ui = new AssemblyTestSuite("rv32ui", rv32uiNames)(_)
|
||||
|
||||
val rv32ucNames = LinkedHashSet("rvc")
|
||||
val rv32uc = new AssemblyTestSuite("rv32uc", rv32ucNames)(_)
|
||||
|
||||
val rv32umNames = LinkedHashSet("mul", "mulh", "mulhsu", "mulhu", "div", "divu", "rem", "remu")
|
||||
val rv32um = new AssemblyTestSuite("rv32um", rv32umNames)(_)
|
||||
|
||||
val rv32uaSansLRSCNames = LinkedHashSet("amoadd_w", "amoand_w", "amoor_w", "amoxor_w", "amoswap_w", "amomax_w", "amomaxu_w", "amomin_w", "amominu_w")
|
||||
val rv32uaSansLRSC = new AssemblyTestSuite("rv32ua", rv32uaSansLRSCNames)(_)
|
||||
|
||||
val rv32uaNames = rv32uaSansLRSCNames + "lrsc"
|
||||
val rv32ua = new AssemblyTestSuite("rv32ua", rv32uaNames)(_)
|
||||
|
||||
val rv32siNames = LinkedHashSet("csr", "ma_fetch", "scall", "sbreak", "wfi", "dirty")
|
||||
val rv32si = new AssemblyTestSuite("rv32si", rv32siNames)(_)
|
||||
|
||||
val rv32miNames = LinkedHashSet("csr", "mcsr", "illegal", "ma_addr", "ma_fetch", "sbreak", "scall")
|
||||
val rv32mi = new AssemblyTestSuite("rv32mi", rv32miNames)(_)
|
||||
|
||||
val rv32u = List(rv32ui, rv32um)
|
||||
val rv32i = List(rv32ui, rv32si, rv32mi)
|
||||
val rv32pi = List(rv32ui, rv32mi)
|
||||
|
||||
val rv64uiNames = LinkedHashSet("addw", "addiw", "ld", "lwu", "sd", "slliw", "sllw", "sltiu", "sltu", "sraiw", "sraw", "srliw", "srlw", "subw")
|
||||
val rv64ui = new AssemblyTestSuite("rv64ui", rv32uiNames ++ rv64uiNames)(_)
|
||||
|
||||
val rv64umNames = LinkedHashSet("divuw", "divw", "mulw", "remuw", "remw")
|
||||
val rv64um = new AssemblyTestSuite("rv64um", rv32umNames ++ rv64umNames)(_)
|
||||
|
||||
val rv64uaSansLRSCNames = rv32uaSansLRSCNames.map(_.replaceAll("_w","_d"))
|
||||
val rv64uaSansLRSC = new AssemblyTestSuite("rv64ua", rv32uaSansLRSCNames ++ rv64uaSansLRSCNames)(_)
|
||||
|
||||
val rv64uaNames = rv64uaSansLRSCNames + "lrsc"
|
||||
val rv64ua = new AssemblyTestSuite("rv64ua", rv32uaNames ++ rv64uaNames)(_)
|
||||
|
||||
val rv64ucNames = rv32ucNames
|
||||
val rv64uc = new AssemblyTestSuite("rv64uc", rv64ucNames)(_)
|
||||
|
||||
val rv64ufNames = LinkedHashSet("ldst", "move", "fcmp", "fcvt", "fcvt_w", "fclass", "fadd", "fdiv", "fmin", "fmadd")
|
||||
val rv64uf = new AssemblyTestSuite("rv64uf", rv64ufNames)(_)
|
||||
val rv64ufNoDiv = new AssemblyTestSuite("rv64uf", rv64ufNames - "fdiv")(_)
|
||||
|
||||
val rv32ufNoDiv = new AssemblyTestSuite("rv32uf", rv64ufNames - "fdiv")(_)
|
||||
|
||||
val rv64udNames = rv64ufNames + "structural"
|
||||
val rv64ud = new AssemblyTestSuite("rv64ud", rv64udNames)(_)
|
||||
val rv64udNoDiv = new AssemblyTestSuite("rv64ud", rv64udNames - "fdiv")(_)
|
||||
|
||||
val rv64siNames = rv32siNames
|
||||
val rv64si = new AssemblyTestSuite("rv64si", rv64siNames)(_)
|
||||
|
||||
val rv64miNames = rv32miNames + "breakpoint"
|
||||
val rv64mi = new AssemblyTestSuite("rv64mi", rv64miNames)(_)
|
||||
|
||||
val groundtestNames = LinkedHashSet("simple")
|
||||
val groundtest64 = new AssemblyTestSuite("rv64ui", groundtestNames)(_)
|
||||
val groundtest32 = new AssemblyTestSuite("rv32ui", groundtestNames)(_)
|
||||
|
||||
val rv64u = List(rv64ui, rv64um)
|
||||
val rv64i = List(rv64ui, rv64si, rv64mi)
|
||||
val rv64pi = List(rv64ui, rv64mi)
|
||||
|
||||
val benchmarks = new BenchmarkTestSuite("rvi", "$(RISCV)/riscv64-unknown-elf/share/riscv-tests/benchmarks", LinkedHashSet(
|
||||
"median", "multiply", "qsort", "towers", "vvadd", "dhrystone", "mt-matmul"))
|
||||
|
||||
val rv32udBenchmarks = new BenchmarkTestSuite("rvd", "$(RISCV)/riscv64-unknown-elf/share/riscv-tests/benchmarks", LinkedHashSet(
|
||||
"mm", "spmv", "mt-vvadd"))
|
||||
|
||||
val emptyBmarks = new BenchmarkTestSuite("empty",
|
||||
"$(RISCV)/riscv64-unknown-elf/share/riscv-tests/benchmarks", LinkedHashSet.empty)
|
||||
|
||||
val singleRegression = new RegressionTestSuite(LinkedHashSet("rv64ui-p-simple"))
|
||||
|
||||
val mtBmarks = new BenchmarkTestSuite("mt", "$(RISCV)/riscv64-unknown-elf/share/riscv-tests/mt",
|
||||
LinkedHashSet(((0 to 4).map("vvadd"+_) ++
|
||||
List("ad","ae","af","ag","ai","ak","al","am","an","ap","aq","ar","at","av","ay","az",
|
||||
"bb","bc","bf","bh","bj","bk","bm","bo","br","bs","ce","cf","cg","ci","ck","cl",
|
||||
"cm","cs","cv","cy","dc","df","dm","do","dr","ds","du","dv").map(_+"_matmul")): _*))
|
||||
}
|
22
src/main/scala/system/TestHarness.scala
Normal file
22
src/main/scala/system/TestHarness.scala
Normal file
@ -0,0 +1,22 @@
|
||||
// See LICENSE.SiFive for license details.
|
||||
|
||||
package freechips.rocketchip.system
|
||||
|
||||
import Chisel._
|
||||
import freechips.rocketchip.config.Parameters
|
||||
import freechips.rocketchip.diplomacy.LazyModule
|
||||
|
||||
class TestHarness()(implicit p: Parameters) extends Module {
|
||||
val io = new Bundle {
|
||||
val success = Bool(OUTPUT)
|
||||
}
|
||||
|
||||
val dut = Module(LazyModule(new ExampleRocketSystem).module)
|
||||
dut.reset := reset | dut.debug.ndreset
|
||||
|
||||
dut.tieOffInterrupts()
|
||||
dut.connectSimAXIMem()
|
||||
dut.connectSimAXIMMIO()
|
||||
dut.tieOffAXI4SlavePort()
|
||||
dut.connectDebug(clock, reset, io.success)
|
||||
}
|
Reference in New Issue
Block a user