-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsenenv_fifo_input.h
executable file
·72 lines (63 loc) · 2.55 KB
/
senenv_fifo_input.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
*
* Author: Tatiana Djaba Nya (Lead author)
* Author: Stephan C. Stilkerich
*
* Reference Architecture Model (EPiCS FP7 FET program, No. 257906)
* - Peter R. Lewis, University of Birmingham
* - Xin Yao, University of Birmingham
*
* Copyright (c) 2013, EADS Deutschland GmbH, EADS Innovation Works
*
*=====================================================================================
*
*This file is part of ProprioSimEnv.
*
* ProprioSimEnv is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProprioSimEnv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProprioSimEnv. If not, see <http://www.gnu.org/licenses/>.
*/
//========================================================================================
/// @file SENSENV_FIFO_INPUT.h
//
/// @brief This is the module which has the method process responsible for filling up the fifo
/// channels of a node bounded to the input ports of the senenv components in each process
/// cycle before the transactions start.
//
/// @details To be implemented according to the needs
//
//========================================================================================
#ifndef __SENSORENV_FIFO_INPUT_H__
#define __SENSORENV_FIFO_INPUT_H__
#include <systemc.h>
#include "constants.h"
#include "key_functions.h"
class senenv_fifo_input:public sc_module
{
public:
senenv_fifo_input( sc_module_name module_name ///< sc module name
, unsigned int out_port_nr ///< number of output ports
, sc_core::sc_time glob_quantum_ ///< time value for the global quantum
, char* filename_ ///< input file name
);
SC_HAS_PROCESS( senenv_fifo_input );
void senenv_fifo_input_thread( void );
void read_data ( char* file_name ///< pointer to input file name
);
sc_core::sc_vector< sc_port< sc_fifo_out_if<datyp> > > out_ports; ///< vector of output port with access right to fifo channel
private:
int s_out_port_nr, s_counter;
sc_core::sc_time glob_quantum;
char* inputfile;
std::vector<datyp> data_vector;
};
#endif