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

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

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

File size: 1.3 KB
Line 
1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
10
11#ifdef VHDL_TESTBENCH
12# define VHDL_SET_PORT(name,direction,size) do {vhdl.set_port (name,direction,size); _vhdl_testbench->set_port (name,direction,size);} while (0)
13#else
14# define VHDL_SET_PORT(name,direction,size)     vhdl.set_port (name,direction,size)
15#endif
16
17namespace morpheo                    {
18namespace behavioural {
19namespace generic {
20namespace select {
21namespace select_priority_fixed {
22
23
24  void Select_Priority_Fixed::vhdl_port (Vhdl & vhdl)
25  {
26    log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","Begin");
27
28    vhdl.set_port (" in_CLOCK ", IN, 1);
29    VHDL_SET_PORT (" in_NRESET", IN, 1);
30       
31    for (uint32_t i=0; i<_param._nb_entity; i++)
32      {
33        VHDL_SET_PORT (" in_VAL_"+toString(i) , IN, 1);
34        if (_param._encoding_one_hot)
35        VHDL_SET_PORT ("out_ACK_"+toString(i) ,OUT, 1);
36      }
37    if (_param._encoding_compact)
38      {
39    VHDL_SET_PORT ("out_ENTITY    ",OUT,_param._size_entity);
40    VHDL_SET_PORT ("out_ENTITY_ACK",OUT,1);
41      }
42    log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","End");
43  };
44
45}; // end namespace select_priority_fixed
46}; // end namespace select
47}; // end namespace generic
48
49}; // end namespace behavioural
50}; // end namespace morpheo             
51#endif
Note: See TracBrowser for help on using the repository browser.