Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipack support #116

Merged
merged 87 commits into from Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from 83 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
950cd83
proposed multipack ir changes
ducky64 May 21, 2022
22bc2b4
wip parse tunnel exports + support HULL on floats
ducky64 May 27, 2022
38784c8
red test case, now to implement
ducky64 May 27, 2022
27cf39e
red in the right places this time
ducky64 May 27, 2022
e49f923
wow was that all it took?
ducky64 May 28, 2022
5e8897c
more unit tests for single export case
ducky64 May 28, 2022
8d01780
array values test - obv red
ducky64 May 28, 2022
13be727
... and that's array support!
ducky64 May 28, 2022
d220cd4
tunnel assign test & impl
ducky64 May 28, 2022
569a0c9
cleaning
ducky64 May 28, 2022
f019991
mypy is broken
ducky64 May 24, 2022
1bfd993
Update MultipackBlock.py
ducky64 May 28, 2022
8f77a5f
multipack frontend APIs
ducky64 May 28, 2022
858327e
wip apis
ducky64 May 28, 2022
8d2ebd0
api work
ducky64 May 28, 2022
fce304b
pieces of toplevel code
ducky64 May 29, 2022
42ed54d
use sinks instead
ducky64 May 29, 2022
7745474
progress
ducky64 May 29, 2022
7351488
add parameter to test case
ducky64 May 29, 2022
231baab
Update DesignTop.py
ducky64 May 29, 2022
903874f
pb test case
ducky64 May 29, 2022
87b697c
assert checks
ducky64 May 29, 2022
b1fb406
cleaning
ducky64 May 29, 2022
a715801
skeleton for packing
ducky64 May 29, 2022
1429bc3
including param forwarding too!
ducky64 May 29, 2022
a44d9fc
compiler changes
ducky64 May 30, 2022
51372f5
wip block array infra for packing
ducky64 May 30, 2022
bfd3dd5
typer green
ducky64 May 30, 2022
71893a4
Update MultipackBlock.py
ducky64 May 30, 2022
b161970
mockup api for packed array syntax
ducky64 May 30, 2022
bf378fa
Update MultipackBlock.py
ducky64 May 30, 2022
07a690e
typer (more) green
ducky64 May 30, 2022
d6c7b42
moving bugs elsewhere
ducky64 May 30, 2022
fd88ca7
continuing kicking the can down the road
ducky64 May 30, 2022
0a7e027
broom
ducky64 May 30, 2022
ed16f41
checks
ducky64 May 30, 2022
d72b097
add array creation type, vector test case
ducky64 May 30, 2022
65f0ef7
heh break all the things
ducky64 May 30, 2022
9348249
idk revert
ducky64 May 30, 2022
b11ef8a
cleaning
ducky64 May 30, 2022
151b58b
cleaning array case
ducky64 May 30, 2022
74af4ff
whackamole
ducky64 May 30, 2022
bc87469
this structure probably makes a bit more sense
ducky64 May 30, 2022
759e424
propagate through array shenanigans continued
ducky64 May 30, 2022
66c7a8d
Update DesignTop.py
ducky64 May 30, 2022
2537ef2
its if cases all the way through =(
ducky64 May 30, 2022
7b60b8d
tests going somewhere
ducky64 May 31, 2022
5e23bb1
todos, almost there but not tonight
ducky64 May 31, 2022
0919ba2
generate allocates
ducky64 May 31, 2022
92ead24
test GREEN
ducky64 May 31, 2022
92f532c
array support in compiler
ducky64 May 31, 2022
f6111ee
wip def broken
ducky64 May 31, 2022
4ae48a5
wip scuffed
ducky64 May 31, 2022
f94c632
Update AbstractResistorArray.py
ducky64 May 31, 2022
9fa62db
wip
ducky64 May 31, 2022
455be1f
typer green
ducky64 Jun 1, 2022
b806e16
Merge branch 'master' into multipack
ducky64 Jun 1, 2022
07f6f2c
slow progress?
ducky64 Jun 1, 2022
2324aec
core compiler fixes
ducky64 Jun 1, 2022
d44141d
a lot of ugliness for getting places
ducky64 Jun 1, 2022
76666cd
wip unpacking support
ducky64 Jun 1, 2022
cc2e284
wip tests for unpack
ducky64 Jun 1, 2022
d505889
end to end unpacking
ducky64 Jun 1, 2022
99f38e2
auto instance refinement for packing
ducky64 Jun 1, 2022
bc44202
consistent-ify errorrs
ducky64 Jun 1, 2022
1eb9167
support exported tunnel in netlister
ducky64 Jun 1, 2022
85283ba
gerbers for led matrix
ducky64 Jun 1, 2022
7ae7386
Update edg-compiler-precompiled.jar
ducky64 Jun 1, 2022
271cdf5
wip thinking about APIs to cleanup this mess
ducky64 Jun 2, 2022
d6f07e3
Update MultipackBlock.py
ducky64 Jun 2, 2022
38c2d9c
I don't like this but here's a checkpoint
ducky64 Jun 3, 2022
9244929
revert
ducky64 Jun 3, 2022
122e960
packed export / parameter API mockup
ducky64 Jun 3, 2022
637b5b7
well it typechecks now
ducky64 Jun 3, 2022
cde323c
implement packed export construct
ducky64 Jun 3, 2022
1036881
implement all the things, green again?
ducky64 Jun 3, 2022
9cc8f50
fix PackedParameter
ducky64 Jun 3, 2022
cb83f3b
wow, really?
ducky64 Jun 3, 2022
82825c1
propagate through resource names in bundles
ducky64 Jun 4, 2022
0bdd631
Update test_pinmappable.py
ducky64 Jun 4, 2022
df311a1
add a toto
ducky64 Jun 4, 2022
bbc29de
cleanup
ducky64 Jun 8, 2022
a9417da
PIO firmware + fix a bug
ducky64 Jun 10, 2022
c32f510
chairlieplexing + ignore .pio
ducky64 Jun 11, 2022
ee0c901
basic wifi charlieplexing firmware
ducky64 Jun 11, 2022
8865b93
slight code cleanup
ducky64 Jun 11, 2022
ba413cd
Create README.md
ducky64 Jun 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified compiler/edg-compiler-precompiled.jar
Binary file not shown.
14 changes: 14 additions & 0 deletions compiler/src/main/scala/edg/EdgirUtils.scala
Expand Up @@ -38,6 +38,13 @@ object EdgirUtils {
case (true, true) => throw new IllegalArgumentException("exterior and interior both matched")
case (false, false) => throw new IllegalArgumentException("neither interior nor exterior matched")
}
case expr.ValueExpr.Expr.ExportedTunnel(exported) =>
(fn.isDefinedAt(exported.getExteriorPort), fn.isDefinedAt(exported.getInternalBlockPort)) match {
case (true, false) => fn(exported.getExteriorPort)
case (false, true) => fn(exported.getInternalBlockPort)
case (true, true) => throw new IllegalArgumentException("exterior and interior both matched")
case (false, false) => throw new IllegalArgumentException("neither interior nor exterior matched")
}
case _ => throw new IllegalArgumentException
}

Expand All @@ -57,6 +64,13 @@ object EdgirUtils {
case (true, true) => throw new IllegalArgumentException("exterior and interior both matched")
case (false, false) => throw new IllegalArgumentException("neither interior nor exterior matched")
}
case expr.ValueExpr.Expr.ExportedTunnel(exported) =>
(fn.isDefinedAt(exported.getExteriorPort), fn.isDefinedAt(exported.getInternalBlockPort)) match {
case (true, false) => connection.update(_.exportedTunnel.exteriorPort := fn(exported.getExteriorPort))
case (false, true) => connection.update(_.exportedTunnel.internalBlockPort := fn(exported.getInternalBlockPort))
case (true, true) => throw new IllegalArgumentException("exterior and interior both matched")
case (false, false) => throw new IllegalArgumentException("neither interior nor exterior matched")
}
case _ => throw new IllegalArgumentException
}

Expand Down
9 changes: 9 additions & 0 deletions compiler/src/main/scala/edg/ElemBuilder.scala
Expand Up @@ -39,10 +39,19 @@ object ElemBuilder {
expr=expr.ValueExpr.Expr.ExportedArray(expr.ExportedExpr(
exteriorPort=Some(external), internalBlockPort=Some(ValueExpr.Ref(internal))))
)
def ExportedTunnel(external: ref.LocalPath, internal: ref.LocalPath): expr.ValueExpr = expr.ValueExpr(
expr=expr.ValueExpr.Expr.ExportedTunnel(expr.ExportedExpr(
exteriorPort=Some(ValueExpr.Ref(external)), internalBlockPort=Some(ValueExpr.Ref(internal))))
)

def Assign(dst: ref.LocalPath, assignExpr: expr.ValueExpr): expr.ValueExpr = expr.ValueExpr(
expr=expr.ValueExpr.Expr.Assign(expr.AssignExpr(
dst=Some(dst), src=Some(assignExpr)))
)
def AssignTunnel(dst: ref.LocalPath, assignExpr: expr.ValueExpr): expr.ValueExpr = expr.ValueExpr(
expr=expr.ValueExpr.Expr.AssignTunnel(expr.AssignExpr(
dst=Some(dst), src=Some(assignExpr)))
)
}

object Block {
Expand Down
36 changes: 35 additions & 1 deletion compiler/src/main/scala/edg/compiler/Compiler.scala
Expand Up @@ -190,11 +190,13 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
elaboratePending.setValue(ElaborateRecord.ParamValue(param), null)
}
}
private[edg] def getValue(path: IndirectDesignPath): Option[ExprValue] = constProp.getValue(path) // TODO clean up this API?
for ((path, value) <- refinements.instanceValues) { // seed const prop with path assertions
constProp.setForcedValue(path.asIndirect, value, "path refinement")
}

// Primarily used for unit tests, TODO clean up this API?
private[edg] def getValue(path: IndirectDesignPath): Option[ExprValue] = constProp.getValue(path)

private val assertions = mutable.Buffer[(DesignPath, String, expr.ValueExpr, SourceLocator)]() // containing block, name, expr

// Supplemental elaboration data structures
Expand Down Expand Up @@ -323,6 +325,10 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
constProp.addDirectedEquality(containerPath.asIndirect ++ portPostfix + IndirectStep.IsConnected,
containerPath.asIndirect ++ exported.getExteriorPort.getRef + IndirectStep.IsConnected,
containerPath, s"$containerPath.$constrName")
case Some((constrName, expr.ValueExpr.Expr.ExportedTunnel(exported))) => // same as exported case
constProp.addDirectedEquality(containerPath.asIndirect ++ portPostfix + IndirectStep.IsConnected,
containerPath.asIndirect ++ exported.getExteriorPort.getRef + IndirectStep.IsConnected,
containerPath, s"$containerPath.$constrName")
case None =>
recursiveSetNotConnected(containerPath ++ portPostfix, port)
case Some((_, _)) => throw new IllegalArgumentException
Expand Down Expand Up @@ -392,6 +398,12 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
blockPath.asIndirect ++ assign.dst.get,
blockPath, assign.src.get, constrName) // TODO add sourcelocators
true
case expr.ValueExpr.Expr.AssignTunnel(assign) =>
// same as normal assign case, but would not enforce locality of references
constProp.addAssignment(
blockPath.asIndirect ++ assign.dst.get,
blockPath, assign.src.get, constrName) // TODO add sourcelocators
true
case expr.ValueExpr.Expr.Binary(_) | expr.ValueExpr.Expr.BinarySet(_) |
expr.ValueExpr.Expr.Unary(_) | expr.ValueExpr.Expr.UnarySet(_) |
expr.ValueExpr.Expr.IfThenElse(_) => // raw ValueExprs interpreted as assertions
Expand Down Expand Up @@ -436,6 +448,16 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
true
case _ => false // anything with allocates is not processed
}
case expr.ValueExpr.Expr.ExportedTunnel(exported) => (exported.getExteriorPort, exported.getInternalBlockPort) match {
case (ValueExpr.Ref(extPort), ValueExpr.Ref(intPort)) =>
require(!isInLink)
elaboratePending.addNode(
ElaborateRecord.Connect(blockPath ++ extPort, blockPath ++ intPort),
Seq(ElaborateRecord.ConnectedLink(blockPath ++ extPort))
)
true
case _ => false // anything with allocates is not processed
}
case _ => false // not defined
}
}
Expand Down Expand Up @@ -706,6 +728,16 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
val resolveConnectedTask = ElaborateRecord.ResolveArrayIsConnected(path, portPostfix, singleConnects.map(_._2), arrayConnects.map(_._2), false)
elaboratePending.addNode(resolveConnectedTask, Seq(resolveAllocateTask))

case PortConnections.AllocatedTunnelExport(connects) =>
// similar to AllocateDConnect case, except only with single-element connects
val setAllocatedTask = ElaborateRecord.ResolveArrayAllocated(path, portPostfix, connects.map(_._2), Seq(), false)
elaboratePending.addNode(setAllocatedTask, Seq())
val resolveAllocateTask = ElaborateRecord.RewriteConnectAllocate(path, portPostfix, connects.map(_._2), Seq(), false)
elaboratePending.addNode(resolveAllocateTask,
Seq(ElaborateRecord.ElaboratePortArray(path ++ portPostfix)) :+ setAllocatedTask)
val resolveConnectedTask = ElaborateRecord.ResolveArrayIsConnected(path, portPostfix, connects.map(_._2), Seq(), false)
elaboratePending.addNode(resolveConnectedTask, Seq(resolveAllocateTask))

case PortConnections.NotConnected =>
constProp.setValue(path.asIndirect ++ portPostfix + IndirectStep.Allocated, ArrayValue(Seq()))
val resolveConnectedTask = ElaborateRecord.ResolveArrayIsConnected(path, portPostfix, Seq(), Seq(), false)
Expand All @@ -719,6 +751,8 @@ class Compiler(inputDesignPb: schema.Design, library: edg.wir.Library,
connectedConstraints.connectionsByBlockPort(portPostfix) match {
case PortConnections.SingleConnect(constrName, constr) =>
resolvePortConnectivity(path, portPostfix, Some(constrName, constr))
case PortConnections.TunnelExport(constrName, constr) =>
resolvePortConnectivity(path, portPostfix, Some(constrName, constr))
case PortConnections.NotConnected =>
resolvePortConnectivity(path, portPostfix, None)
case connects => throw new IllegalArgumentException(s"invalid connections to element $connects")
Expand Down
11 changes: 11 additions & 0 deletions compiler/src/main/scala/edg/compiler/DesignRefsValidate.scala
Expand Up @@ -31,6 +31,10 @@ object CollectExprRefs extends ValueExprMap[Seq[ref.LocalPath]] {
override def mapUnarySet(unarySet: expr.UnarySetExpr, vals: Seq[ref.LocalPath]): Seq[ref.LocalPath] = {
vals
}
override def mapArray(array: expr.ArrayExpr,
vals: Seq[Seq[ref.LocalPath]]): Seq[ref.LocalPath] = {
vals.flatten
}
override def mapStruct(struct: expr.StructExpr,
vals: Map[String, Seq[ref.LocalPath]]): Seq[ref.LocalPath] = {
vals.values.foldLeft(Seq[ref.LocalPath]()) { _ ++ _ }
Expand Down Expand Up @@ -66,9 +70,16 @@ object CollectExprRefs extends ValueExprMap[Seq[ref.LocalPath]] {
internalBlockPort: Seq[ref.LocalPath]): Seq[ref.LocalPath] = {
exteriorPort ++ internalBlockPort
}
override def mapExportedTunnel(exported: expr.ExportedExpr, exteriorPort: Seq[ref.LocalPath],
internalBlockPort: Seq[ref.LocalPath]): Seq[ref.LocalPath] = {
exteriorPort ++ internalBlockPort
}
override def mapAssign(assign: expr.AssignExpr, src: Seq[ref.LocalPath]): Seq[ref.LocalPath] = {
assign.dst.toSeq ++ src
}
override def mapAssignTunnel(assign: expr.AssignExpr, src: Seq[ref.LocalPath]): Seq[ref.LocalPath] = {
assign.dst.toSeq ++ src
}
override def mapRef(path: ref.LocalPath): Seq[ref.LocalPath] =
Seq(path)
}
Expand Down
6 changes: 6 additions & 0 deletions compiler/src/main/scala/edg/compiler/ExprEvaluate.scala
Expand Up @@ -302,6 +302,7 @@ object ExprEvaluate {
case ArrayValue.UnpackRange.RangeWithEmpty(valMins, valMaxs) => RangeValue(valMins.min, valMaxs.max)
case _ => RangeEmpty
}
case (Op.HULL, ArrayValue.ExtractFloat(vals)) => RangeValue(vals.min, vals.max)

case (Op.NEGATE, vals) => vals match {
case ArrayValue.ExtractRange(arrayElts) =>
Expand All @@ -325,6 +326,8 @@ object ExprEvaluate {
}
}

def evalArray(array: expr.ArrayExpr, vals: Seq[ExprValue]): ExprValue = ArrayValue(vals)

def evalStruct(struct: expr.StructExpr, vals: Map[String, ExprValue]): ExprValue = ???

def evalRange(range: expr.RangeExpr, minimum: ExprValue, maximum: ExprValue): ExprValue = (minimum, maximum) match {
Expand Down Expand Up @@ -367,6 +370,9 @@ class ExprEvaluate(refs: ConstProp, root: DesignPath) extends ValueExprMap[ExprV
override def mapUnarySet(unarySet: expr.UnarySetExpr, vals: ExprValue): ExprValue =
ExprEvaluate.evalUnarySet(unarySet, vals)

override def mapArray(array: expr.ArrayExpr, vals: Seq[ExprValue]): ExprValue =
ExprEvaluate.evalArray(array, vals)

override def mapStruct(struct: expr.StructExpr, vals: Map[String, ExprValue]): ExprValue =
ExprEvaluate.evalStruct(struct, vals)

Expand Down
10 changes: 10 additions & 0 deletions compiler/src/main/scala/edg/compiler/ExprEvaluatePartial.scala
Expand Up @@ -46,6 +46,16 @@ class ExprEvaluatePartial(refs: ConstProp, root: DesignPath) extends ValueExprMa
case ExprResult.Result(vals) => ExprResult.Result(ExprEvaluate.evalUnarySet(unarySet, vals))
}

override def mapArray(array: expr.ArrayExpr, vals: Seq[ExprResult]): ExprResult = {
val missing = vals collect {
case ExprResult.Missing(missing) => missing
}
missing match {
case Seq() => ExprResult.Result(ExprEvaluate.evalArray(array, vals.map(_.asInstanceOf[ExprResult.Result].value)))
case missing => ExprResult.Missing(missing.flatten.toSet)
}
}

override def mapStruct(struct: expr.StructExpr, vals: Map[String, ExprResult]): ExprResult =
???

Expand Down
11 changes: 11 additions & 0 deletions compiler/src/main/scala/edg/compiler/ExprToString.scala
Expand Up @@ -149,6 +149,10 @@ class ExprToString() extends ValueExprMap[String] {
case op => s"unknown[$op](${vals})"
}

override def mapArray(array: expr.ArrayExpr, vals: Seq[String]): String = {
s"array(${vals.mkString(", ")})"
}

override def mapStruct(struct: expr.StructExpr, vals: Map[String, String]): String = {
val valsStr = vals.map { case (k, v) => s"$k: $v" }
s"struct(${valsStr.mkString(", ")})"
Expand Down Expand Up @@ -181,9 +185,16 @@ class ExprToString() extends ValueExprMap[String] {
s"exported($exteriorPort, $internalBlockPort)"
}

override def mapExportedTunnel(exported: expr.ExportedExpr, exteriorPort: String, internalBlockPort: String): String = {
s"exportedTunnel($exteriorPort, $internalBlockPort)"
}

override def mapAssign(assign: expr.AssignExpr, src: String): String =
s"${mapRef(assign.getDst)} ⇐ $src"

override def mapAssignTunnel(assign: expr.AssignExpr, src: String): String =
s"${mapRef(assign.getDst)} ⇐() $src"

override def mapRef(path: ref.LocalPath): String = {
path.steps.map { _.step match {
case ref.LocalStep.Step.Name(name) => name
Expand Down
18 changes: 18 additions & 0 deletions compiler/src/main/scala/edg/compiler/ValueExprMap.scala
Expand Up @@ -18,6 +18,7 @@ trait ValueExprMap[OutputType] {
case expr.ValueExpr.Expr.BinarySet(valueExpr) => wrapBinarySet(valueExpr)
case expr.ValueExpr.Expr.Unary(valueExpr) => wrapUnary(valueExpr)
case expr.ValueExpr.Expr.UnarySet(valueExpr) => wrapUnarySet(valueExpr)
case expr.ValueExpr.Expr.Array(valueExpr) => wrapArray(valueExpr)
case expr.ValueExpr.Expr.Struct(valueExpr) => wrapStruct(valueExpr)
case expr.ValueExpr.Expr.Range(valueExpr) => wrapRange(valueExpr)
case expr.ValueExpr.Expr.IfThenElse(valueExpr) => wrapIfThenElse(valueExpr)
Expand All @@ -27,7 +28,9 @@ trait ValueExprMap[OutputType] {
case expr.ValueExpr.Expr.Exported(valueExpr) => wrapExported(valueExpr)
case expr.ValueExpr.Expr.ConnectedArray(valueExpr) => wrapConnectedArray(valueExpr)
case expr.ValueExpr.Expr.ExportedArray(valueExpr) => wrapExportedArray(valueExpr)
case expr.ValueExpr.Expr.ExportedTunnel(valueExpr) => wrapExportedTunnel(valueExpr)
case expr.ValueExpr.Expr.Assign(valueExpr) => wrapAssign(valueExpr)
case expr.ValueExpr.Expr.AssignTunnel(valueExpr) => wrapAssignTunnel(valueExpr)
case expr.ValueExpr.Expr.Ref(valueExpr) => mapRef(valueExpr)
case _ => throw new NotImplementedError(s"Unknown valueExpr $valueExpr")
}
Expand All @@ -45,6 +48,8 @@ trait ValueExprMap[OutputType] {
throw new NotImplementedError(s"Undefined mapUnary for $unary")
def mapUnarySet(unarySet: expr.UnarySetExpr, vals: OutputType): OutputType =
throw new NotImplementedError(s"Undefined mapBinarySet for $unarySet")
def mapArray(array: expr.ArrayExpr, vals: Seq[OutputType]): OutputType =
throw new NotImplementedError(s"Undefined mapArray for $array")
def mapStruct(struct: expr.StructExpr, vals: Map[String, OutputType]): OutputType =
throw new NotImplementedError(s"Undefined mapStruct for $struct")
def mapRange(range: expr.RangeExpr, minimum: OutputType, maximum: OutputType): OutputType =
Expand All @@ -63,8 +68,12 @@ trait ValueExprMap[OutputType] {
throw new NotImplementedError(s"Undefined mapConnectedArray for $connected")
def mapExportedArray(exported: expr.ExportedExpr, exteriorPort: OutputType, internalBlockPort: OutputType): OutputType =
throw new NotImplementedError(s"Undefined mapExportedArray for $exported")
def mapExportedTunnel(exported: expr.ExportedExpr, exteriorPort: OutputType, internalBlockPort: OutputType): OutputType =
throw new NotImplementedError(s"Undefined mapExportedTunnel for $exported")
def mapAssign(assign: expr.AssignExpr, src: OutputType): OutputType =
throw new NotImplementedError(s"Undefined mapAssign for $assign")
def mapAssignTunnel(assign: expr.AssignExpr, src: OutputType): OutputType =
throw new NotImplementedError(s"Undefined mapAssignTunnel for $assign")
def mapRef(path: ref.LocalPath): OutputType =
throw new NotImplementedError(s"Undefined mapRef for $path")

Expand All @@ -81,6 +90,9 @@ trait ValueExprMap[OutputType] {
def wrapUnarySet(unarySet: expr.UnarySetExpr): OutputType = {
mapUnarySet(unarySet, map(unarySet.vals.get))
}
def wrapArray(array: expr.ArrayExpr): OutputType = {
mapArray(array, array.vals.map(value => map(value)))
}
def wrapStruct(struct: expr.StructExpr): OutputType = {
mapStruct(struct, struct.vals.view.mapValues(value => map(value)).toMap)
}
Expand Down Expand Up @@ -108,7 +120,13 @@ trait ValueExprMap[OutputType] {
def wrapExportedArray(exported: expr.ExportedExpr): OutputType = {
mapExportedArray(exported, map(exported.exteriorPort.get), map(exported.internalBlockPort.get))
}
def wrapExportedTunnel(exported: expr.ExportedExpr): OutputType = {
mapExportedTunnel(exported, map(exported.exteriorPort.get), map(exported.internalBlockPort.get))
}
def wrapAssign(assign: expr.AssignExpr): OutputType = {
mapAssign(assign, map(assign.src.get))
}
def wrapAssignTunnel(assign: expr.AssignExpr): OutputType = {
mapAssign(assign, map(assign.src.get))
}
}