Changeset 216 for trunk


Ignore:
Timestamp:
Mar 23, 2012, 4:04:22 PM (13 years ago)
Author:
bouyer
Message:

BLOCK_DEVICE_BLOCK_SIZE should return the block size in bytes, not words.
While there changes *4 to *vci_param::B

File:
1 edited

Legend:

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

    r164 r216  
    179179        {
    180180            r_latency_count = m_latency;
    181             ::lseek(m_fd, (r_lba + r_block_count)*m_flits_per_block*4, SEEK_SET);
    182             if( ::read(m_fd, m_local_buffer, m_flits_per_block*4) < 0 ) 
     181            ::lseek(m_fd, (r_lba + r_block_count)*m_flits_per_block*vci_param::B, SEEK_SET);
     182            if( ::read(m_fd, m_local_buffer, m_flits_per_block*vci_param::B) < 0 ) 
    183183            {
    184184                 r_initiator_fsm = M_READ_ERROR;
     
    298298        {
    299299            r_latency_count = m_latency;
    300             ::lseek(m_fd, (r_lba + r_block_count)*m_flits_per_block*4, SEEK_SET);
    301             if( ::write(m_fd, m_local_buffer, m_flits_per_block*4) < 0 )
     300            ::lseek(m_fd, (r_lba + r_block_count)*m_flits_per_block*vci_param::B, SEEK_SET);
     301            if( ::write(m_fd, m_local_buffer, m_flits_per_block*vci_param::B) < 0 )
    302302            {
    303303                r_initiator_fsm = M_WRITE_ERROR;
     
    393393        p_vci_target.cmdack = false;
    394394        p_vci_target.rspval = true;
    395         p_vci_target.rdata = (uint32_t)m_flits_per_block;
     395        p_vci_target.rdata = (uint32_t)m_flits_per_block*vci_param::B;
    396396        p_vci_target.rerror = VCI_READ_OK;
    397397        break;
Note: See TracChangeset for help on using the changeset viewer.