Skip to content

Commit

Permalink
[binder] Fix extmodule emission
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO authored and chiselbot committed Jan 9, 2024
1 parent 2566eab commit 96e5d98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binder/src/main/scala/PanamaCIRCTConverter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,12 @@ class PanamaCIRCTConverter extends CIRCTConverter {

val builder = util
.OpBuilder("firrtl.extmodule", firCtx.circuitBlock, circt.unkLoc)
.withRegionNoBlock()
.withNamedAttr("sym_name", nameAttr)
.withNamedAttr("sym_visibility", circt.mlirStringAttrGet("private"))
.withNamedAttr("defname", nameAttr)
.withNamedAttr("parameters", circt.mlirArrayAttrGet(defBlackBox.params.map(p => util.convert(p._1, p._2)).toSeq))
.withNamedAttr("convention", circt.firrtlAttrGetConvention(FIRRTLConvention.Internal)) // TODO: handle it corretly
.withNamedAttr("annotations", circt.emptyArrayAttr)
val firModule = util.moduleBuilderInsertPorts(builder, ports).build()

Expand Down

0 comments on commit 96e5d98

Please sign in to comment.