source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_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.5 KB
Line 
1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace victim {
15namespace victim_pseudo_lru {
16
17
18  void Victim_Pseudo_LRU::vhdl_port (Vhdl & vhdl)
19  {
20    vhdl.set_port ("in_CLOCK ", IN, 1);
21    vhdl.set_port ("in_NRESET", IN, 1);
22
23    for (uint32_t i = 0; i < _param._nb_access; i ++)
24      {
25        vhdl.set_port (" in_ACCESS_VAL_"+toString(i)+"     ",IN ,std_logic(1));
26        vhdl.set_port ("out_ACCESS_ACK_"+toString(i)+"     ",OUT,std_logic(1));
27        if (_param._size_table>1)
28          vhdl.set_port (" in_ACCESS_ADDRESS_"+toString(i)+" ",IN ,std_logic(static_cast<uint32_t>(log2(_param._size_table))));
29        vhdl.set_port ("out_ACCESS_ENTITY_"+toString(i)+"  ",OUT,std_logic(static_cast<uint32_t>(log2(_param._nb_entity))));
30      }
31
32    for (uint32_t i = 0; i < _param._nb_update; i ++)
33      {
34        vhdl.set_port (" in_UPDATE_VAL_"+toString(i)+"     ",IN ,std_logic(1));
35        vhdl.set_port ("out_UPDATE_ACK_"+toString(i)+"     ",OUT,std_logic(1));
36        if (_param._size_table>1)
37          vhdl.set_port (" in_UPDATE_ADDRESS_"+toString(i)+" ",IN ,std_logic(static_cast<uint32_t>(log2(_param._size_table))));
38        vhdl.set_port (" in_UPDATE_ENTITY_"+toString(i)+"  ",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_entity))));
39      }
40  };
41
42}; // end namespace victim_pseudo_lru
43}; // end namespace victim
44}; // end namespace generic
45
46}; // end namespace behavioural
47}; // end namespace morpheo             
48#endif
Note: See TracBrowser for help on using the repository browser.