Skip to content

Commit

Permalink
chisel-side for vectorized labels
Browse files Browse the repository at this point in the history
  • Loading branch information
aferr committed Aug 17, 2017
1 parent c2aa5ed commit 285fbd0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ generated/
.idea
target/
*.iml
*.swp
Binary file not shown.
3 changes: 2 additions & 1 deletion chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ sealed class Vec[T <: Data] private (gen: => T, val length: Int)
}

override def _onModuleClose: Unit = {
sample_element.setRef(this, 0)
sample_element.setRefBinder(this)
}
}

Expand Down Expand Up @@ -584,6 +584,7 @@ trait BitsLevelNamer {
case ax: Index => argIsTemp(ax.imm) || strTmp(ax.name)
case ax: Node => !ax.id.refSet || strTmp(ax.name)
case ax: LitArg => false
case ax: BindIndex => argIsTemp(ax.imm)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ private[chisel3] trait HasId extends InstanceId {
private[chisel3] def setRef(parent: HasId, name: String): Unit = setRef(Slot(Node(parent), name))
private[chisel3] def setRef(parent: HasId, index: Int): Unit = setRef(Index(Node(parent), ILit(index)))
private[chisel3] def setRef(parent: HasId, index: UInt): Unit = setRef(Index(Node(parent), index.ref))
private[chisel3] def setRefBinder(parent: HasId): Unit = setRef(BindIndex(Node(parent)))
// private[chisel3] def setRef(parent: HasId, names: Seq[String]): Unit = {
// var newRef = Node(parent)
// for(name <- names) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ case class Index(imm: Arg, value: Arg) extends Arg {
override def fullName(ctx: Component): String = s"${imm.fullName(ctx)}[${value.fullName(ctx)}]"
def pprint = s"Index(${imm.name}, ${value.name})"
}
case class BindIndex(imm: Arg) extends Arg {
def name: String = s"[_]"
override def fullName(ctx: Component): String = s"${imm.fullName(ctx)}[_]"
def pprint = s"Index(${imm.name}, _)"
}

sealed trait Bound
sealed trait NumericBound[T] extends Bound {
Expand Down
Binary file removed src/main/scala/chisel3/util/.Decoupled.scala.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/util/Arbiter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ArbiterIO[T <: Data](gen: T, out_gen: T, n: Int, inl: Label, outl: Label)

/** Arbiter Control determining which producer has access
*/
private object ArbiterCtrl {
object ArbiterCtrl {
def apply(request: Seq[Bool]): Seq[Bool] = request.length match {
case 0 => Seq()
case 1 => Seq(true.B)
Expand Down

0 comments on commit 285fbd0

Please sign in to comment.