Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
uenoku committed Nov 14, 2024
1 parent 3a18440 commit 2c369d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/Dialect/FIRRTL/Transforms/LowerAnnotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,14 @@ applyConventionOrTypeLoweringAnno(const AnnoPathValue &target,

auto conventionStrAttr =
tryGetAs<StringAttr>(anno, anno, "convention", loc, conventionAnnoClass);

if (!conventionStrAttr)
return failure();

auto conventionStr = conventionStrAttr.getValue();
auto conventionOpt = parseConvention(conventionStr);
if (!conventionOpt)
return error() << "unknown convention " << conventionStr;

auto convention = *conventionOpt;

if (convention == Convention::Internal)
Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/FIRRTL/Transforms/LowerLayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ FModuleOp LowerLayersPass::buildNewModule(OpBuilder &builder,
llvm::sys::SmartScopedLock<true> instrumentationLock(*circuitMutex);
FModuleOp newModule = builder.create<FModuleOp>(
location, builder.getStringAttr(namehint),
ConventionAttr::get(builder.getContext(), Convention::Internal),
ports, ArrayAttr{});
ConventionAttr::get(builder.getContext(), Convention::Internal), ports,
ArrayAttr{});
if (auto dir = getOutputFile(layerBlock.getLayerNameAttr())) {
assert(dir.isDirectory());
newModule->setAttr("output_file", dir);
Expand Down
3 changes: 1 addition & 2 deletions lib/Dialect/FIRRTL/Transforms/LowerMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ void LowerMemoryPass::lowerMemory(MemOp mem, const FirMemory &summary,
OpBuilder b(mem->getParentOfType<FModuleOp>());
auto wrapper = b.create<FModuleOp>(
mem->getLoc(), wrapperName,
ConventionAttr::get(context, Convention::Internal),
ports);
ConventionAttr::get(context, Convention::Internal), ports);
SymbolTable::setSymbolVisibility(wrapper, SymbolTable::Visibility::Private);

// Create an instance of the external memory module. The instance has the
Expand Down

0 comments on commit 2c369d2

Please sign in to comment.