1 | #ifdef VHDL |
---|
2 | /* |
---|
3 | * $Id: Stat_List_unit_vhdl_declaration.cpp 135 2009-07-17 08:59:05Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace rename_unit { |
---|
17 | namespace register_translation_unit { |
---|
18 | namespace stat_list_unit { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Stat_List_unit::vhdl_declaration" |
---|
23 | void Stat_List_unit::vhdl_declaration (Vhdl * & vhdl) |
---|
24 | { |
---|
25 | log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | uint32_t size_bank = log2(_param->_nb_bank); |
---|
28 | uint32_t size_gpr_ptr = log2(_param->_nb_general_register_by_bank); |
---|
29 | uint32_t size_spr_ptr = log2(_param->_nb_special_register_by_bank); |
---|
30 | |
---|
31 | // bit 0 : _is_free |
---|
32 | // bit 1 : _is_link |
---|
33 | vhdl->set_type ("Tone_stat_list_gpr ", "array " + _std_logic_range(_param->_nb_general_register_by_bank) + " of " + std_logic(2)); |
---|
34 | vhdl->set_type ("Tstat_list_gpr ", "array " + _std_logic_range(_param->_nb_bank) + " of Tone_stat_list_gpr"); |
---|
35 | vhdl->set_signal("gpr_stat_list ", "Tstat_list_gpr"); |
---|
36 | |
---|
37 | vhdl->set_type ("Tone_stat_list_spr ", "array " + _std_logic_range(_param->_nb_special_register_by_bank) + " of " + std_logic(2)); |
---|
38 | vhdl->set_type ("Tstat_list_spr ", "array " + _std_logic_range(_param->_nb_bank) + " of Tone_stat_list_spr"); |
---|
39 | vhdl->set_signal("spr_stat_list ", "Tstat_list_spr"); |
---|
40 | |
---|
41 | if (size_gpr_ptr>0) |
---|
42 | vhdl->set_signal("reg_GPR_PTR_FREE ",size_gpr_ptr); |
---|
43 | if (size_spr_ptr>0) |
---|
44 | vhdl->set_signal("reg_SPR_PTR_FREE ",size_spr_ptr); |
---|
45 | |
---|
46 | for (uint32_t i=0; i<_param->_nb_inst_insert; i ++) |
---|
47 | vhdl->set_signal ("internal_INSERT_"+toString(i)+"_ACK",1); |
---|
48 | |
---|
49 | for (uint32_t i=0; i<_param->_nb_inst_retire; i ++) |
---|
50 | vhdl->set_signal ("internal_RETIRE_"+toString(i)+"_ACK",1); |
---|
51 | |
---|
52 | for (uint32_t i=0; i<_param->_nb_reg_free; i ++) |
---|
53 | { |
---|
54 | vhdl->set_signal ("internal_PUSH_GPR_"+toString(i)+"_VAL " ,1); |
---|
55 | if (size_bank>0) |
---|
56 | vhdl->set_signal ("internal_PUSH_GPR_"+toString(i)+"_NUM_BANK" ,size_bank); |
---|
57 | if (size_gpr_ptr>0) |
---|
58 | vhdl->set_signal ("internal_PUSH_GPR_"+toString(i)+"_NUM_REG " ,size_gpr_ptr); |
---|
59 | |
---|
60 | vhdl->set_signal ("internal_PUSH_SPR_"+toString(i)+"_VAL " ,1); |
---|
61 | if (size_bank>0) |
---|
62 | vhdl->set_signal ("internal_PUSH_SPR_"+toString(i)+"_NUM_BANK" ,size_bank); |
---|
63 | if (size_spr_ptr>0) |
---|
64 | vhdl->set_signal ("internal_PUSH_SPR_"+toString(i)+"_NUM_REG " ,size_spr_ptr); |
---|
65 | } |
---|
66 | |
---|
67 | log_printf(FUNC,Stat_List_unit,FUNCTION,"End"); |
---|
68 | }; |
---|
69 | |
---|
70 | }; // end namespace stat_list_unit |
---|
71 | }; // end namespace register_translation_unit |
---|
72 | }; // end namespace rename_unit |
---|
73 | }; // end namespace ooo_engine |
---|
74 | }; // end namespace multi_ooo_engine |
---|
75 | }; // end namespace core |
---|
76 | |
---|
77 | }; // end namespace behavioural |
---|
78 | }; // end namespace morpheo |
---|
79 | #endif |
---|