Changeset 579 for trunk/modules/vci_spi/caba/source/include
- Timestamp:
- Nov 23, 2013, 1:25:13 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_spi/caba/source/include/vci_spi.h
r565 r579 54 54 #include "vci_initiator.h" 55 55 #include "vci_target.h" 56 #include "generic_fifo.h" 56 57 57 58 namespace soclib { … … 76 77 sc_signal<bool> r_ctrl_cpha; // clock phase 77 78 sc_signal<bool> r_ctrl_ie; // interrupt enable 78 sc_signal<bool> r_ctrl_go_bsy;79 79 sc_signal<uint8_t> r_ctrl_char_len; // number of bits in xfer 80 80 sc_signal<uint64_t> r_buf_address; // memory buffer address 81 sc_signal<uint32_t> r_dma_count; // DMA burst count 82 sc_signal<bool> r_read; // DMA read/write 83 84 sc_signal<uint32_t> r_burst_word; // DMA burst word count 85 sc_signal<bool> r_dma_error; // DMA error 86 87 sc_signal<bool> r_spi_bsy; // SPI shifter busy 81 88 sc_signal<uint32_t> r_spi_bit_count; 89 sc_signal<uint32_t> r_spi_word_count; 82 90 sc_signal<uint32_t> r_spi_clk_counter; 83 91 sc_signal<bool> r_spi_clk; … … 88 96 sc_signal<bool> r_irq; 89 97 90 sc_signal<bool> r_read; 91 sc_signal<uint32_t> r_nblocks; // number of blocks in transfer 92 sc_signal<uint64_t> r_buf_address; // memory buffer address 93 sc_signal<uint32_t> r_index; // word index in local buffer 94 sc_signal<uint32_t> r_latency_count; // latency counter 95 sc_signal<uint32_t> r_words_count; // word counter (in a burst) 96 sc_signal<uint32_t> r_burst_count; // burst counter (in a block) 97 sc_signal<uint32_t> r_block_count; // block counter (in a transfer) 98 sc_signal<uint32_t> r_burst_offset; // number of non aligned words 99 sc_signal<uint32_t> r_burst_nwords; // number of words in a burst 100 sc_signal<bool> r_go; // command from T_FSM to M_FSM 98 GenericFifo<typename vci_param::data_t> r_dma_fifo_read; // buffer data from SPI to network 99 GenericFifo<typename vci_param::data_t> r_dma_fifo_write;// buffer data from network to SPI 101 100 102 101 sc_signal<typename vci_param::srcid_t > r_srcid; // save srcid … … 106 105 sc_signal<typename vci_param::data_t > r_rdata; // save reply 107 106 108 uint32_t* r_local_buffer; // capacity is one block109 110 107 // structural parameters 111 108 std::list<soclib::common::Segment> m_seglist; 112 109 uint32_t m_srcid; // initiator index 113 const uint32_t m_words_per_block; // block size110 const uint32_t m_burst_size; // number of words in a burst 114 111 const uint32_t m_words_per_burst; // number of words in a burst 115 const uint32_t m_b ursts_per_block; // number of bursts in a block112 const uint32_t m_byte2burst_shift; // log2(burst_size) 116 113 117 114 // methods … … 122 119 enum { 123 120 M_IDLE = 0, 124 125 M_READ_BLOCK = 1, 126 M_READ_BURST = 2, 127 M_READ_CMD = 3, 128 M_READ_RSP = 4, 129 M_READ_SUCCESS = 5, 130 M_READ_ERROR = 6, 131 132 M_WRITE_BURST = 7, 133 M_WRITE_CMD = 8, 134 M_WRITE_RSP = 9, 135 M_WRITE_BLOCK = 10, 136 M_WRITE_SUCCESS = 11, 137 M_WRITE_ERROR = 12, 121 M_READ_WAIT = 1, 122 M_READ_CMD = 2, 123 M_READ_RSP = 3, 124 M_WRITE_WAIT = 4, 125 M_WRITE_CMD = 5, 126 M_WRITE_RSP = 6, 127 M_WRITE_END = 7 138 128 }; 139 129 … … 150 140 enum { 151 141 S_IDLE = 0, 152 S_XMIT = 1, 142 S_DMA_RECEIVE = 1, 143 S_DMA_SEND_START = 2, 144 S_DMA_SEND = 3, 145 S_DMA_SEND_END = 4, 146 S_XMIT = 5, 153 147 }; 154 148
Note: See TracChangeset
for help on using the changeset viewer.