Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

how to add MMIO peripherals to U500 design #158

Open
shirlynan opened this issue Jun 16, 2020 · 1 comment
Open

how to add MMIO peripherals to U500 design #158

shirlynan opened this issue Jun 16, 2020 · 1 comment

Comments

@shirlynan
Copy link

Hi everyone,
I'm struggling with adding a custom MMIO peripheral to Freedom U500 design. I'm using a gcd example from the chipyard branch, however, I cant see my custom peripheral in the generated verilog files or memory map. So I think I missed something. What I have done is describe the GCD module under the rocket-chip folder and then instantiate it with the following code in Configs.scala in rocket-chip/src/main/scala/subsystem folder.
class WithGCD(useAXI4: Boolean, useBlackBox: Boolean) extends Config((site, here, up) => {
case GCDKey => Some(GCDParams(useAXI4 = useAXI4, useBlackBox = useBlackBox))
})
and add this config with the code
new WithGCD(useAXI4=false, useBlackBox=true) ++
to the BaseConfig of rocket-chip.
I'm not sure if I did the instantiation in a wrong way... It would be great if someone could give me a clue to solve this problem. Unfortunately, I cant find an tutorial for this purpose.

Thanks for your help.

@JohnsonZ-microe
Copy link

Your need to connect your MMIO ports to the top module, or it will be removed by FIRRTL' s optimization. I m struggling with this problem too, I have solved the problem you just met but unfortunately get stuck with the problem of Pins definition.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants