Ignore:
Timestamp:
Jun 3, 2013, 10:25:33 AM (12 years ago)
Author:
alain
Message:

Introducing support for VCI DATA 64 bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_block_device_tsar/caba/source/include/vci_block_device_tsar.h

    r392 r400  
    3030//////////////////////////////////////////////////////////////////////////////////////
    3131// This component is a simplified disk controller with a VCI interface.
     32// It supports only 32 or 64 bits VCI DATA width, but all addressable registers
     33// contain 32 bits words. It supports VCI addresss lartger than 32 bits.
     34//
    3235// This component can perform data transfers between one single file belonging
    3336// to the host system and a buffer in the memory of the virtual prototype.
     
    3639// The block size (bytes), and the burst size (bytes) must be power of 2.
    3740// The burst size is typically a cache line.
    38 // If the memory buffer is not constrained to be aligned on a burst boundary.
     41// The memory buffer is not constrained to be aligned on a burst boundary,
     42// but must be aligned on a 32 bits word boundary.
    3943// Both read and write transfers are supported. An IRQ is optionally
    4044// asserted when the transfer is completed.
    4145//
    42 // As a target this block device controler contains 9 memory mapped registers,
     46// As a target this block device controler contains 9 32 bits memory mapped registers,
    4347// taking 36 bytes in the address space.
    44 // - BLOCK_DEVICE_BUFFER        0x00 (read/write)    Memory buffer base address (32 LSB bits)
    45 // - BLOCK_DEVICE_COUNT         0x04 (read/write)    Number of blocks to be transfered.
    46 // - BLOCK_DEVICE_LBA           0x08 (read/write)    Index of first block in the file.
    47 // - BLOCK_DEVICE_OP            0x0C (write-only)    Writing here starts the operation.
    48 // - BLOCK_DEVICE_STATUS        0x10 (read-only)     Block Device status.
    49 // - BLOCK_DEVICE_IRQ_ENABLE    0x14 (read/write)    IRQ enabled if non zero.
    50 // - BLOCK_DEVICE_SIZE          0x18 (read-only)     Number of addressable blocks.
    51 // - BLOCK_DEVICE_BLOCK_SIZE    0x1C (read_only)     Block size in bytes.
    52 // - BLOCK_DEVICE_BUFFER_EXT    0x20 (read_only)     Memory buffer base address (32 MSB bits)
     48// - BLOCK_DEVICE_BUFFER        0x00 (read/write)  Memory buffer base address (LSB bits)
     49// - BLOCK_DEVICE_COUNT         0x04 (read/write)  Number of blocks to be transfered.
     50// - BLOCK_DEVICE_LBA           0x08 (read/write)  Index of first block in the file.
     51// - BLOCK_DEVICE_OP            0x0C (write-only)  Writing here starts the operation.
     52// - BLOCK_DEVICE_STATUS        0x10 (read-only)   Block Device status.
     53// - BLOCK_DEVICE_IRQ_ENABLE    0x14 (read/write)  IRQ enabled if non zero.
     54// - BLOCK_DEVICE_SIZE          0x18 (read-only)   Number of addressable blocks.
     55// - BLOCK_DEVICE_BLOCK_SIZE    0x1C (read_only)   Block size in bytes.
     56// - BLOCK_DEVICE_BUFFER_EXT    0x20 (read_only)   Memory buffer base address (MSB bits)
    5357//
    5458// The following operations codes are supported:
     
    104108    sc_signal<uint32_t>               r_lba;              // first block index
    105109    sc_signal<bool>                   r_read;             // requested operation
    106     sc_signal<uint32_t>               r_index;            // flit index in local buffer
     110    sc_signal<uint32_t>               r_index;            // word index in local buffer
    107111    sc_signal<uint32_t>               r_latency_count;    // latency counter
    108     sc_signal<uint32_t>               r_flit_count;       // flit counter (in a burst)
     112    sc_signal<uint32_t>               r_words_count;      // word counter (in a burst)
    109113    sc_signal<uint32_t>               r_burst_count;      // burst counter (in a block)
    110114    sc_signal<uint32_t>               r_block_count;      // block counter (in a transfer)
    111     sc_signal<uint32_t>               r_burst_offset;     // number of non aligned flits
    112     sc_signal<uint32_t>               r_burst_nflits;     // number of flits in a burst
     115    sc_signal<uint32_t>               r_burst_offset;     // number of non aligned words
     116    sc_signal<uint32_t>               r_burst_nwords;     // number of words in a burst
    113117    sc_signal<bool>                   r_go;               // command from T_FSM to M_FSM
    114118
     
    124128    int                               m_fd;               // File descriptor
    125129    uint64_t                          m_device_size;      // Total number of blocks
    126     const uint32_t                    m_flits_per_block;  // number of flits in a block
    127     const uint32_t                    m_flits_per_burst;  // number of flits in a burst
     130    const uint32_t                    m_words_per_block;  // number of words in a block
     131    const uint32_t                    m_words_per_burst;  // number of words in a burst
    128132    const uint32_t                    m_bursts_per_block; // number of bursts in a block
    129133    const uint32_t                    m_latency;          // device latency
Note: See TracChangeset for help on using the changeset viewer.