Comments (22)
I had to create this snippet in chipyard.IOBinders and added it to AbstractConfig to be able to pull it out to the DigitalTop level. Hope this helps!
class WithExternalResetVectorPunchthrough extends OverrideIOBinder({
(system: HasTilesModuleImp) => {
val io_rst_vector_pins_temp = system.reset_vector.zipWithIndex.map { case (dio, i) => IO(dio.cloneType).suggestName(s"rv_$i") }
(io_rst_vector_pins_temp zip system.reset_vector).map { case (io, sysio) =>
sysio := io
}
(io_rst_vector_pins_temp, Nil)
}
})
from chipyard.
@csgxiong
Yes.
I have also faced the same problem with this. Because You cannot make the separate Punchthrough for both in IOBinder.
You have to add both the functionality of reset-vector and hart_ID in the same punchThrough otherwise it will override the one.
I have used this snippet
class WithExternalHartAndResetVectorPunchthrough extends OverrideIOBinder({
(system: HasTilesModuleImp) => {
val ports = system.tile_hartids.zipWithIndex.map { case (eio, i) => {
IO(eio.cloneType).suggestName(s"hart_id_$i")} }
(ports zip system.tile_hartids).map { case (io1, sysio1) =>{
sysio1 := io1
}
}
val io_rst_vector_pins_temp = system.reset_vector.zipWithIndex.map { case (dio, i) => {
IO(dio.cloneType).suggestName(s"reset_vector_$i")} }
(io_rst_vector_pins_temp zip system.reset_vector).map { case (io, sysio) => {
sysio := io
}
}
val mylist = io_rst_vector_pins_temp :++ ports
(mylist.toSeq, Nil)
}
})
But this will generating the port in DigitalTop nicely. But in Chiptop it is showing the wrong polarity.
If you know how to do it correctly then let me know.
from chipyard.
@Kevin99214
Thank you for your reply. I really appreciate it.
I had tried your ways, but it does not work. I am using chipyard V1.10 and the "make verilog CONFIG=RocketConfig" command to generate RTL .
Are there other steps need to be done after adding WithExternalResetVectorPunchthrough Config to AbstractConfig?
from chipyard.
Just to make sure but did you set this to true?
case SubsystemExternalResetVectorKey => true
from chipyard.
It is My mistake.
Now when I set SubsystemExternalResetVectorKey to be true, the generator shows an exception:
Diplomacy has detected a problem with your graph:
The following node node has 1 inward connections and no outward connections.At least one outward connection was required.
1 inward nodes bound:[once-system.bootROMResetVectorSourceNode]
0 outward nodes bound:[]
from chipyard.
When I deleted all the bootrom related configs (withbootrom/withbootaddrReg/withcustombootpin), and set SubsystemExternalResetVectorKey to be true, it finally worked.But it seems there are too mange changes.
Any ideas about it?
Thanks!
from chipyard.
As far as I know, the bootrom needs a reset vector register to program as part of its boot code. If you want an external reset vector, that removes the register the bootrom needs and caused the error. (anyone please correct me if I'm wrong)
For my use case, I rather boot from the address I set using the external reset vector over the bootrom so removing those bootrom configs make sense. But that'll may be different for you. It's up to you to decide if this is what you want.
from chipyard.
Setting the defaultBootAddress
of BootAddrRegParams
will make the bootrom jump to a different start address.
from chipyard.
@Kevin99214
Yes. What I want to do is exactly using the external reset vector to boot the cores.
Thank you for your reply.
from chipyard.
@jerryz123
Thank you, Jerry.
I will give it a try.
from chipyard.
@csgxiong
I also wanted to take out the reset vector out of the chiptop file. I have made the case class in BaseConfig.scala file and they try to invoke it from BaseConfig via AbstractConfig class. like
case object WithExternalResetVectorPort extends Config(
(site, here, up) => {
case SubsystemExternalResetVectorKey => true
}
)
I got the same error like
parents: broadcast/system/chiptop0
locator: (BundleBridge.scala:197:31)
1 inward nodes bound: [once-system.bootROMResetVectorSourceNode]
0 outward nodes bound: []
number of known := bindings to inward nodes: 1
number of known := bindings to outward nodes: 0
number of binding queries from inward nodes: 0
number of binding queries from outward nodes: 0
How did you solve this error ? I saw in comment section you solved this error.
from chipyard.
@ashutgupta28
Just like what I had mented before.
When I deleted all the bootrom related configs (withbootrom/withbootaddrReg/withcustombootpin), and set SubsystemExternalResetVectorKey to be true, it finally worked.
from chipyard.
@ashutgupta28
Ok, it seems to be a good way.
I will give it a try later.
from chipyard.
@csgxiong
Ok. can you tell me the exact changes you have done it for taken the external reset vector out. So that I can give a try. :-)
from chipyard.
@ashutgupta28
My steps are:
1.Delete "case BootROMLocated ***" at BaseSubsytemConfig
2.Delete "WithBootROM" + "WithCustomBootPin " + "WithBootAddrReg"+ "WithCustomBootPinPlusArg" at AbstractConfig
Then it will work!
from chipyard.
@csgxiong
I did the same steps as you mentioned and the RTL is generating but I want to ask you did any top level reset vector port was generating in Digital Top file in your case?
from chipyard.
@ashutgupta28
Yes.
After doing the steps, there was a reset_vector_0 port at my DigitalTop.
from chipyard.
@ashutgupta28
Nice!!
Well, I find there is a little difference between our work.
I was using the default RocketConfig.
It maybe the reasion before.
from chipyard.
@csgxiong
So what ever the RTL it is generating in Frontend.v file that worked in RocketConfig ? Right.. In your case
If that worked there then I assumed that it will also worked here also ..
from chipyard.
@csgxiong
I have successfully achieved the reset vector and HartID out of the digitalTop Module. And it is fine .
But in Chiptop module it is generating as the output and internally driving as zero.
Any idea how can I change the port as output to input in Chiptop.
from chipyard.
@ashutgupta28
@csgxiong I have successfully achieved the reset vector and HartID out of the digitalTop Module. And it is fine .
But in Chiptop module it is generating as the output and internally driving as zero. Any idea how can I change the port as output to input in Chiptop.
Hi!
When I try to pull hart_id out of the digitalTop Module, the reset vector will disapear.
How did you achieve this?
from chipyard.
@ashutgupta28
Thank you.
That's a good one.
I will give it a try. And if there is anything new, I will keep updating.
from chipyard.
Related Issues (20)
- How can I add another AXI MMIO port in rocket chip environment?
- Use statically linked CIRCT in Chipyard HOT 1
- make debug fails in verilator HOT 2
- 'Debugging with JTAG' section incomplete in docs HOT 2
- "Hammer Mentor Plugin" does not exist HOT 2
- How to print the cycle along with the instruction being executed at that cycle in RTL simulation.
- Boom Core in stable version is not working HOT 1
- How to Bring Core signals to DigitalTop
- `LOADMEM=` on non-LOADMEM-Capable Memory Models is Silently Ignored HOT 1
- Updating Doc for Memory Hiearchy page HOT 2
- Compiling issues with chipyard/tests/nvdla.c
- Chip bringup documentation?
- IBex on VCU118 is not working (Probably bootrom issue)
- SD Card interfaces times-out on the VCU118 (3 April 2024 commit)
- How can we integrate riscv-dv to test boom core? HOT 1
- Segfault running SimNetwork under verilator HOT 10
- Verilator simulation (RocketConfig default example) crashes on MacOS HOT 3
- Torture Test is failing after removing the Floating Point Unit HOT 2
- User field of TL Channels does not work (No connection for user fields in Xbar) HOT 2
- Bare Metal VCU118 capability (similar to Arty100T) and Update to VCU118 documentation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chipyard.