[firtool] Fix argument passing to LowerAnnotations

Fix a bug introduced in [[1]] where two parameters passed to the
LowerAnnotations pass were swapped.  Swap these back and add a test of
this behavior.

[1]: 2b98e4233

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
This commit is contained in:
Schuyler Eldridge 2025-07-18 16:39:05 -04:00
parent 0671e9d440
commit 47cf87cdcd
No known key found for this signature in database
GPG Key ID: 50C5E9936AAD536D
2 changed files with 14 additions and 2 deletions

View File

@ -35,8 +35,8 @@ LogicalResult firtool::populatePreprocessTransforms(mlir::PassManager &pm,
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createResolvePaths());
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createLowerFIRRTLAnnotations(
{/*ignoreAnnotationUnknown=*/opt.shouldDisableUnknownAnnotations(),
/*ignoreAnnotationClassless=*/opt.shouldDisableClasslessAnnotations(),
{/*ignoreAnnotationClassless=*/opt.shouldDisableClasslessAnnotations(),
/*ignoreAnnotationUnknown=*/opt.shouldDisableUnknownAnnotations(),
/*noRefTypePorts=*/opt.shouldLowerNoRefTypePortAnnotations(),
/*allowAddingPortsOnPublic=*/opt.shouldAllowAddingPortsOnPublic()}));

View File

@ -0,0 +1,12 @@
; RUN: firtool -disable-annotation-unknown %s | FileCheck %s
FIRRTL version 5.2.0
circuit Foo: %[[
{
"class": "Unknown"
}
]]
; CHECK: module Foo(
public module Foo:
input a: UInt<1>