CGRA-ME
src
core
ModuleProcedures.cpp
Go to the documentation of this file.
1
#include <
CGRA/ModuleProcedures.h
>
2
3
bool
moduleRequiresClockPorts
(
const
Module
& m) {
4
if
(m.
addsSynchronousCircuitry
()) {
5
return
true
;
6
}
7
8
for
(
const
auto
& nameAndSubmodule : m.
submodules
) {
9
if
(
moduleRequiresClockPorts
(*nameAndSubmodule.second)) {
10
return
true
;
11
}
12
}
13
14
return
false
;
15
}
16
17
bool
moduleRequiresConfigPorts
(
const
Module
& m) {
18
if
(m.
hasConfigCells
() || (
bool
)
dynamic_cast<
const
ConfigCell
*
>
(&m)) {
19
return
true
;
20
}
21
22
for
(
const
auto
& nameAndSubmodule : m.
submodules
) {
23
if
(
moduleRequiresConfigPorts
(*nameAndSubmodule.second)) {
24
return
true
;
25
}
26
}
27
28
return
false
;
29
}
Module::submodules
std::map< std::string, Module * > submodules
Definition:
Module.h:227
ConfigCell
Definition:
Module.h:825
ModuleProcedures.h
Module::hasConfigCells
bool hasConfigCells() const
Definition:
Module.h:255
Module
Definition:
Module.h:163
moduleRequiresClockPorts
bool moduleRequiresClockPorts(const Module &m)
Definition:
ModuleProcedures.cpp:3
Module::addsSynchronousCircuitry
bool addsSynchronousCircuitry() const
Definition:
Module.h:367
moduleRequiresConfigPorts
bool moduleRequiresConfigPorts(const Module &m)
Definition:
ModuleProcedures.cpp:17
Generated on Fri Nov 17 2023 12:26:44 for CGRA-ME by
1.8.17