-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Seq] Lower both registers and memories in the same pass
This PR moves the conversion of FIRRTL-specific `seq` ops to their own conversion pass, `SeqToSV`. The existing register & memory lowering passes are packaged as re-usable utilities to keep them available as individual transformations. Both the memory and register lowering utilities are packaged into a single parallelized lowering.
- Loading branch information
Showing
22 changed files
with
1,201 additions
and
987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//===- SeqToSV.h - SV conversion for seq ops ----------------===-*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file declares passes which lower `seq` to `sv` and `hw`. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef CIRCT_CONVERSION_SEQTOSV_H | ||
#define CIRCT_CONVERSION_SEQTOSV_H | ||
|
||
#include "circt/Support/LLVM.h" | ||
#include <memory> | ||
|
||
namespace mlir { | ||
class Pass; | ||
} // namespace mlir | ||
|
||
namespace circt { | ||
|
||
#define GEN_PASS_DECL_LOWERSEQFIRRTLTOSV | ||
#include "circt/Conversion/Passes.h.inc" | ||
|
||
std::unique_ptr<mlir::Pass> | ||
createSeqFIRRTLLowerToSVPass(const LowerSeqFIRRTLToSVOptions &options = {}); | ||
std::unique_ptr<mlir::Pass> createLowerFirMemPass(); | ||
std::unique_ptr<mlir::Pass> createLowerSeqFIRRTLInitToSV(); | ||
|
||
} // namespace circt | ||
|
||
#endif // CIRCT_CONVERSION_SEQTOSV_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
add_circt_conversion_library(CIRCTSeqToSV | ||
FirMemLowering.cpp | ||
FirRegLowering.cpp | ||
SeqToSV.cpp | ||
SeqFIRRTLInitToSV.cpp | ||
LowerFirMem.cpp | ||
|
||
DEPENDS | ||
CIRCTConversionPassIncGen | ||
|
||
LINK_COMPONENTS | ||
Core | ||
|
||
LINK_LIBS PUBLIC | ||
CIRCTSeq | ||
) |
Oops, something went wrong.