source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp @ 29

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

Interface normalisé
Début du banc de registres multi niveaux

File size: 1.6 KB
Line 
1#ifdef VHDL_TESTBENCH
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace select {
15namespace select_priority_fixed {
16
17
18  void Select_Priority_Fixed::vhdl_testbench_transition ()
19  {
20    log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","Begin");
21
22    // Evaluation before read the ouput signal
23    sc_start(0);
24
25    // In order with file Select_Priority_Fixed_vhdl_testbench_port.cpp
26    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
27    // (because we have no control on the ordonnancer's policy)
28
29    _vhdl_testbench->add_input (PORT_READ( in_NRESET));
30   
31    for (uint32_t i=0; i<_param._nb_entity; i++)
32      {
33        _vhdl_testbench->add_input (PORT_READ( in_VAL [i]));
34        if (_param._encoding_one_hot)
35        _vhdl_testbench->add_output(PORT_READ(out_ACK [i]));
36      }
37   
38    if (_param._encoding_compact)
39      {
40    _vhdl_testbench->add_output(PORT_READ(out_ENTITY));
41    _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK));
42      }
43    // add_test :
44    //  - True  : the cycle must be compare with the output of systemC
45    //  - False : no test
46    _vhdl_testbench->add_test(true);
47
48    _vhdl_testbench->new_cycle (); // always at the end
49
50    log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","End");
51  };
52
53}; // end namespace select_priority_fixed
54}; // end namespace select
55}; // end namespace generic
56
57}; // end namespace behavioural
58}; // end namespace morpheo             
59#endif
Note: See TracBrowser for help on using the repository browser.