Changeset 137 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed
- Timestamp:
- Feb 16, 2010, 1:35:48 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.