source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h @ 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.8 KB
Line 
1#ifndef morpheo_behavioural_Interface_fifo_h
2#define morpheo_behavioural_Interface_fifo_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Behavioural/include/Interface.h"
12
13namespace morpheo              {
14namespace behavioural          {
15
16  typedef enum {VAL, ACK} val_ack_t;
17
18  class Interface_fifo : public Interface
19  {
20  private   : list<Signal *>      * _list_signal_val;
21  private   : list<Signal *>      * _list_signal_ack;
22
23#ifdef VHDL_TESTBENCH
24  private   : bool                  _test_exhaustive;
25  private   : list<uint32_t>      * _list_cycle   ;
26
27#endif
28
29   // -----[ methods ]---------------------------------------------------
30  public    :                       Interface_fifo       (string         name        ,
31                                                          direction_t    direction   ,
32                                                          localisation_t localisation);
33   
34  public    :                       Interface_fifo       (const Interface_fifo & interface_fifo);
35  public    :                       ~Interface_fifo      ();
36
37  public    : Signal *              set_signal_valack    (string          name     ,
38                                                          direction_t     direction,
39                                                          val_ack_t       val_ack  ,
40                                                          presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
41
42  private   : void                  save_ptr             (Signal *        signal   ,
43                                                          val_ack_t       val_ack  );
44
45#ifdef SYSTEMC
46  public    : sc_in <bool> *        set_signal_valack_in (string          name     ,
47                                                          val_ack_t       val_ack  ,
48                                                          presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
49    {
50      log_printf(FUNC,Behavioural,"set_signal_valack_in","Begin");
51
52      sc_in <bool> * port = set_signal_in <bool> (name, 1, presence_port);
53     
54      save_ptr(_list_signal->back(), val_ack);
55     
56      log_printf(FUNC,Behavioural,"set_signal_valack_in","End");
57      return port;
58    };
59
60  public    : sc_out<bool> *        set_signal_valack_out(string          name     ,
61                                                          val_ack_t       val_ack  ,
62                                                          presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
63    {
64      log_printf(FUNC,Behavioural,"set_signal_valack_out","Begin");
65
66      sc_out<bool> * port = set_signal_out<bool> (name, 1, presence_port);
67     
68      save_ptr(_list_signal->back(), val_ack);
69     
70      log_printf(FUNC,Behavioural,"set_signal_valack_out","End");
71      return port;
72    };
73#endif
74
75#ifdef VHDL_TESTBENCH
76  public    : uint32_t              get_cycle            (void);
77
78  public    : void                  testbench            (void);
79  public    : bool                  testbench_transaction(void);
80  public    : void                  testbench_cycle      (void);
81  public    : string                testbench_test       (Vhdl           * & vhdl        ,
82                                                          string             counter_name);
83#endif
84  };
85
86}; // end namespace behavioural         
87}; // end namespace morpheo             
88
89#endif
Note: See TracBrowser for help on using the repository browser.