Ignore:
Timestamp:
Jun 7, 2007, 9:13:47 PM (17 years ago)
Author:
rosiere
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r40 r41  
    2121#ifdef VHDL
    2222#include "Behavioural/include/Vhdl.h"
    23 #endif
    24 #ifdef VHDL_TESTBENCH
    25 #include "Behavioural/include/Vhdl_Testbench.h"
    2623#endif
    2724#include "Include/ToString.h"
     
    5350
    5451#ifdef VHDL_TESTBENCH
    55   private   : list<string>        * _list_cycle   ;
     52  private   : uint32_t              _nb_cycle     ;
    5653#endif
    5754   
     
    8077  public    : sc_in_clk *           set_signal_clk       (string          name     ,
    8178                                                          uint32_t        size     ,
    82                                                           presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     79                                                          presence_port_t presence_port=CLOCK_VHDL_YES)
    8380    {
    8481      log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
    8582
    86       Signal * sig = set_signal (name, IN , size, presence_port);
     83      if ((presence_port != CLOCK_VHDL_YES) and
     84          (presence_port != CLOCK_VHDL_NO ))
     85        throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port.");
     86
     87      Signal    * sig    = set_signal (name, IN , size, presence_port);
    8788      sc_in_clk * signal = new sc_in_clk (sig->_name.c_str());
    8889
     
    9899    {
    99100      log_printf(FUNC,Behavioural,"set_signal_in","Begin");
     101
     102      if ((presence_port == CLOCK_VHDL_YES) or
     103          (presence_port == CLOCK_VHDL_NO ))
     104        throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
    100105
    101106      Signal * sig = set_signal (name, IN , size, presence_port);
     
    117122      log_printf(FUNC,Behavioural,"set_signal_out","Begin");
    118123
     124      if ((presence_port == CLOCK_VHDL_YES) or
     125          (presence_port == CLOCK_VHDL_NO ))
     126        throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
     127
    119128      Signal * sig = set_signal (name, OUT , size, presence_port);
    120129      sc_out <T> * port = new sc_out <T> (sig->_name.c_str());
     
    131140#ifdef VHDL
    132141  public    : void                  set_port             (Vhdl * & vhdl);
     142#ifdef VHDL_TESTBENCH
     143  public    : void                  set_signal           (Vhdl * & vhdl);
     144  public    : void                  get_signal           (list<string> * & list_signal);
     145#endif
    133146#endif
    134147#ifdef VHDL_TESTBENCH
    135   public    : void                  set_port             (Vhdl_Testbench * & vhdl_testbench);
     148  public    : uint32_t              get_cycle            (void);
     149  public    : string                get_clock            (void);
     150
     151  public    : void                  testbench            (void);
     152  public    : void                  testbench_cycle      (void);
     153  public    : void                  testbench_body       (Vhdl           * & vhdl          ,
     154                                                          string             counter_name  );
     155  public    : string                testbench_test       (Vhdl           * & vhdl        ,
     156                                                          string             counter_name);
     157  public    : string                testbench_test_ok    (Vhdl           * & vhdl        );
     158  protected : string                testbench_test_name   (Vhdl           * & vhdl);
     159  protected : string                testbench_test_ok_name(Vhdl           * & vhdl);
     160
    136161#endif
    137162
     
    139164  public    : void                  port_map             (void * entity,
    140165                                                          void * interface);
    141 #endif
    142 
    143 #ifdef VHDL_TESTBENCH
    144   public    : void                  testbench_cycle      (void);
    145   public    : void                  testbench            (Vhdl_Testbench * & vhdl_testbench);
    146166#endif
    147167
Note: See TracChangeset for help on using the changeset viewer.