Ignore:
Timestamp:
Aug 8, 2012, 12:03:25 PM (12 years ago)
Author:
cfuguet
Message:

Introducing new CLEANUP transaction address specification in the components:

  • vci_cc_vcache_wrapper_v4
  • vci_mem_cache_v4

The new specification uses the VCI WDATA and the VCI BE to send the cleanup
nline. The VCI ADDRESS is like follows:

  • NLINE MSb | Memory Cache local ID | 00....00

The platforms:

  • tsarv4_mono_mmu
  • tsarv4_generic_mmu

has been modified to use the modified components and the mapping table for the coherence
address space has been updated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp

    r246 r247  
    273273    m_seglist(mtp.getSegmentList(vci_tgt_index)),
    274274    m_cseglist(mtc.getSegmentList(vci_tgt_index_cleanup)),
    275     m_coherence_table( mtc.getCoherenceTable<vci_addr_t>() ),
    276275    m_transaction_tab_lines(transaction_tab_lines),
    277276    m_transaction_tab( transaction_tab_lines, nwords ),
     
    354353    r_alloc_dir_fsm("r_alloc_dir_fsm"),
    355354    r_alloc_trt_fsm("r_alloc_trt_fsm"),
    356     r_alloc_upt_fsm("r_alloc_upt_fsm")
    357 
     355    r_alloc_upt_fsm("r_alloc_upt_fsm"),
     356    r_alloc_heap_fsm("r_alloc_heap_fsm")
    358357    {
    359358      assert(IS_POW_OF_2(nsets));
     
    552551    }
    553552    delete [] m_cache_data;
    554     delete [] m_coherence_table;
    555553
    556554    delete [] r_ixr_rsp_to_xram_rsp_rok;
     
    587585      r_cleanup_fsm     = CLEANUP_IDLE;
    588586      r_alloc_dir_fsm   = ALLOC_DIR_READ;
     587      r_alloc_heap_fsm  = ALLOC_HEAP_READ;
    589588      r_alloc_trt_fsm   = ALLOC_TRT_READ;
    590589      r_alloc_upt_fsm   = ALLOC_UPT_WRITE;
     
    32983297                     ((p_vci_tgt_cleanup.address.read() & 0x3) == 0) && reached)
    32993298                {
    3300                     addr_t line = (addr_t)(m_nline[(vci_addr_t)(p_vci_tgt_cleanup.address.read())]);
     3299                    addr_t line =(((addr_t) p_vci_tgt_cleanup.be.read() << (vci_param::B*8))) |
     3300                                 (((addr_t) p_vci_tgt_cleanup.wdata.read()));
    33013301
    33023302                    r_cleanup_nline = line;
     
    52535253    switch ( r_alloc_dir_fsm.read() )
    52545254    {
    5255 
    52565255      ////////////////////
    52575256      case ALLOC_DIR_READ:
     
    58815880    p_vci_ini.cfixed  = false;
    58825881
     5882    vci_addr_t vci_ini_address = 0;
    58835883    switch ( r_init_cmd_fsm.read() ) {
    58845884
     
    58975897      case INIT_CMD_INVAL_NLINE:
    58985898      {
     5899        vci_ini_address = (vci_addr_t)
     5900            m_xram_rsp_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     5901
    58995902        p_vci_ini.cmdval  = m_xram_rsp_to_init_cmd_inst_fifo.rok();
    59005903        if(m_xram_rsp_to_init_cmd_inst_fifo.rok()){
    59015904          if(m_xram_rsp_to_init_cmd_inst_fifo.read()) {
    5902             p_vci_ini.address = (addr_t)(m_coherence_table[m_xram_rsp_to_init_cmd_srcid_fifo.read()]+4);
     5905              p_vci_ini.address = (addr_t) (vci_ini_address+4);
    59035906          } else {
    5904             p_vci_ini.address = (addr_t)(m_coherence_table[m_xram_rsp_to_init_cmd_srcid_fifo.read()]);
     5907              p_vci_ini.address = (addr_t) (vci_ini_address);
    59055908          }
    59065909        } else p_vci_ini.address = 0; // prevent segmentation faults by reading an empty fifo
     
    59355938        break;
    59365939      case INIT_CMD_UPDT_NLINE:
     5940        vci_ini_address = (vci_addr_t)
     5941            m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     5942
    59375943        p_vci_ini.cmdval  = m_write_to_init_cmd_inst_fifo.rok();
    59385944        if(m_write_to_init_cmd_inst_fifo.rok()){
    59395945          if(m_write_to_init_cmd_inst_fifo.read()) {
    5940             p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 12);
     5946            p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    59415947          } else {
    5942             p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 8);
     5948            p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    59435949          }
    59445950        } else {
     
    59535959        break;
    59545960      case INIT_CMD_UPDT_INDEX:
     5961        vci_ini_address = (vci_addr_t)
     5962            m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     5963
    59555964        p_vci_ini.cmdval  = true;
    59565965        if(m_write_to_init_cmd_inst_fifo.read()) {
    5957           p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 12);
     5966          p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    59585967        } else {
    5959           p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 8);
     5968          p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    59605969        }
    59615970        p_vci_ini.wdata   = r_write_to_init_cmd_index.read();
     
    59675976        break;
    59685977      case INIT_CMD_UPDT_DATA:
     5978        vci_ini_address = (vci_addr_t)
     5979            m_write_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     5980
    59695981        p_vci_ini.cmdval  = true;
    59705982        if(m_write_to_init_cmd_inst_fifo.read()) {
    5971           p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 12);
     5983          p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    59725984        } else {
    5973           p_vci_ini.address = (addr_t)(m_coherence_table[m_write_to_init_cmd_srcid_fifo.read()] + 8);
     5985          p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    59745986        }
    59755987        p_vci_ini.wdata   = r_write_to_init_cmd_data[r_init_cmd_cpt.read() +
     
    59946006        break;
    59956007      case INIT_CMD_SC_UPDT_NLINE:
     6008        vci_ini_address = (vci_addr_t)
     6009            m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     6010
    59966011        p_vci_ini.cmdval  = m_sc_to_init_cmd_inst_fifo.rok();
    59976012        if(m_sc_to_init_cmd_inst_fifo.rok()){
    59986013          if( m_sc_to_init_cmd_inst_fifo.read() ) {
    5999             p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 12);
     6014            p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    60006015          } else {
    6001             p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 8);
     6016            p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    60026017          }
    60036018        } else {
     
    60166031        break;
    60176032      case INIT_CMD_SC_UPDT_INDEX:
     6033        vci_ini_address = (vci_addr_t)
     6034            m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     6035
    60186036        p_vci_ini.cmdval  = true;
    60196037        if( m_sc_to_init_cmd_inst_fifo.read() ) {
    6020           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 12);
     6038          p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    60216039        } else {
    6022           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 8);
     6040          p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    60236041        }
    60246042        p_vci_ini.wdata   = r_sc_to_init_cmd_index.read();
     
    60346052        break;
    60356053      case INIT_CMD_SC_UPDT_DATA:
     6054        vci_ini_address = (vci_addr_t)
     6055            m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     6056
    60366057        p_vci_ini.cmdval  = true;
    60376058        if( m_sc_to_init_cmd_inst_fifo.read() ) {
    6038           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 12);
     6059          p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    60396060        } else {
    6040           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 8);
     6061          p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    60416062        }
    60426063        p_vci_ini.wdata   = r_sc_to_init_cmd_wdata.read();
     
    60536074        break;
    60546075      case INIT_CMD_SC_UPDT_DATA_HIGH:
     6076        vci_ini_address = (vci_addr_t)
     6077            m_sc_to_init_cmd_srcid_fifo.read() << (vci_param::N - vci_param::S);
     6078
    60556079        p_vci_ini.cmdval  = true;
    60566080        if( m_sc_to_init_cmd_inst_fifo.read() ) {
    6057           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 12);
     6081          p_vci_ini.address = (addr_t)(vci_ini_address + 12);
    60586082        } else {
    6059           p_vci_ini.address = (addr_t)(m_coherence_table[m_sc_to_init_cmd_srcid_fifo.read()] + 8);
     6083          p_vci_ini.address = (addr_t)(vci_ini_address + 8);
    60606084        }
    60616085        p_vci_ini.wdata   = r_sc_to_init_cmd_wdata_high.read();
Note: See TracChangeset for help on using the changeset viewer.