1
0

tilelink2 Node: make it possible for {Identity,Output,Input}Node to pass a Vec

In order to implement a pass-through RAM Monitor model, we will want to support
a variable number of inputs and outputs with BOTH different manager and client
parameters on each bundle.
This commit is contained in:
Wesley W. Terpstra
2016-09-08 21:11:31 -07:00
parent 176f385b1d
commit b587a409a3
3 changed files with 48 additions and 36 deletions

View File

@ -1,6 +1,7 @@
package uncore
import Chisel._
import chisel3.internal.sourceinfo.{SourceInfo, SourceLine, UnlocatableSourceInfo}
package object tilelink2
{
@ -9,4 +10,9 @@ package object tilelink2
def OH1ToUInt(x: UInt) = OHToUInt((x << 1 | UInt(1)) ^ x)
def UIntToOH1(x: UInt, width: Int) = ~(SInt(-1, width=width).asUInt << x)(width-1, 0)
def trailingZeros(x: Int) = if (x > 0) Some(log2Ceil(x & -x)) else None
def sourceLine(sourceInfo: SourceInfo, prefix: String = " (", suffix: String = ")") = sourceInfo match {
case SourceLine(filename, line, col) => s"$prefix$filename:$line:$col$suffix"
case _ => ""
}
}