Ignore:
Timestamp:
Dec 4, 2007, 2:31:54 PM (17 years ago)
Author:
rosiere
Message:

Modification en profondeur de Component-port_map.
Compilation ok pour Register_unit ... a tester (systemC et vhdl)

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  
    3737   
    3838    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";
    4045
     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      }
    4148    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      }
    4357
    4458    vhdl->set_body ("");
     
    5468    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
    5569      {
    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;");
    5979      }
    6080    for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
    6181      {
    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;");
    6591      }
    6692
Note: See TracChangeset for help on using the changeset viewer.