Skip to content

Commit

Permalink
config for micro 2024 tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
SeahK committed Oct 15, 2024
1 parent 25809f7 commit 5f1fe4e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/scala/gemmini/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

/**
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 5f1fe4e

Please sign in to comment.