Changeset 62 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp
- Timestamp:
- Dec 4, 2007, 2:31:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp
r55 r62 37 37 38 38 for (uint32_t i = 0; i < _param->_nb_port_read; i++) 39 vhdl->set_body ("out_READ_"+toString(i)+"_DATA <= reg_DATA (conv_integer(in_READ_"+toString(i)+"_ADDRESS)) when in_READ_"+toString(i)+"_VAL = '1' else "+std_logic_others(_param->_size_word,0)+";"); 39 { 40 string str_address; 41 if (_param->_have_port_address) 42 str_address = "conv_integer(in_READ_"+toString(i)+"_ADDRESS)"; 43 else 44 str_address = "0"; 40 45 46 vhdl->set_body ("out_READ_"+toString(i)+"_DATA <= reg_DATA ("+str_address+") when in_READ_"+toString(i)+"_VAL = '1' else "+std_logic_others(_param->_size_word,0)+";"); 47 } 41 48 for (uint32_t i = 0; i < _param->_nb_port_read_write; i++) 42 vhdl->set_body ("out_READ_WRITE_"+toString(i)+"_RDATA <= reg_DATA (conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)) when in_READ_WRITE_"+toString(i)+"_VAL = '1' and in_READ_WRITE_"+toString(i)+"_RW = '"+toString(RW_READ)+"' else "+std_logic_others(_param->_size_word,0)+";"); 49 { 50 string str_address; 51 if (_param->_have_port_address) 52 str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)"; 53 else 54 str_address = "0"; 55 vhdl->set_body ("out_READ_WRITE_"+toString(i)+"_RDATA <= reg_DATA ("+str_address+") when in_READ_WRITE_"+toString(i)+"_VAL = '1' and in_READ_WRITE_"+toString(i)+"_RW = '"+toString(RW_READ)+"' else "+std_logic_others(_param->_size_word,0)+";"); 56 } 43 57 44 58 vhdl->set_body (""); … … 54 68 for (uint32_t i = 0; i < _param->_nb_port_write; i++) 55 69 { 56 vhdl->set_body ("\t\tif (in_WRITE_"+toString(i)+"_VAL = '1') then"); 57 vhdl->set_body ("\t\t\treg_DATA(conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)) <= in_WRITE_"+toString(i)+"_DATA;"); 58 vhdl->set_body ("\t\tend if;"); 70 string str_address; 71 if (_param->_have_port_address) 72 str_address = "conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)"; 73 else 74 str_address = "0"; 75 76 vhdl->set_body ("\t\tif (in_WRITE_"+toString(i)+"_VAL = '1') then"); 77 vhdl->set_body ("\t\t\treg_DATA("+str_address+") <= in_WRITE_"+toString(i)+"_DATA;"); 78 vhdl->set_body ("\t\tend if;"); 59 79 } 60 80 for (uint32_t i = 0; i < _param->_nb_port_read_write; i++) 61 81 { 62 vhdl->set_body ("\t\tif (in_READ_WRITE_"+toString(i)+"_VAL = '1' and in_READ_WRITE_"+toString(i)+"_RW = '"+toString(RW_WRITE)+"') then"); 63 vhdl->set_body ("\t\t\treg_DATA(conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)) <= in_READ_WRITE_"+toString(i)+"_WDATA;"); 64 vhdl->set_body ("\t\tend if;"); 82 string str_address; 83 if (_param->_have_port_address) 84 str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)"; 85 else 86 str_address = "0"; 87 88 vhdl->set_body ("\t\tif (in_READ_WRITE_"+toString(i)+"_VAL = '1' and in_READ_WRITE_"+toString(i)+"_RW = '"+toString(RW_WRITE)+"') then"); 89 vhdl->set_body ("\t\t\treg_DATA("+str_address+") <= in_READ_WRITE_"+toString(i)+"_WDATA;"); 90 vhdl->set_body ("\t\tend if;"); 65 91 } 66 92
Note: See TracChangeset
for help on using the changeset viewer.