source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp @ 42

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

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

File size: 1008 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interface.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
13  Signal * Interface::set_signal (string          name     ,
14                                  direction_t     direction,
15                                  uint32_t        size     ,
16                                  presence_port_t presence_port)
17  {
18    log_printf(FUNC,Behavioural,"set_signal","Begin");
19
20    string signame = signal_name(_name, name, direction);
21
22    Signal * sig = new Signal       (signame, direction, size, presence_port);
23
24    _list_signal->push_back (sig);
25
26    log_printf(FUNC,Behavioural,"set_signal","End");
27
28    return sig;
29  };
30
31#ifdef VHDL
32#  ifdef VHDL_TESTBENCH
33  void Interface::set_signal (Vhdl * & vhdl)
34  {
35    if (not _list_signal->empty())
36      {
37        list<Signal*>::iterator i = _list_signal->begin();
38       
39        while (i != _list_signal->end())
40          {
41            (*i)->set_signal (vhdl);
42            ++i;
43          }
44      }
45  };
46#  endif
47#endif
48
49}; // end namespace behavioural         
50}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.