source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp @ 41

Last change on this file since 41 was 41, checked in by rosiere, 17 years ago

Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old

File size: 2.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
9
10namespace morpheo                    {
11namespace behavioural                {
12namespace generic                    {
13namespace registerfile               {
14namespace registerfile_monolithic    {
15
16  RegisterFile_Monolithic::RegisterFile_Monolithic (
17#ifdef SYSTEMC
18                                                    sc_module_name name,
19#else
20                                                    string name        ,
21#endif
22#ifdef STATISTICS
23                                                    morpheo::behavioural::Parameters_Statistics             param_statistics,
24#endif
25                                                    morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters param ):
26    _name   (name),
27    _param (param)
28  {
29    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin");
30
31#ifdef SYSTEMC
32    log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation");
33
34    allocation ();
35#endif
36
37#ifdef STATISTICS
38    _stat = new Statistics (static_cast<string>(_name),
39                            param_statistics          ,
40                            param);
41#endif
42
43#ifdef VHDL
44    // generate the vhdl
45    vhdl();
46#endif
47
48#ifdef SYSTEMC
49    SC_METHOD (transition);
50    dont_initialize ();
51    sensitive_pos << *(in_CLOCK);
52   
53    SC_METHOD (genMealy_read);
54    dont_initialize ();
55    sensitive_neg << *(in_CLOCK);
56    for (uint32_t i=0; i<_param._nb_port_read; i++)
57      sensitive << *(in_READ_VAL     [i])
58                << *(in_READ_ADDRESS [i]);
59
60#ifdef SYSTEMCASS_SPECIFIC
61    // List dependency information
62    for (uint32_t i=0; i<_param._nb_port_read; i++)
63      {
64        (*(out_READ_DATA [i])) (*( in_READ_VAL     [i]));
65        (*(out_READ_DATA [i])) (*( in_READ_ADDRESS [i]));
66      }
67#endif   
68
69    for (uint32_t i=0; i<_param._nb_port_read ; i++)
70      PORT_WRITE(out_READ_ACK  [i], 1);
71    for (uint32_t i=0; i<_param._nb_port_write; i++)
72      PORT_WRITE(out_WRITE_ACK [i], 1);
73#endif
74
75    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","End");
76  };
77 
78  RegisterFile_Monolithic::~RegisterFile_Monolithic (void)
79  {
80#ifdef STATISTICS
81    _stat->generate_file(statistics(0));
82    delete _stat;
83#endif
84
85#ifdef SYSTEMC
86    deallocation ();
87#endif
88  };
89
90}; // end namespace registerfile_monolithic
91}; // end namespace registerfile
92}; // end namespace generic
93}; // end namespace behavioural         
94}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.