Skip to content

Commit

Permalink
conditional labels
Browse files Browse the repository at this point in the history
  • Loading branch information
aferr committed Aug 24, 2017
1 parent 04b6462 commit c390a74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chiselFrontend/src/main/scala/chisel3/core/Label.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ object HLevel {
}
}

case class IfL(id: HasId)(tc: LabelComp)(fc: LabelComp) extends LabelComp {
def name = s"IFL(${id.getRef.name})(${tc.name})(${fc.name})"
def fullName(ctx: Component) =
s"IFL(${id.getRef.fullName(ctx)})(${tc.fullName(ctx)})(${fc.fullName(ctx)})"
}

case class VLabel(id: HasId) extends LabelComp {
def name = s"[[${id.getRef.name}]]V"
def fullName(ctx: Component) = s"[[${id.getRef.fullName(ctx)}]]V"
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ package object chisel3 { // scalastyle:ignore package.object.name
val VLabel = chisel3.core.VLabel
val JoinLabelComp = chisel3.core.JoinLabelComp
val MeetLabelComp = chisel3.core.MeetLabelComp
val IfL = chisel3.core.IfL
val Declassify = chisel3.core.Declassify
val Endorse = chisel3.core.Endorse
val Next = chisel3.core.Next
Expand Down

0 comments on commit c390a74

Please sign in to comment.