source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp @ 65

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

register_unit : systemc et VHDL ok

File size: 1.2 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
11
12#include <sstream>
13using namespace std;
14
15namespace morpheo              {
16namespace behavioural          {
17 
18#undef  FUNCTION
19#define FUNCTION "Vhdl::set_body_component_port_map"
20  void Vhdl::set_body_component_port_map (list<string> & list_port_map      ,
21                                          string         name_port          ,
22                                          uint32_t       size_port          ,
23                                          string         name_signal        ,
24                                          uint32_t       size_signal        )
25  {
26    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
27
28    if (size_port > size_signal)
29      throw (ErrorMorpheo ("<Vhdl::set_body_component_port_map> size of port '"+name_port+"' ("+toString(size_port)+") is greater than size of signal '"+name_signal+"' ("+toString(size_signal)+")."));
30
31    string str_size = "";
32
33    // test if size is different (possible if multi write
34    if (size_port != size_signal)
35      str_size = std_logic_range(size_port);
36   
37    set_list(list_port_map, name_port + "\t=>" + name_signal+str_size);
38     
39    log_printf(FUNC,Behavioural,FUNCTION,"End");
40  };
41 
42}; // end namespace behavioural         
43}; // end namespace morpheo             
44
45#endif
Note: See TracBrowser for help on using the repository browser.