diff --git a/lib/Dialect/FIRRTL/Transforms/LowerDPI.cpp b/lib/Dialect/FIRRTL/Transforms/LowerDPI.cpp index 84fddc86e9..610f7ff8b0 100644 --- a/lib/Dialect/FIRRTL/Transforms/LowerDPI.cpp +++ b/lib/Dialect/FIRRTL/Transforms/LowerDPI.cpp @@ -97,7 +97,7 @@ LogicalResult LowerDPI::lower() { // Construct DPI func op. auto firstDPIDecl = getOrCreateDPIFuncDecl(firstDPICallop); - auto inputTypes = firstDPICallop.getOperandTypes(); + auto inputTypes = firstDPICallop.getInputs().getTypes(); auto outputTypes = firstDPICallop.getResultTypes(); ImplicitLocOpBuilder builder(firstDPICallop.getLoc(), diff --git a/test/Dialect/FIRRTL/lower-dpi.mlir b/test/Dialect/FIRRTL/lower-dpi.mlir index 86897eedd0..64d6816f13 100644 --- a/test/Dialect/FIRRTL/lower-dpi.mlir +++ b/test/Dialect/FIRRTL/lower-dpi.mlir @@ -31,4 +31,12 @@ firrtl.circuit "DPI" { firrtl.matchingconnect %out_0, %0 : !firrtl.uint<8> firrtl.matchingconnect %out_1, %1 : !firrtl.uint<8> } + + // CHECK-LABEL: firrtl.module @DPISignature + firrtl.module @DPISignature(in %clock: !firrtl.clock, in %enable: !firrtl.uint<1>, in %in_0: !firrtl.uint<8>, in %in_1: !firrtl.uint<8>) attributes {convention = #firrtl} { + // CHECK: call @clocked_void + // CHECK: call @clocked_void + firrtl.int.dpi.call "clocked_void"(%in_0, %in_1) clock %clock enable %enable : (!firrtl.uint<8>, !firrtl.uint<8>) -> () + firrtl.int.dpi.call "clocked_void"(%in_0, %in_1) clock %clock : (!firrtl.uint<8>, !firrtl.uint<8>) -> () + } }