CIRCT 20.0.0git
Loading...
Searching...
No Matches
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
22namespace mlir {
23class Pass;
24} // namespace mlir
25
26namespace 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
33namespace calyxToFSM {
34// Entry and exit state names of the Calyx control program in the FSM.
35static constexpr std::string_view sEntryStateName = "fsm_entry";
36static constexpr std::string_view sExitStateName = "fsm_exit";
37static constexpr std::string_view sGroupDoneInputs =
38 "calyx.fsm_group_done_inputs";
39static constexpr std::string_view sGroupGoOutputs =
40 "calyx.fsm_group_go_outputs";
41static constexpr std::string_view sSSAInputIndices = "calyx.fsm_ssa_inputs";
42static constexpr std::string_view sFSMTopLevelGoIndex =
43 "calyx.fsm_top_level_go";
44static constexpr std::string_view sFSMTopLevelDoneIndex =
45 "calyx.fsm_top_level_done";
46
47} // namespace calyxToFSM
48
49std::unique_ptr<mlir::Pass> createCalyxToFSMPass();
50std::unique_ptr<mlir::Pass> createMaterializeCalyxToFSMPass();
51std::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.
std::unique_ptr< mlir::Pass > createCalyxToFSMPass()
std::unique_ptr< mlir::Pass > createRemoveGroupsFromFSMPass()
std::unique_ptr< mlir::Pass > createMaterializeCalyxToFSMPass()