Skip to content

Commit

Permalink
microkit: handle unconnected ports
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbelt committed Jan 7, 2025
1 parent dd4efd0 commit 1d5f100
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ object NixGen {

for (p <- ports.filter(p => CommonUtil.isDataPort(p.feature))) {
val originatingType: AadlType = p._portType match {
case BitType(_, _, _, _, Some(o)) => o
case BitType(_, _, _, Some(o)) => o
case _ => halt(s"Unexpected: Could not find originating type for ${p._portType} used by ${p.parentName}.${p.path}")
}
if (!seenTypes.contains(originatingType)) {
Expand Down Expand Up @@ -203,7 +203,7 @@ object NixGen {
val entry: ST = {
if (types.rawConnections) {
val originatingTypeNames: TypeNameProvider = p._portType match {
case BitType(_, _, _, _, Some(o)) => o.nameProvider
case BitType(_, _, _, Some(o)) => o.nameProvider
case _ => halt(s"Unexpected: Could not find originating type for ${p._portType}")
}

Expand Down Expand Up @@ -662,7 +662,7 @@ object NixGen {
val decl: ST =
if (types.rawConnections) {
val originatingTypeNames: TypeNameProvider = p._portType match {
case BitType(_, _, _, _, Some(o)) => o.nameProvider
case BitType(_, _, _, Some(o)) => o.nameProvider
case _ => halt(s"Unexpected: Could not find originating type for ${p._portType}")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ import org.sireum.hamr.codegen.common.resolvers.GclResolver._

return ta

case TODOType(ISZ("art", "Empty"), _, _, _) =>
case TODOType(ISZ("art", "Empty"), _, _) =>
val adtAst: AST.Stmt.Adt =
AST.Stmt.Adt(
isRoot = F,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import org.sireum.hamr.ir
@datatype class EnumType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z],

val values: ISZ[String]) extends AadlType

@datatype class ArrayType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z],

val dimensions: ISZ[Z],
Expand All @@ -47,7 +47,7 @@ import org.sireum.hamr.ir
@datatype class RecordType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z],

val fields: Map[String, AadlType]
Expand All @@ -56,7 +56,7 @@ import org.sireum.hamr.ir
@datatype class BaseType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z],

val slangType: SlangType.Type
Expand All @@ -65,15 +65,15 @@ import org.sireum.hamr.ir
@datatype class TODOType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z]

) extends AadlType

@datatype class BitType(val classifier: ISZ[String],
val nameProvider: TypeNameProvider,

val container: Option[ir.Component],
@hidden val container: Option[ir.Component],
val bitSize: Option[Z],

val originatingType: Option[AadlType]) extends AadlType
Expand Down
Loading

0 comments on commit 1d5f100

Please sign in to comment.