Ignore:
Timestamp:
Jul 5, 2007, 5:50:19 PM (17 years ago)
Author:
rosiere
Message:

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

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp

    r41 r42  
    1313
    1414  string Interface_fifo::testbench_test (Vhdl * & vhdl,
    15                                        string   counter_name)
     15                                         string   counter_name,
     16                                         string   reset_name  )
    1617  {
    1718    log_printf(FUNC,Behavioural,"testbench_test","Begin");
     
    1920   
    2021    if (_test_exhaustive == true)
    21       test_name = Interface::testbench_test(vhdl,counter_name);
     22      test_name = Interface::testbench_test(vhdl,counter_name,reset_name);
    2223    else
    2324      {
     
    2627        vhdl->set_body("");
    2728
    28         test_name    = testbench_test_name   (vhdl);
    29         string test_name_ok = testbench_test_ok     (vhdl);
     29               test_name        = testbench_test_name        (vhdl);
     30        string test_name_tmp    = test_name+"_tmp";
     31        string test_name_ok     = testbench_test_ok          (vhdl);
     32        string test_transaction = testbench_test_transaction (vhdl);
     33
     34        vhdl->set_signal(test_name_tmp,1);
    3035
    3136        if (_list_cycle->empty()== false)
    3237          {
    3338            vhdl->set_body ("with "+counter_name+" select");
    34             vhdl->set_body ("\t"+test_name+" <=");
     39            vhdl->set_body ("\t"+test_name_tmp+" <=");
    3540       
    3641            list<uint32_t>::iterator i = _list_cycle->begin();
     
    3843            while (i != _list_cycle->end())
    3944              {
    40                 vhdl->set_body ("\t"+test_name_ok+" when "+toString(*i)+",");
     45                vhdl->set_body ("\t"+test_transaction+" and "+test_name_ok+" when "+toString(*i)+",");
    4146                ++i;
    4247              }
    43             vhdl->set_body ("\t'1' when others;");
     48            vhdl->set_body ("\tnot "+test_transaction+" when others;");
    4449          }
     50        else
     51          vhdl->set_body (test_name_tmp+" <= not "+test_transaction+";");
     52       
     53        vhdl->set_body("");
     54        vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_tmp+";");
     55
     56#ifdef VHDL_TESTBENCH_ASSERT
     57        if (_list_cycle->empty()== false)
     58          {
     59            vhdl->set_body("");
     60            vhdl->set_body("-- Assert ...");
     61            vhdl->set_body("");
     62
     63            uint32_t                 j = 0;
     64            list<uint32_t>::iterator i = _list_cycle->begin();
     65           
     66            while (i != _list_cycle->end())
     67              {
     68                vhdl->set_body("assert not ( ("+counter_name+" = "+toString(*i)+")) report \"***** <"+_name+"> interface's test number "+toString(j)+" *****\" severity NOTE;");
     69                j++;
     70                ++i;
     71              }
     72
     73            vhdl->set_body("");
     74          }
     75#endif
    4576      }
    4677
Note: See TracChangeset for help on using the changeset viewer.