CIRCT  19.0.0git
CalyxToFSM.h
Go to the documentation of this file.
1 //===- CalyxToFSM.h - Calyx to FSM conversion pass --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares passes which lowers a Calyx control schedule to an FSM
10 // representation.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef CIRCT_CONVERSION_CALYXTOFSM_CALYXTOFSM_H
15 #define CIRCT_CONVERSION_CALYXTOFSM_CALYXTOFSM_H
16 
19 #include "circt/Support/LLVM.h"
20 #include <memory>
21 
22 namespace mlir {
23 class Pass;
24 } // namespace mlir
25 
26 namespace circt {
27 
28 #define GEN_PASS_DECL_CALYXTOFSM
29 #define GEN_PASS_DECL_MATERIALIZECALYXTOFSM
30 #define GEN_PASS_DECL_CALYXREMOVEGROUPSFROMFSM
31 #include "circt/Conversion/Passes.h.inc"
32 
33 namespace calyxToFSM {
34 // Entry and exit state names of the Calyx control program in the FSM.
35 static constexpr std::string_view sEntryStateName = "fsm_entry";
36 static constexpr std::string_view sExitStateName = "fsm_exit";
37 static constexpr std::string_view sGroupDoneInputs =
38  "calyx.fsm_group_done_inputs";
39 static constexpr std::string_view sGroupGoOutputs =
40  "calyx.fsm_group_go_outputs";
41 static constexpr std::string_view sSSAInputIndices = "calyx.fsm_ssa_inputs";
42 static constexpr std::string_view sFSMTopLevelGoIndex =
43  "calyx.fsm_top_level_go";
44 static constexpr std::string_view sFSMTopLevelDoneIndex =
45  "calyx.fsm_top_level_done";
46 
47 } // namespace calyxToFSM
48 
49 std::unique_ptr<mlir::Pass> createCalyxToFSMPass();
50 std::unique_ptr<mlir::Pass> createMaterializeCalyxToFSMPass();
51 std::unique_ptr<mlir::Pass> createRemoveGroupsFromFSMPass();
52 
53 } // namespace circt
54 
55 #endif // CIRCT_CONVERSION_CALYXTOFSM_CALYXTOFSM_H
static constexpr std::string_view sGroupDoneInputs
Definition: CalyxToFSM.h:37
static constexpr std::string_view sFSMTopLevelGoIndex
Definition: CalyxToFSM.h:42
static constexpr std::string_view sExitStateName
Definition: CalyxToFSM.h:36
static constexpr std::string_view sSSAInputIndices
Definition: CalyxToFSM.h:41
static constexpr std::string_view sFSMTopLevelDoneIndex
Definition: CalyxToFSM.h:44
static constexpr std::string_view sEntryStateName
Definition: CalyxToFSM.h:35
static constexpr std::string_view sGroupGoOutputs
Definition: CalyxToFSM.h:39
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
std::unique_ptr< mlir::Pass > createCalyxToFSMPass()
Definition: CalyxToFSM.cpp:406
std::unique_ptr< mlir::Pass > createRemoveGroupsFromFSMPass()
std::unique_ptr< mlir::Pass > createMaterializeCalyxToFSMPass()