From 5f1fe4ed8fc545f59e32821ecb21cd42f477f2af Mon Sep 17 00:00:00 2001 From: SeahK Date: Mon, 14 Oct 2024 17:39:34 -0700 Subject: [PATCH] config for micro 2024 tutorial --- src/main/scala/gemmini/Configs.scala | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/scala/gemmini/Configs.scala b/src/main/scala/gemmini/Configs.scala index 4c83ff8e..f5112f0b 100644 --- a/src/main/scala/gemmini/Configs.scala +++ b/src/main/scala/gemmini/Configs.scala @@ -239,6 +239,16 @@ object GemminiConfigs { val leanPrintfConfig = defaultConfig.copy(dataflow=Dataflow.WS, max_in_flight_mem_reqs = 64, acc_read_full_width = false, ex_read_from_acc = false, ex_write_to_spad = false, hardcode_d_to_garbage_addr = true, use_firesim_simulation_counters=true) + val tutorialConfig = defaultConfig.copy(sp_capacity=CapacityInKilobytes(128), acc_capacity=CapacityInKilobytes(64), dataflow=Dataflow.WS, + acc_scale_args=Some(defaultConfig.acc_scale_args.get.copy(latency=4)), + max_in_flight_mem_reqs = 32, + mesh_output_delay = 2, + ex_read_from_acc=false, + ex_write_to_spad=false, + acc_read_full_width = false, + hardcode_d_to_garbage_addr = true, + mvin_scale_args = None + ) } /** @@ -285,6 +295,19 @@ class LeanGemminiPrintfConfig[T <: Data : Arithmetic, U <: Data, V <: Data]( ) }) +// for MICRO tutorial gemmini config +class TutorialGemminiConfig[T <: Data : Arithmetic, U <: Data, V <: Data]( + gemminiConfig: GemminiArrayConfig[T,U,V] = GemminiConfigs.tutorialConfig +) extends Config((site, here, up) => { + case BuildRoCC => up(BuildRoCC) ++ Seq( + (p: Parameters) => { + implicit val q = p + val gemmini = LazyModule(new Gemmini(gemminiConfig)) + gemmini + } + ) +}) + class DummyDefaultGemminiConfig[T <: Data : Arithmetic, U <: Data, V <: Data]( gemminiConfig: GemminiArrayConfig[T,U,V] = GemminiConfigs.dummyConfig ) extends Config((site, here, up) => {