source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h @ 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: 2.9 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#endif
27
28   // -----[ methods ]---------------------------------------------------
29  public    :                       Interface_fifo       (string         name       
30#ifdef POSITION
31                                                          ,direction_t    direction   
32                                                          ,localisation_t localisation
33#endif
34                                                          );
35   
36  public    :                       Interface_fifo       (const Interface_fifo & interface_fifo);
37  public    :                       ~Interface_fifo      ();
38
39  public    : Signal *              set_signal_valack    (string          name     ,
40                                                          direction_t     direction,
41                                                          val_ack_t       val_ack  ,
42                                                          presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
43
44  private   : void                  save_ptr             (Signal *        signal   ,
45                                                          val_ack_t       val_ack  );
46
47#ifdef SYSTEMC
48  public    : sc_in <bool> *        set_signal_valack_in (string          name     ,
49                                                          val_ack_t       val_ack  ,
50                                                          presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
51    {
52      log_printf(FUNC,Behavioural,"set_signal_valack_in","Begin");
53
54      sc_in <bool> * port = set_signal_in <bool> (name, 1, presence_port);
55     
56      save_ptr(_list_signal->back(), val_ack);
57     
58      log_printf(FUNC,Behavioural,"set_signal_valack_in","End");
59      return port;
60    };
61
62  public    : sc_out<bool> *        set_signal_valack_out(string          name     ,
63                                                          val_ack_t       val_ack  ,
64                                                          presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
65    {
66      log_printf(FUNC,Behavioural,"set_signal_valack_out","Begin");
67
68      sc_out<bool> * port = set_signal_out<bool> (name, 1, presence_port);
69     
70      save_ptr(_list_signal->back(), val_ack);
71     
72      log_printf(FUNC,Behavioural,"set_signal_valack_out","End");
73      return port;
74    };
75#endif
76
77#ifdef VHDL_TESTBENCH
78  public    : uint32_t              get_cycle            (void);
79
80  public    : void                  testbench            (void);
81  public    : bool                  testbench_transaction(void);
82  public    : void                  testbench_cycle      (void);
83  public    : string                testbench_test       (Vhdl   * & vhdl        ,
84                                                          string     counter_name,
85                                                          string     reset_name  );
86
87  public    : string                testbench_test_transaction (Vhdl * & vhdl);
88#endif
89  };
90
91}; // end namespace behavioural         
92}; // end namespace morpheo             
93
94#endif
Note: See TracBrowser for help on using the repository browser.