When creating a new "Config" we define a function that takes three "View"s (site, here, up) as arguments. What is the meaning of these three Views?
What do the (site, here, up) arguments mean when creating rocket-chip configurations?
515 Views Asked by Ben Reynwar At
2
There are 2 best solutions below
3
On
class Blah extends Config ((site, here, up)) {..}
is the parameter tuple, which allows partial function application. This allows partial configuration of the Rocket core and setting default parameters, preserving elasticity and type correctness.
You may check its implementation here
As purely a historical reference, take a look at the Chisel2 Advanced Parameterization Manual (with the huge caveat to not take this too literally as it's old). However, I believe that the motivation and discussion of
site,here, andupstill holds in sections 2.6, 2.7, 2.8, and 3.6.Roughly,
site,here, anduphelp with handling and resolving dependencies on other parameters.siteallows you to disambiguate different parameters that may have the same name, e.g.,Width, based on a defined location.hereallows parameters to query other parameters defined in the same group.upallows you to access a parent configuration's parameter object with the intended purpose being if you want to copy it while modifying parameters.