Changeset 137 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Feb 16, 2010, 1:35:48 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Files:
-
- 14 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h
r88 r137 22 22 { 23 23 //-----[ fields ]------------------------------------------------------------ 24 public : constuint32_t _size_data;25 public : constuint32_t _nb_port ;26 public : constuint32_t _data_max ;24 public : uint32_t _size_data; 25 public : uint32_t _nb_port ; 26 public : uint32_t _data_max ; 27 27 28 28 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp
r113 r137 16 16 Parameters::Parameters (uint32_t size_data, 17 17 uint32_t nb_port ): 18 behavioural::Parameters("Counter"), 19 _size_data(size_data), 20 _nb_port (nb_port ), 21 _data_max ((1<<size_data)-1) 18 behavioural::Parameters("Counter") 22 19 { 23 20 log_printf(FUNC,Counter,"Parameters","Begin"); 21 22 _size_data = size_data; 23 _nb_port = nb_port ; 24 _data_max = (1<<size_data)-1; 25 24 26 test(); 25 27 log_printf(FUNC,Counter,"Parameters","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/mkf.info
r116 r137 1 1 2 # Queue_0 03 target_dep all Queue_0 0.ngc4 target_dep Queue_0 0.ngc Queue_00.prj5 target_dep Queue_0 0.prj Queue_00_Pack.vhdl Queue_00.vhdl2 # Queue_0 3 target_dep all Queue_0.ngc 4 target_dep Queue_0.ngc Queue_0.prj 5 target_dep Queue_0.prj Queue_0_Pack.vhdl Queue_0.vhdl 6 6 7 # Queue_ 018 target_dep all Queue_ 01.ngc9 target_dep Queue_ 01.ngc Queue_01.prj10 target_dep Queue_ 01.prj Queue_01_Pack.vhdl Queue_01.vhdl7 # Queue_1 8 target_dep all Queue_1.ngc 9 target_dep Queue_1.ngc Queue_1.prj 10 target_dep Queue_1.prj Queue_1_Pack.vhdl Queue_1.vhdl 11 11 12 # Queue_ 0213 target_dep all Queue_ 02.ngc14 target_dep Queue_ 02.ngc Queue_02.prj15 target_dep Queue_ 02.prj Queue_02_Pack.vhdl Queue_02.vhdl12 # Queue_2 13 target_dep all Queue_2.ngc 14 target_dep Queue_2.ngc Queue_2.prj 15 target_dep Queue_2.prj Queue_2_Pack.vhdl Queue_2.vhdl 16 16 17 # Queue_ 0318 target_dep all Queue_ 03.ngc19 target_dep Queue_ 03.ngc Queue_03.prj20 target_dep Queue_ 03.prj Queue_03_Pack.vhdl Queue_03.vhdl17 # Queue_3 18 target_dep all Queue_3.ngc 19 target_dep Queue_3.ngc Queue_3.prj 20 target_dep Queue_3.prj Queue_3_Pack.vhdl Queue_3.vhdl 21 21 22 # Queue_0423 target_dep all Queue_04.ngc24 target_dep Queue_04.ngc Queue_04.prj25 target_dep Queue_04.prj Queue_04_Pack.vhdl Queue_04.vhdl26 27 # Queue_0528 target_dep all Queue_05.ngc29 target_dep Queue_05.ngc Queue_05.prj30 target_dep Queue_05.prj Queue_05_Pack.vhdl Queue_05.vhdl31 32 # Queue_0633 target_dep all Queue_06.ngc34 target_dep Queue_06.ngc Queue_06.prj35 target_dep Queue_06.prj Queue_06_Pack.vhdl Queue_06.vhdl36 37 # Queue_0738 target_dep all Queue_07.ngc39 target_dep Queue_07.ngc Queue_07.prj40 target_dep Queue_07.prj Queue_07_Pack.vhdl Queue_07.vhdl41 42 # Queue_0843 target_dep all Queue_08.ngc44 target_dep Queue_08.ngc Queue_08.prj45 target_dep Queue_08.prj Queue_08_Pack.vhdl Queue_08.vhdl46 47 # Queue_0948 target_dep all Queue_09.ngc49 target_dep Queue_09.ngc Queue_09.prj50 target_dep Queue_09.prj Queue_09_Pack.vhdl Queue_09.vhdl51 52 # Queue_1053 target_dep all Queue_10.ngc54 target_dep Queue_10.ngc Queue_10.prj55 target_dep Queue_10.prj Queue_10_Pack.vhdl Queue_10.vhdl56 57 # Queue_1158 target_dep all Queue_11.ngc59 target_dep Queue_11.ngc Queue_11.prj60 target_dep Queue_11.prj Queue_11_Pack.vhdl Queue_11.vhdl61 62 # Queue_1263 target_dep all Queue_12.ngc64 target_dep Queue_12.ngc Queue_12.prj65 target_dep Queue_12.prj Queue_12_Pack.vhdl Queue_12.vhdl66 67 # Queue_1368 target_dep all Queue_13.ngc69 target_dep Queue_13.ngc Queue_13.prj70 target_dep Queue_13.prj Queue_13_Pack.vhdl Queue_13.vhdl71 72 # Queue_1473 target_dep all Queue_14.ngc74 target_dep Queue_14.ngc Queue_14.prj75 target_dep Queue_14.prj Queue_14_Pack.vhdl Queue_14.vhdl76 77 # Queue_1578 target_dep all Queue_15.ngc79 target_dep Queue_15.ngc Queue_15.prj80 target_dep Queue_15.prj Queue_15_Pack.vhdl Queue_15.vhdl81 82 # Queue_1683 target_dep all Queue_16.ngc84 target_dep Queue_16.ngc Queue_16.prj85 target_dep Queue_16.prj Queue_16_Pack.vhdl Queue_16.vhdl86 87 # Queue_1788 target_dep all Queue_17.ngc89 target_dep Queue_17.ngc Queue_17.prj90 target_dep Queue_17.prj Queue_17_Pack.vhdl Queue_17.vhdl91 92 # Queue_1893 target_dep all Queue_18.ngc94 target_dep Queue_18.ngc Queue_18.prj95 target_dep Queue_18.prj Queue_18_Pack.vhdl Queue_18.vhdl96 97 # Queue_1998 target_dep all Queue_19.ngc99 target_dep Queue_19.ngc Queue_19.prj100 target_dep Queue_19.prj Queue_19_Pack.vhdl Queue_19.vhdl101 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_allocation.cpp
r113 r137 31 31 32 32 _usage = USE_ALL; 33 //_usage = usage_unset(_usage,USE_SYSTEMC );33 _usage = usage_unset(_usage,USE_SYSTEMC ); 34 34 // _usage = usage_unset(_usage,USE_VHDL ); 35 35 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h
r101 r137 22 22 { 23 23 //-----[ fields ]------------------------------------------------------------ 24 public : constuint32_t _size_queue ;25 public : constuint32_t _size_data ;26 public : constuint32_t _nb_port_slot ;27 public : constbool _have_port_ptr_write;28 public : constbool _have_port_ptr_read ;24 public : uint32_t _size_queue ; 25 public : uint32_t _size_data ; 26 public : uint32_t _nb_port_slot ; 27 public : bool _have_port_ptr_write; 28 public : bool _have_port_ptr_read ; 29 29 30 public : constuint32_t _size_ptr ;31 public : constbool _have_port_ptr ;30 public : uint32_t _size_ptr ; 31 public : bool _have_port_ptr ; 32 32 33 33 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp
r113 r137 21 21 bool have_port_ptr_write, 22 22 bool have_port_ptr_read ): 23 behavioural::Parameters("Queue"), 24 _size_queue (size_queue), 25 _size_data (size_data ), 26 _nb_port_slot (nb_port_slot), 27 _have_port_ptr_write (have_port_ptr_write and (log2(size_queue)>0)), 28 _have_port_ptr_read (have_port_ptr_read and (log2(size_queue)>0)), 29 _size_ptr (log2(size_queue)), 30 _have_port_ptr (have_port_ptr_write or have_port_ptr_read) 23 behavioural::Parameters("Queue") 31 24 { 32 25 log_printf(FUNC,Queue,FUNCTION,"Begin"); 26 27 _size_queue = size_queue; 28 _size_data = size_data ; 29 _nb_port_slot = nb_port_slot; 30 _have_port_ptr_write = have_port_ptr_write and (log2(size_queue)>0); 31 _have_port_ptr_read = have_port_ptr_read and (log2(size_queue)>0); 32 33 _size_ptr = log2(size_queue); 34 _have_port_ptr = have_port_ptr_write or have_port_ptr_read; 35 33 36 test(); 34 37 log_printf(FUNC,Queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h
r101 r137 21 21 class Parameters : public morpheo::behavioural::Parameters 22 22 { 23 public : const uint32_t _nb_port_read ; 24 public : const uint32_t _nb_port_write; 25 public : const uint32_t _nb_port_read_write; 26 public : const uint32_t _nb_word ; 27 public : const uint32_t _size_word ; 28 public : const uint32_t _size_address ; 29 public : const bool _have_port_address; 30 public : const bool _have_init_value; 31 public : const std::string _init_value; 23 public : uint32_t _nb_port_read ; 24 public : uint32_t _nb_port_write; 25 public : uint32_t _nb_port_read_write; 26 public : uint32_t _nb_word ; 27 public : uint32_t _size_word ; 28 public : std::string _init_value ; 29 30 public : uint32_t _size_address ; 31 public : bool _have_port_address; 32 public : bool _have_init_value; 32 33 33 34 public : Parameters (uint32_t nb_port_read , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp
r101 r137 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h" 9 #include "Common/include/Log2.h" 9 10 10 11 namespace morpheo { … … 20 21 uint32_t size_word , 21 22 std::string init_value 22 ) : 23 _nb_port_read (nb_port_read ), 24 _nb_port_write (nb_port_write), 25 _nb_port_read_write(nb_port_read_write), 26 _nb_word (nb_word ), 27 _size_word (size_word ), 28 _size_address (static_cast<uint32_t>(log2(_nb_word))), 29 _have_port_address (_size_address != 0), 30 _have_init_value (init_value != ""), 31 _init_value (init_value) 23 ) 32 24 { 25 _nb_port_read = nb_port_read ; 26 _nb_port_write = nb_port_write; 27 _nb_port_read_write = nb_port_read_write; 28 _nb_word = nb_word ; 29 _size_word = size_word ; 30 _init_value = init_value ; 31 32 _size_address = log2(_nb_word); 33 _have_port_address = _size_address != 0; 34 _have_init_value = init_value != ""; 35 33 36 test(); 34 37 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h
r124 r137 24 24 { 25 25 //-----[ fields ]------------------------------------------------------------ 26 public : const uint32_t _nb_port_read ; // Global read port 27 public : const uint32_t _nb_port_write ; // Global write port 28 public : const uint32_t _nb_word ; 29 public : const uint32_t _size_word ; 30 public : const uint32_t _nb_bank ; // Number of bank (All bank is identical) 31 public : const uint32_t _nb_port_read_by_bank ; // Local read port 32 public : const uint32_t _nb_port_write_by_bank; // Local write port 33 public : const Tcrossbar_t _crossbar ; 34 public : const bool _have_init_value; 35 public : const std::string _init_value; 26 public : uint32_t _nb_port_read ; // Global read port 27 public : uint32_t _nb_port_write ; // Global write port 28 public : uint32_t _nb_word ; 29 public : uint32_t _size_word ; 30 public : uint32_t _nb_bank ; // Number of bank (All bank is identical) 31 public : uint32_t _nb_port_read_by_bank ; // Local read port 32 public : uint32_t _nb_port_write_by_bank; // Local write port 33 public : Tcrossbar_t _crossbar ; 34 public : std::string _init_value ; 36 35 37 public : constuint32_t _size_address ;38 public : constuint32_t _size_address_by_bank ;36 public : uint32_t _size_address ; 37 public : uint32_t _size_address_by_bank ; 39 38 40 public : constuint32_t _bank_shift ;41 public : constTaddress_t _bank_mask ;42 public : constuint32_t _num_reg_shift ;43 public : constTaddress_t _num_reg_mask ;39 public : uint32_t _bank_shift ; 40 public : Taddress_t _bank_mask ; 41 public : uint32_t _num_reg_shift ; 42 public : Taddress_t _num_reg_mask ; 44 43 45 public : constuint32_t _nb_word_by_bank ;44 public : uint32_t _nb_word_by_bank ; 46 45 47 public : const bool _have_port_address ; 48 public : const bool _have_bank_port_address; 46 public : bool _have_port_address ; 47 public : bool _have_bank_port_address; 48 public : bool _have_init_value ; 49 49 50 50 // A lot of table to the partial crossbar 51 public : 52 //public : 53 public : 54 //public : 51 public : uint32_t * _link_port_read_to_bank_read ; 52 //public : uint32_t * _link_port_read_to_num_bank ; 53 public : uint32_t * _link_port_write_to_bank_write; 54 //public : uint32_t * _link_port_write_to_num_bank ; 55 55 56 56 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r88 r137 48 48 #ifdef STATISTICS 49 49 public : Stat * _stat; 50 51 private : counter_t * _stat_nb_read; 52 private : counter_t * _stat_nb_write; 53 private : counter_t * _stat_nb_conflict_on_read; 54 private : counter_t * _stat_nb_conflict_on_write; 50 55 #endif 51 56 … … 80 85 private : Taddress_t * internal_WRITE_BANK; 81 86 private : Taddress_t * internal_WRITE_NUM_REG; 87 88 #ifdef STATISTICS 89 private : bool * internal_READ_VAL; 90 //private : Taddress_t * internal_READ_BANK; 91 #endif 82 92 83 93 // function pointer -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters.cpp
r124 r137 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h" 9 9 #include "Common/include/BitManipulation.h" 10 #include "Common/include/Log2.h" 10 11 11 12 namespace morpheo { … … 25 26 Tcrossbar_t crossbar , 26 27 std::string init_value 27 ): 28 _nb_port_read (nb_port_read ), 29 _nb_port_write (nb_port_write ), 30 _nb_word (nb_word ), 31 _size_word (size_word ), 32 _nb_bank (nb_bank ), 33 _nb_port_read_by_bank (nb_port_read_by_bank ), 34 _nb_port_write_by_bank (nb_port_write_by_bank), 35 _crossbar (crossbar ), 36 _have_init_value (init_value != "" ), 37 _init_value (init_value ), 38 _size_address (static_cast<uint32_t>(ceil(log2(_nb_word)))), 39 _size_address_by_bank (_size_address - static_cast<uint32_t>(ceil(log2(_nb_bank)))), 28 ) 29 { 30 log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters","Begin"); 31 32 _nb_port_read = nb_port_read ; 33 _nb_port_write = nb_port_write ; 34 _nb_word = nb_word ; 35 _size_word = size_word ; 36 _nb_bank = nb_bank ; 37 _nb_port_read_by_bank = nb_port_read_by_bank ; 38 _nb_port_write_by_bank = nb_port_write_by_bank; 39 _crossbar = crossbar ; 40 _init_value = init_value ; 41 42 _size_address = log2(_nb_word); 43 _size_address_by_bank = _size_address - log2(_nb_bank); 40 44 41 45 // Address : [....................] [size_address-1:0] 42 46 // Bank : [....] [size_address-1:size_address-1-log2(nb_bank)] 43 47 // num_reg : ]...............] [size_address-2-log2(nb_bank):0] 44 _bank_shift (_size_address_by_bank), 45 _bank_mask (gen_mask<Taddress_t>(static_cast<Taddress_t>(ceil(log2(_nb_bank))))), 46 _num_reg_shift (0), 47 _num_reg_mask (gen_mask<Taddress_t>(_size_address_by_bank)), 48 _nb_word_by_bank (_nb_word / _nb_bank), 49 _have_port_address (_size_address != 0), 50 _have_bank_port_address(_size_address_by_bank != 0) 51 { 52 log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters","Begin"); 48 _bank_shift = _size_address_by_bank; 49 _bank_mask = gen_mask<Taddress_t>(log2(_nb_bank)); 50 _num_reg_shift = 0; 51 _num_reg_mask = gen_mask<Taddress_t>(_size_address_by_bank); 52 _nb_word_by_bank = _nb_word / _nb_bank; 53 _have_port_address = _size_address != 0; 54 _have_bank_port_address = _size_address_by_bank != 0; 55 _have_init_value = init_value != "" ; 53 56 54 57 if (_crossbar == PARTIAL_CROSSBAR) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r112 r137 77 77 ALLOC1(internal_WRITE_BANK ,Taddress_t,_param->_nb_port_write); 78 78 ALLOC1(internal_WRITE_NUM_REG,Taddress_t,_param->_nb_port_write); 79 80 #ifdef STATISTICS 81 ALLOC1(internal_READ_VAL ,bool ,_param->_nb_port_read); 82 #endif 79 83 } 80 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp
r112 r137 40 40 DELETE1(internal_WRITE_BANK ,_param->_nb_port_write); 41 41 DELETE1(internal_WRITE_NUM_REG ,_param->_nb_port_write); 42 43 #ifdef STATISTICS 44 DELETE1(internal_READ_VAL ,_param->_nb_port_read); 45 #endif 46 42 47 } 43 48 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_genMealy_read.cpp
r123 r137 38 38 bool ack = false; 39 39 40 #ifdef STATISTICS 41 internal_READ_VAL [i] = false; 42 #endif 43 40 44 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * read [%d] : %d",i,val); 41 45 … … 72 76 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * data : %d",data); 73 77 78 #ifdef STATISTICS 79 internal_READ_VAL [i] = true; 80 #endif 74 81 PORT_WRITE(out_READ_DATA [i], data); 75 82 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_genMealy_read.cpp
r123 r137 37 37 bool ack = false; 38 38 39 #ifdef STATISTICS 40 internal_READ_VAL [i] = false; 41 #endif 42 39 43 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * read [%d] : %d",i,val); 40 44 … … 73 77 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * data : %d",data); 74 78 79 #ifdef STATISTICS 80 internal_READ_VAL [i] = true; 81 #endif 82 75 83 PORT_WRITE(out_READ_DATA [i], data); 76 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_statistics_declaration.cpp
r81 r137 24 24 "RegisterFile_Multi_Banked", 25 25 param_statistics); 26 27 // _stat_nb_read = _stat->create_variable("nb_read" ); 28 // _stat_nb_write = _stat->create_variable("nb_write"); 29 // _stat_nb_conflict_on_read = _stat->create_variable("nb_conflict_on_read" ); 30 // _stat_nb_conflict_on_write = _stat->create_variable("nb_conflict_on_write"); 31 32 _stat_nb_read = _stat->create_counter("nb_read" ,"",""); 33 _stat_nb_write = _stat->create_counter("nb_write" ,"",""); 34 _stat_nb_conflict_on_read = _stat->create_counter("nb_conflict_on_read" ,"",""); 35 _stat_nb_conflict_on_write = _stat->create_counter("nb_conflict_on_write","",""); 36 37 _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); 38 _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); 39 40 _stat->create_expr_percent ("percent_conflict_on_read" , "nb_conflict_on_read" , "+ nb_read nb_conflict_on_read" , _("Percent conflit on read port" )); 41 _stat->create_expr_percent ("percent_conflict_on_write", "nb_conflict_on_write", "+ nb_write nb_conflict_on_write", _("Percent conflit on write port")); 26 42 27 43 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r128 r137 51 51 reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data; 52 52 } 53 54 #ifdef STATISTICS 55 if (usage_is_set(_usage,USE_STATISTICS)) 56 if (PORT_READ(in_WRITE_VAL [i])) 57 { 58 if (internal_WRITE_VAL [i] == 1) 59 (*_stat_nb_write) ++; 60 else 61 (*_stat_nb_conflict_on_write) ++; 62 } 63 #endif 53 64 } 65 66 #ifdef STATISTICS 67 if (usage_is_set(_usage,USE_STATISTICS)) 68 for (uint32_t i=0; i<_param->_nb_port_read; i++) 69 if (PORT_READ(in_READ_VAL [i])) 70 { 71 if (internal_READ_VAL [i] == 1) 72 (*_stat_nb_read) ++; 73 else 74 (*_stat_nb_conflict_on_read) ++; 75 } 76 #endif 77 54 78 } 55 79 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl_body.cpp
r81 r137 88 88 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 89 89 90 vhdl->set_body("\t"+separator+" in_ VAL_"+toString(k)+"\t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");91 vhdl->set_body("\t,out_ ACK_"+toString(k)+"\t=>\tinternal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");90 vhdl->set_body("\t"+separator+" in_"+toString(k)+"_VAL \t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); 91 vhdl->set_body("\t,out_"+toString(k)+"_ACK \t=>\tinternal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); 92 92 } 93 93 vhdl->set_body(");"); … … 107 107 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 108 108 109 vhdl->set_body("\t"+separator+" in_ VAL_"+toString(k)+"\t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");110 vhdl->set_body("\t,out_ ACK_"+toString(k)+"\t=>\tinternal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");109 vhdl->set_body("\t"+separator+" in_"+toString(k)+"_VAL \t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); 110 vhdl->set_body("\t,out_"+toString(k)+"_ACK \t=>\tinternal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); 111 111 } 112 112 vhdl->set_body(");"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp
r131 r137 26 26 Tusage_t _usage = USE_ALL; 27 27 28 //_usage = usage_unset(_usage,USE_SYSTEMC );28 _usage = usage_unset(_usage,USE_SYSTEMC ); 29 29 // _usage = usage_unset(_usage,USE_VHDL ); 30 30 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h
r88 r137 26 26 { 27 27 //-----[ fields ]------------------------------------------------------------ 28 public : constTinstance_t _instance;29 public : constuint32_t _nb_port_read ;30 public : constuint32_t _nb_port_write;31 public : constuint32_t _nb_word ;32 public : constuint32_t _size_word ;33 public : constuint32_t _size_address ;34 public : constbool _have_port_address;28 public : Tinstance_t _instance; 29 public : uint32_t _nb_port_read ; 30 public : uint32_t _nb_port_write; 31 public : uint32_t _nb_word ; 32 public : uint32_t _size_word ; 33 public : uint32_t _size_address ; 34 public : bool _have_port_address; 35 35 36 36 public : morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * _param_registerfile_monolithic; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters.cpp
r88 r137 14 14 15 15 16 Parameters::Parameters (morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * param) : 17 _instance (instance_RegisterFile_Monolithic), 18 _nb_port_read (param->_nb_port_read ), 19 _nb_port_write (param->_nb_port_write), 20 _nb_word (param->_nb_word ), 21 _size_word (param->_size_word ), 22 _size_address (param->_size_address ), 23 _have_port_address (param->_have_port_address) 16 Parameters::Parameters (morpheo::behavioural::generic::registerfile::registerfile_monolithic ::Parameters * param) 24 17 { 25 18 log_printf(FUNC,RegisterFile,"Parameters","Begin"); 19 20 _instance = instance_RegisterFile_Monolithic; 21 _nb_port_read = param->_nb_port_read ; 22 _nb_port_write = param->_nb_port_write; 23 _nb_word = param->_nb_word ; 24 _size_word = param->_size_word ; 25 _size_address = param->_size_address ; 26 _have_port_address = param->_have_port_address; 26 27 27 28 _param_registerfile_monolithic = param; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h
r88 r137 22 22 { 23 23 //-----[ fields ]------------------------------------------------------------ 24 public : const uint32_t _nb_entity ; 25 public : const bool _encoding_one_hot; 26 public : const bool _encoding_compact; 27 public : const uint32_t _size_entity; 24 public : uint32_t _nb_entity ; 25 public : bool _encoding_one_hot; 26 public : bool _encoding_compact; 27 28 public : uint32_t _size_entity; 28 29 29 30 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters.cpp
r88 r137 7 7 8 8 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h" 9 #include "Common/include/Log2.h" 9 10 10 11 namespace morpheo { … … 17 18 Parameters::Parameters (uint32_t nb_entity , 18 19 bool encoding_one_hot, 19 bool encoding_compact): 20 _nb_entity (nb_entity ), 21 _encoding_one_hot (encoding_one_hot), 22 _encoding_compact (encoding_compact), 23 _size_entity (static_cast<uint32_t> (ceil(log2(nb_entity)))) 20 bool encoding_compact) 24 21 { 25 22 log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin"); 23 24 _nb_entity = nb_entity ; 25 _encoding_one_hot = encoding_one_hot; 26 _encoding_compact = encoding_compact; 27 _size_entity = log2(nb_entity); 28 26 29 test(); 27 30 log_printf(FUNC,Select_Priority_Fixed,"Parameters","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_body.cpp
r81 r137 24 24 for (uint32_t i=0; i<_param->_nb_entity; i++) 25 25 { 26 vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,i)+" when in_ VAL_"+toString(i)+"='1' else");26 vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,i)+" when in_"+toString(i)+"_VAL='1' else"); 27 27 } 28 28 vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,1<<_param->_size_entity)+";"); … … 32 32 { 33 33 for (uint32_t i=0; i<_param->_nb_entity; i++) 34 vhdl->set_body("out_ ACK_"+toString(i)+"<= '1' when internal_entity"+std_logic_range(_param->_size_entity+1)+" = "+std_logic_conv(_param->_size_entity+1,i)+" else '0';");34 vhdl->set_body("out_"+toString(i)+"_ACK <= '1' when internal_entity"+std_logic_range(_param->_size_entity+1)+" = "+std_logic_conv(_param->_size_entity+1,i)+" else '0';"); 35 35 vhdl->set_body (""); 36 36 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r112 r137 21 21 { 22 22 //-----[ fields ]------------------------------------------------------------ 23 public : constuint32_t _size_data ;24 public : constuint32_t _nb_port ;25 public : constuint32_t _shift_value ; // 0 = external shifter's value26 public : constrotate_t _rotate ;27 public : constdirection_t _direction ;28 public : c onst carry_t _carry ;29 public : constuint32_t _size_data_completion;30 public : constbool _type_completion_bool;23 public : uint32_t _size_data ; 24 public : uint32_t _nb_port ; 25 public : uint32_t _shift_value ; // 0 = external shifter's value 26 public : rotate_t _rotate ; 27 public : direction_t _direction ; 28 public : carry_t _carry ; 29 public : uint32_t _size_data_completion; 30 public : bool _type_completion_bool; 31 31 32 public : constuint32_t _size_shift ;32 public : uint32_t _size_shift ; 33 33 34 public : constbool _internal_direction;35 public : constbool _internal_type ;36 public : constbool _internal_carry ;34 public : bool _internal_direction; 35 public : bool _internal_type ; 36 public : bool _internal_carry ; 37 37 38 public : constbool _have_shift_logic_left ;39 public : constbool _have_shift_logic_right ;40 public : constbool _have_shift_logic ;41 public : constbool _have_shift_arithmetic_left ;42 public : constbool _have_shift_arithmetic_right ;43 public : constbool _have_shift_arithmetic ;44 public : constbool _have_shift ;45 public : constbool _have_rotate_left ;46 public : constbool _have_rotate_right ;47 public : constbool _have_rotate ;38 public : bool _have_shift_logic_left ; 39 public : bool _have_shift_logic_right ; 40 public : bool _have_shift_logic ; 41 public : bool _have_shift_arithmetic_left ; 42 public : bool _have_shift_arithmetic_right ; 43 public : bool _have_shift_arithmetic ; 44 public : bool _have_shift ; 45 public : bool _have_rotate_left ; 46 public : bool _have_rotate_right ; 47 public : bool _have_rotate ; 48 48 49 public : constbool _have_direction_left ;50 public : constbool _have_direction_right ;49 public : bool _have_direction_left ; 50 public : bool _have_direction_right ; 51 51 52 52 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp
r112 r137 20 20 direction_t direction , 21 21 carry_t carry , 22 bool type_completion_bool): 23 _size_data (size_data ), 24 _nb_port (nb_port ), 25 _shift_value (shift_value ), 26 _rotate (rotate ), 27 _direction (direction ), 28 _carry (carry ), 29 _size_data_completion ((carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value)), 30 _type_completion_bool (type_completion_bool), 22 bool type_completion_bool) 23 { 24 _size_data = size_data ; 25 _nb_port = nb_port ; 26 _shift_value = shift_value ; 27 _rotate = rotate ; 28 _direction = direction ; 29 _carry = carry ; 30 _size_data_completion = (carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value); 31 _type_completion_bool = type_completion_bool; 31 32 32 _size_shift (static_cast<uint32_t>(ceil(log2(_size_data)))), 33 _size_shift = static_cast<uint32_t>(ceil(log2(_size_data))); 34 35 _internal_direction = (direction == internal_right_shift)?_right :_left ; 36 _internal_type = (rotate == internal_rotate )?_rotate:_shift ; 37 _internal_carry = (carry == internal_logic )?_logic :_arithmetic; 33 38 34 _internal_direction ((direction == internal_right_shift)?_right :_left ), 35 _internal_type ((rotate == internal_rotate )?_rotate:_shift ), 36 _internal_carry ((carry == internal_logic )?_logic :_arithmetic), 39 _have_shift_logic_left = ((rotate != internal_rotate) && 40 (((carry == external_carry ) || 41 (carry == external_completion) || 42 (carry == internal_logic )) && 43 ((direction == external_direction ) || 44 (direction == internal_left_shift)))); 45 _have_shift_logic_right = ((rotate != internal_rotate) && 46 (((carry == external_carry ) || 47 (carry == external_completion) || 48 (carry == internal_logic )) && 49 ((direction == external_direction ) || 50 (direction == internal_right_shift)))); 51 _have_shift_logic = _have_shift_logic_left || _have_shift_logic_right; 37 52 38 _have_shift_logic_left ((rotate != internal_rotate) && 39 (((carry == external_carry ) || 40 (carry == external_completion) || 41 (carry == internal_logic )) && 42 ((direction == external_direction ) || 43 (direction == internal_left_shift)))), 44 _have_shift_logic_right ((rotate != internal_rotate) && 45 (((carry == external_carry ) || 46 (carry == external_completion) || 47 (carry == internal_logic )) && 48 ((direction == external_direction ) || 49 (direction == internal_right_shift)))), 50 _have_shift_logic (_have_shift_logic_left || _have_shift_logic_right), 53 _have_shift_arithmetic_left = ((rotate != internal_rotate) && 54 (((carry == external_carry ) || 55 (carry == internal_arithmetic )) && 56 ((direction == external_direction ) || 57 (direction == internal_left_shift)))); 58 _have_shift_arithmetic_right = ((rotate != internal_rotate) && 59 (((carry == external_carry ) || 60 (carry == internal_arithmetic )) && 61 ((direction == external_direction ) || 62 (direction == internal_right_shift)))); 63 _have_shift_arithmetic = _have_shift_arithmetic_left || _have_shift_arithmetic_right; 51 64 52 _have_shift_arithmetic_left ((rotate != internal_rotate) && 53 (((carry == external_carry ) || 54 (carry == internal_arithmetic )) && 55 ((direction == external_direction ) || 56 (direction == internal_left_shift)))), 57 _have_shift_arithmetic_right ((rotate != internal_rotate) && 58 (((carry == external_carry ) || 59 (carry == internal_arithmetic )) && 60 ((direction == external_direction ) || 61 (direction == internal_right_shift)))), 62 _have_shift_arithmetic (_have_shift_arithmetic_left || _have_shift_arithmetic_right), 65 _have_shift = _have_shift_logic || _have_shift_arithmetic; 63 66 64 _have_shift (_have_shift_logic || _have_shift_arithmetic), 67 _have_rotate_left = ((rotate != without_rotate) && 68 ((direction == external_direction ) || 69 (direction == internal_left_shift))); 70 _have_rotate_right = ((rotate != without_rotate) && 71 ((direction == external_direction ) || 72 (direction == internal_right_shift))); 73 _have_rotate = _have_rotate_left || _have_rotate_right; 74 75 _have_direction_left = (_have_shift_logic_left || 76 _have_shift_arithmetic_left || 77 _have_rotate_left ); 78 _have_direction_right = (_have_shift_logic_right || 79 _have_shift_arithmetic_right || 80 _have_rotate_right ); 65 81 66 _have_rotate_left ((rotate != without_rotate) &&67 ((direction == external_direction ) ||68 (direction == internal_left_shift))),69 _have_rotate_right ((rotate != without_rotate) &&70 ((direction == external_direction ) ||71 (direction == internal_right_shift))),72 _have_rotate ( _have_rotate_left || _have_rotate_right),73 74 _have_direction_left (_have_shift_logic_left ||75 _have_shift_arithmetic_left ||76 _have_rotate_left ),77 _have_direction_right (_have_shift_logic_right ||78 _have_shift_arithmetic_right ||79 _have_rotate_right )80 {81 82 test(); 82 83 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h
r88 r137 22 22 { 23 23 //-----[ fields ]------------------------------------------------------------ 24 public : constuint32_t _nb_entity ; // number of entity25 public : constuint32_t _nb_access ; // number of port to select an entity26 //public : constuint32_t _nb_update ; // number of port to update the internal entity27 public : constuint32_t _size_table; // Size of victim_pseudo_lru's table28 public : constbool _table_global;29 public : constuint32_t _size_address;24 public : uint32_t _nb_entity ; // number of entity 25 public : uint32_t _nb_access ; // number of port to select an entity 26 //public : uint32_t _nb_update ; // number of port to update the internal entity 27 public : uint32_t _size_table; // Size of victim_pseudo_lru's table 28 public : bool _table_global; 29 public : uint32_t _size_address; 30 30 31 31 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp
r88 r137 19 19 // uint32_t nb_update , 20 20 uint32_t size_table, 21 bool table_global): 22 _nb_entity (nb_entity ), 23 _nb_access (nb_access ), 24 // _nb_update (nb_update ), 25 _size_table ((table_global == true)?1:size_table), 26 _table_global (table_global), 27 _size_address (size_table) 21 bool table_global) 28 22 { 23 _nb_entity = nb_entity; 24 _nb_access = nb_access; 25 // _nb_update = nb_update; 26 _size_table = (table_global == true)?1:size_table; 27 _table_global = table_global; 28 29 _size_address = size_table; 30 29 31 test(); 30 32 };
Note: See TracChangeset
for help on using the changeset viewer.