1
0

tilelink2: move general-purpose code out of tilelink2 package

This commit is contained in:
Wesley W. Terpstra
2016-10-03 15:17:36 -07:00
parent c85e42a303
commit f05298d9bc
42 changed files with 527 additions and 476 deletions

View File

@ -0,0 +1,10 @@
import Chisel._
import chisel3.internal.sourceinfo.{SourceInfo, SourceLine, UnlocatableSourceInfo}
package object diplomacy
{
def sourceLine(sourceInfo: SourceInfo, prefix: String = " (", suffix: String = ")") = sourceInfo match {
case SourceLine(filename, line, col) => s"$prefix$filename:$line:$col$suffix"
case _ => ""
}
}