[2] | 1 | #ifdef VHDL |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * $Id: Vhdl_set_constant.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
| 5 | * |
---|
| 6 | * [ Description ] |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "Behavioural/include/Vhdl.h" |
---|
| 11 | |
---|
| 12 | #include <sstream> |
---|
| 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | namespace behavioural { |
---|
| 16 | |
---|
[43] | 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Vhdl::set_constant" |
---|
[71] | 19 | void Vhdl::set_constant (std::string name , |
---|
| 20 | std::string type , |
---|
| 21 | std::string init) |
---|
[2] | 22 | { |
---|
[43] | 23 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
[113] | 24 | |
---|
| 25 | test_architecture(); |
---|
| 26 | |
---|
| 27 | set_list(_architecture[_name_architecture]._list_type, "constant "+ name+"\t: "+type+"\t:= "+init); |
---|
| 28 | |
---|
[43] | 29 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 30 | }; |
---|
| 31 | |
---|
[71] | 32 | void Vhdl::set_constant (std::string name , |
---|
[95] | 33 | uint32_t size , |
---|
[71] | 34 | std::string init) |
---|
[2] | 35 | { |
---|
[43] | 36 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
[2] | 37 | set_constant(name,std_logic(size),init); |
---|
[43] | 38 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 39 | }; |
---|
| 40 | |
---|
[95] | 41 | void Vhdl::set_constant (std::string name , |
---|
[2] | 42 | uint32_t size , |
---|
| 43 | uint32_t init) |
---|
| 44 | { |
---|
[43] | 45 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
[95] | 46 | set_constant(name,std_logic(size),std_logic_cst(size,init)); |
---|
[43] | 47 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 48 | }; |
---|
| 49 | |
---|
| 50 | }; // end namespace behavioural |
---|
| 51 | }; // end namespace morpheo |
---|
| 52 | |
---|
| 53 | #endif |
---|