8000 chipConfig fails to elaborate: None.get in AccumulatorMem · Issue #421 · ucb-bar/gemmini · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link rel="modulepreload" href="https://github.githubassets.com/assets/6q-76297c4792d32543.js" crossorigin="anonymous" />

chipConfig fails to elaborate: None.get in AccumulatorMem #421

Open

Description

@youzi27

Hi there,

GemminiConfigs.chipConfig doesn't elaborate on current master (8c3f992). I used a copy of GemminiRocketConfig with new gemmini.DefaultGemminiConfig(GemminiConfigs.chipConfig):

Caused by: java.util.NoSuchElementException: None.get
	at scala.None$.get(Option.scala:627)
	at scala.None$.get(Option.scala:626)
	at gemmini.AccumulatorMem.$anonfun$new$49(AccumulatorMem.scala:223)
	at gemmini.AccumulatorMem.$anonfun$new$49$adapted(AccumulatorMem.scala:204)
	at scala.collection.immutable.Range.foreach(Range.scala:192)
	at gemmini.AccumulatorMem.<init>(AccumulatorMem.scala:204)
	at gemmini.Scratchpad$Impl.$anonfun$acc_mems$4(Scratchpad.scala:688)

chipConfig sets acc_singleported = true but not use_shared_ext_mem, so io.ext_mem is None. The single-ported path without external memory still drives it, though (these lines came in with dffcfd1):

        val mem = SyncReadMem(n / acc_sub_banks, Vec(mask_len, mask_elem))
        io.ext_mem.get(i).read_req.bits := 0.U((mask_len * mask_elem.getWidth).W)
        io.ext_mem.get(i).read_req.valid := false.B

largeChipConfig copies chipConfig, so it should hit the same thing.

Wrapping the two lines in io.ext_mem.foreach fixes it for me: chipConfig builds, and aligned and mvin_mvout pass on it. I'll open a small PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0