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