chipsalliance / chipsalliance/rocket-chip
what does the edgeAritySelect method return?
- Dominant language
- Scala
- Stars
- 3.9k
- Forks
- 1.3k
- Avg merge
- 5d 13m
- Merged PRs (30d)
- 1
Description
https://github.com/chipsalliance/rocket-chip/blob/46c88b71056581a6bf2a0c4febd5ec3d768c6c59/src/main/scala/diplomacy/Nodes.scala#L1014
Inside the Node.scala of diplomacy framework, there is method `edgeAritySelect` in the MinxedNode class:
```
protected[diplomacy] def edgeAritySelect(n: BaseNode, l: => Int, r: => Int): Int = {
val dir = edgeArityDirection(n)
if (dir < 0) l else if (dir > 0) r else 1
}
```
There are few infomation about this, I found this commit https://github.com/chipsalliance/rocket-chip/commit/dd84546ef4504b413ac711c957bd234de2e55b44 could be relevent, I have following confusion:
- what does the l and r parameter imply? left and righ? left of what???
- what does this fuction return?
Contributor guide
Research direction
Start with src/main/scala/diplomacy/Nodes.scala at line 1014 and read the linked commit for context around edgeAritySelect. Trace edgeArityDirection and its callers to determine what l and r represent and what each return path means. Done means documenting the parameters and return behavior clearly, with any relevant references to the surrounding diplomacy code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- embedded-iot, tooling
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100