source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_vhdl_port.cpp @ 9

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

Banc de registres

  • ajout de 2 ports additionnels inutiles (reset et ack) mais nécessaire pour uniformisé les différentes version du banc de registres
File size: 1.5 KB
Line 
1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/RegisterFile/include/RegisterFile.h"
10
11namespace morpheo                    {
12namespace behavioural                {
13namespace generic                    {
14namespace registerfile               {
15
16  void RegisterFile::vhdl_port (Vhdl & vhdl)
17  {
18    vhdl.set_port ("in_CLOCK" , IN, 1);
19    vhdl.set_port ("in_NRESET", IN, 1);
20
21    for (uint32_t i = 0; i < _param._nb_port_read; i ++)
22      {
23        vhdl.set_port (" in_READ_VAL_"+toString(i)+"    ",IN ,std_logic(1)                    );
24        vhdl.set_port ("out_READ_ACK_"+toString(i)+"    ",OUT,std_logic(1)                    );
25        vhdl.set_port (" in_READ_ADDRESS_"+toString(i)+"",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_word))));
26        vhdl.set_port ("out_READ_DATA_"+toString(i)+"   ",OUT,std_logic(_param._size_word    ));
27      }
28
29    for (uint32_t i = 0; i < _param._nb_port_write; i ++)
30      {
31        vhdl.set_port (" in_WRITE_VAL_"+toString(i)+"    ",IN ,std_logic(1)                    );
32        vhdl.set_port ("out_WRITE_ACK_"+toString(i)+"    ",OUT,std_logic(1)                    );
33        vhdl.set_port (" in_WRITE_ADDRESS_"+toString(i)+"",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_word))));
34        vhdl.set_port (" in_WRITE_DATA_"+toString(i)+"   ",IN ,std_logic(_param._size_word    ));
35      }
36  };
37
38}; // end namespace registerfile
39}; // end namespace generic
40}; // end namespace behavioural         
41}; // end namespace morpheo             
42#endif
Note: See TracBrowser for help on using the repository browser.