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

Last change on this file since 11 was 10, checked in by rosiere, 18 years ago
File size: 1.5 KB
Line 
1#ifdef VHDL_TESTBENCH
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Select/Priority_Fixed/include/Priority_Fixed.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace select {
15namespace priority_fixed {
16
17
18  void Priority_Fixed::vhdl_testbench_transition ()
19  {
20    log_printf(FUNC,Priority_Fixed,"vhdl_testbench_transition","Begin");
21
22    // Evaluation before read the ouput signal
23    sc_start(0);
24
25    // In order with file 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    for (uint32_t i=0; i<_param._nb_entity; i++)
30      {
31        _vhdl_testbench->add_input (PORT_READ( in_VAL [i]));
32        if (_param._encoding_one_hot)
33        _vhdl_testbench->add_output(PORT_READ(out_ACK [i]));
34      }
35   
36    if (_param._encoding_compact)
37      {
38    _vhdl_testbench->add_output(PORT_READ(out_ENTITY));
39    _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK));
40      }
41    // add_test :
42    //  - True  : the cycle must be compare with the output of systemC
43    //  - False : no test
44    _vhdl_testbench->add_test(true);
45
46    _vhdl_testbench->new_cycle (); // always at the end
47
48    log_printf(FUNC,Priority_Fixed,"vhdl_testbench_transition","End");
49  };
50
51}; // end namespace priority_fixed
52}; // end namespace select
53}; // end namespace generic
54
55}; // end namespace behavioural
56}; // end namespace morpheo             
57#endif
Note: See TracBrowser for help on using the repository browser.