Support serializable endpoints; Golden Gate stage
This commit is contained in:
@@ -23,6 +23,7 @@ lazy val commonSettings = Seq(
|
|||||||
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
|
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
|
||||||
unmanagedBase := (chipyardRoot / unmanagedBase).value,
|
unmanagedBase := (chipyardRoot / unmanagedBase).value,
|
||||||
allDependencies := allDependencies.value.filterNot(_.organization == "edu.berkeley.cs"),
|
allDependencies := allDependencies.value.filterNot(_.organization == "edu.berkeley.cs"),
|
||||||
|
exportJars := true,
|
||||||
resolvers ++= Seq(
|
resolvers ++= Seq(
|
||||||
Resolver.sonatypeRepo("snapshots"),
|
Resolver.sonatypeRepo("snapshots"),
|
||||||
Resolver.sonatypeRepo("releases"),
|
Resolver.sonatypeRepo("releases"),
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import testchipip.{HasPeripherySerialModuleImp, HasPeripheryBlockDeviceModuleImp
|
|||||||
import icenet.HasPeripheryIceNICModuleImpValidOnly
|
import icenet.HasPeripheryIceNICModuleImpValidOnly
|
||||||
|
|
||||||
import junctions.{NastiKey, NastiParameters}
|
import junctions.{NastiKey, NastiParameters}
|
||||||
import midas.widgets.{IsEndpoint}
|
import midas.models.{FASEDEndpoint, AXI4EdgeSummary, CompleteConfig}
|
||||||
import midas.models.{FASEDEndpoint, FasedAXI4Edge}
|
|
||||||
import firesim.endpoints._
|
import firesim.endpoints._
|
||||||
import firesim.configs.MemModelKey
|
import firesim.configs.MemModelKey
|
||||||
import firesim.util.RegisterEndpointBinder
|
import firesim.util.RegisterEndpointBinder
|
||||||
@@ -55,11 +54,8 @@ class WithFASEDEndpoint extends RegisterEndpointBinder({
|
|||||||
val nastiKey = NastiParameters(axi4Bundle.r.bits.data.getWidth,
|
val nastiKey = NastiParameters(axi4Bundle.r.bits.data.getWidth,
|
||||||
axi4Bundle.ar.bits.addr.getWidth,
|
axi4Bundle.ar.bits.addr.getWidth,
|
||||||
axi4Bundle.ar.bits.id.getWidth)
|
axi4Bundle.ar.bits.id.getWidth)
|
||||||
val fasedP = p.alterPartial({
|
FASEDEndpoint(axi4Bundle, t.reset.toBool,
|
||||||
case NastiKey => nastiKey
|
CompleteConfig(p(firesim.configs.MemModelKey), nastiKey, Some(AXI4EdgeSummary(edge))))
|
||||||
case FasedAXI4Edge => Some(edge)
|
|
||||||
})
|
|
||||||
FASEDEndpoint(axi4Bundle, t.reset.toBool, p(MemModelKey)(fasedP))(fasedP)
|
|
||||||
})
|
})
|
||||||
}).toSeq
|
}).toSeq
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
package firesim.firesim
|
package firesim.firesim
|
||||||
|
|
||||||
import java.io.{File}
|
import java.io.{File, FileWriter}
|
||||||
|
|
||||||
import chisel3.experimental.RawModule
|
import chisel3.experimental.RawModule
|
||||||
import chisel3.internal.firrtl.{Circuit, Port}
|
import chisel3.internal.firrtl.{Circuit, Port}
|
||||||
@@ -48,13 +48,14 @@ trait IsFireSimGeneratorLike extends HasFireSimGeneratorUtilities with HasTestSu
|
|||||||
}
|
}
|
||||||
|
|
||||||
object FireSimGenerator extends App with IsFireSimGeneratorLike {
|
object FireSimGenerator extends App with IsFireSimGeneratorLike {
|
||||||
|
val longName = names.topModuleProject + "." + names.topModuleClass + "." + names.configs
|
||||||
lazy val generatorArgs = GeneratorArgs(args)
|
lazy val generatorArgs = GeneratorArgs(args)
|
||||||
lazy val genDir = new File(names.targetDir)
|
lazy val genDir = new File(names.targetDir)
|
||||||
elaborateAndCompileWithMidas
|
// The only reason this is not generateFirrtl; generateAnno is that we need to use a different
|
||||||
|
// JsonProtocol to properly write out the annotations. Fix once the generated are unified
|
||||||
|
elaborate
|
||||||
generateTestSuiteMakefrags
|
generateTestSuiteMakefrags
|
||||||
generateHostVerilogHeader
|
|
||||||
generateArtefacts
|
generateArtefacts
|
||||||
generateTclEnvFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For now, provide a separate generator app when not specifically building for FireSim
|
// For now, provide a separate generator app when not specifically building for FireSim
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ abstract class FireSimTestSuite(
|
|||||||
import scala.concurrent.duration._
|
import scala.concurrent.duration._
|
||||||
import ExecutionContext.Implicits.global
|
import ExecutionContext.Implicits.global
|
||||||
|
|
||||||
|
val longName = names.topModuleProject + "." + names.topModuleClass + "." + names.configs
|
||||||
|
|
||||||
lazy val generatorArgs = GeneratorArgs(
|
lazy val generatorArgs = GeneratorArgs(
|
||||||
midasFlowKind = "midas",
|
midasFlowKind = "midas",
|
||||||
targetDir = "generated-src",
|
targetDir = "generated-src",
|
||||||
@@ -42,7 +44,6 @@ abstract class FireSimTestSuite(
|
|||||||
val commonMakeArgs = Seq(s"DESIGN=${generatorArgs.topModuleClass}",
|
val commonMakeArgs = Seq(s"DESIGN=${generatorArgs.topModuleClass}",
|
||||||
s"TARGET_CONFIG=${generatorArgs.targetConfigs}",
|
s"TARGET_CONFIG=${generatorArgs.targetConfigs}",
|
||||||
s"PLATFORM_CONFIG=${generatorArgs.platformConfigs}")
|
s"PLATFORM_CONFIG=${generatorArgs.platformConfigs}")
|
||||||
override lazy val platform = hostParams(midas.Platform)
|
|
||||||
|
|
||||||
def invokeMlSimulator(backend: String, name: String, debug: Boolean, additionalArgs: Seq[String] = Nil) = {
|
def invokeMlSimulator(backend: String, name: String, debug: Boolean, additionalArgs: Seq[String] = Nil) = {
|
||||||
make((Seq(s"${outDir.getAbsolutePath}/${name}.%s".format(if (debug) "vpd" else "out"),
|
make((Seq(s"${outDir.getAbsolutePath}/${name}.%s".format(if (debug) "vpd" else "out"),
|
||||||
@@ -122,7 +123,7 @@ abstract class FireSimTestSuite(
|
|||||||
|
|
||||||
clean
|
clean
|
||||||
mkdirs
|
mkdirs
|
||||||
elaborateAndCompileWithMidas
|
elaborate
|
||||||
generateTestSuiteMakefrags
|
generateTestSuiteMakefrags
|
||||||
runTest("verilator", "rv64ui-p-simple", false, Seq(s"""EXTRA_SIM_ARGS=+trace-test-output0"""))
|
runTest("verilator", "rv64ui-p-simple", false, Seq(s"""EXTRA_SIM_ARGS=+trace-test-output0"""))
|
||||||
diffTracelog("rv64ui-p-simple.out")
|
diffTracelog("rv64ui-p-simple.out")
|
||||||
|
|||||||
Submodule sims/firesim updated: 4c1a3aa212...a94bea1d16
Submodule vlsi/hammer updated: 1b07b9a378...a27886fb42
Reference in New Issue
Block a user