ut_process.hpp
Go to the documentation of this file.
1 /**********************************************************************
2  * ut_process.hpp -- The UT MoC process *
3  * *
4  * Author: Hosein Attarzadeh (shan2@kth.se) *
5  * *
6  * Purpose: Providing the primitives for the UT MoC *
7  * *
8  * Usage: This file is included automatically *
9  * *
10  * License: BSD3 *
11  *******************************************************************/
12 
13 #ifndef UT_PROCESS_HPP
14 #define UT_PROCESS_HPP
15 
23 #include "abssemantics.hpp"
24 
25 namespace ForSyDe
26 {
27 
28 namespace UT
29 {
30 
31 using namespace sc_core;
32 
34 template <typename T>
35 class UT2UT: public ForSyDe::signal<T,T>
36 {
37 public:
39  UT2UT(sc_module_name name, unsigned size) : ForSyDe::signal<T,T>(name, size) {}
40 #ifdef FORSYDE_INTROSPECTION
41 
42  virtual std::string moc() const
43  {
44  return "UT";
45  }
46 #endif
47 };
48 
50 template <typename T>
51 using signal = UT2UT<T>;
52 
54 template <typename T>
55 class UT_in: public ForSyDe::in_port<T,T,signal<T>>
56 {
57 public:
59  UT_in(const char* name) : ForSyDe::in_port<T,T,signal<T>>(name){}
60 };
61 
63 template <typename T>
64 using in_port = UT_in<T>;
65 
67 template <typename T>
68 class UT_out: public ForSyDe::out_port<T,T,signal<T>>
69 {
70 public:
72  UT_out(const char* name) : ForSyDe::out_port<T,T,signal<T>>(name){}
73 };
74 
76 template <typename T>
78 
81 
82 }
83 }
84 
85 #endif
The namespace for ForSyDe.
Definition: abssemantics.hpp:30
The in_port port is used for input ports of ForSyDe processes.
Definition: abssemantics.hpp:121
The UT2UT signal used to inter-connect UT processes.
Definition: ut_process.hpp:35
The UT_out port is used for output ports of UT processes.
Definition: abssemantics.hpp:159
The UT_out port is used for output ports of UT processes.
Definition: ut_process.hpp:68
ForSyDe::process ut_process
Abstract semantics of a process in the SY MoC.
Definition: ut_process.hpp:80
The process constructor which defines the abstract semantics of execution.
Definition: abssemantics.hpp:212
The UT_in port is used for input ports of UT processes.
Definition: ut_process.hpp:55
The common abstract semantics for all MoCs.
A ForSyDe signal is used to inter-connect processes.
Definition: abssemantics.hpp:70