Changeset 164 for trunk/modules/vci_block_device_tsar_v4/caba
- Timestamp:
- May 11, 2011, 10:54:53 AM (14 years ago)
- Location:
- trunk/modules/vci_block_device_tsar_v4/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_block_device_tsar_v4/caba/source/include/vci_block_device_tsar_v4.h
r151 r164 78 78 #include "caba_base_module.h" 79 79 #include "mapping_table.h" 80 #include "vci_target.h" 80 81 81 82 namespace soclib { … … 103 104 sc_signal<uint32_t> r_latency_count; // latency access (for each block) 104 105 sc_signal<bool> r_go; // transmit command from T_FSM to M_FSM 105 sc_signal<sc_ uint<vci_param::S> > r_srcid; // save srcid106 sc_signal<sc_ uint<vci_param::T> > r_trdid; // save trdid107 sc_signal<sc_ uint<vci_param::P> > r_pktid; // save pktid106 sc_signal<sc_dt::sc_uint<vci_param::S> > r_srcid; // save srcid 107 sc_signal<sc_dt::sc_uint<vci_param::T> > r_trdid; // save trdid 108 sc_signal<sc_dt::sc_uint<vci_param::P> > r_pktid; // save pktid 108 109 109 110 uint32_t* m_local_buffer; // capacity is one block (block_size bytes) … … 111 112 // structural parameters 112 113 soclib::common::Segment m_segment; // segment associated to target 113 uint32_t m_srcid; // initiator index114 uint32_t m_srcid; // initiator index 114 115 int m_fd; // File descriptor 115 116 uint64_t m_device_size; // Total number of blocks … … 174 175 175 176 // ports 176 sc_in<bool> p_clk;177 sc_in<bool> p_resetn;178 soclib::caba::VciInitiator<vci_param> 179 soclib::caba::VciTarget<vci_param> 180 sc_out<bool> p_irq;177 sc_in<bool> p_clk; 178 sc_in<bool> p_resetn; 179 soclib::caba::VciInitiator<vci_param> p_vci_initiator; 180 soclib::caba::VciTarget<vci_param> p_vci_target; 181 sc_out<bool> p_irq; 181 182 182 183 void print_trace(); -
trunk/modules/vci_block_device_tsar_v4/caba/source/src/vci_block_device_tsar_v4.cpp
r151 r164 27 27 */ 28 28 29 #include "vci_block_device_tsar_v4.h"30 29 #include <stdint.h> 31 30 #include <iostream> 32 31 #include <fcntl.h> 32 #include "vci_block_device_tsar_v4.h" 33 33 34 34 namespace soclib { namespace caba { … … 64 64 r_trdid = p_vci_target.trdid.read(); 65 65 r_pktid = p_vci_target.pktid.read(); 66 sc_ uint<vci_param::N> address = p_vci_target.address.read();66 sc_dt::sc_uint<vci_param::N> address = p_vci_target.address.read(); 67 67 bool read = (p_vci_target.cmd.read() == vci_param::CMD_READ); 68 68 uint32_t cell = (uint32_t)((address & 0x1F)>>2); … … 335 335 tmpl(void)::genMoore() 336 336 { 337 sc_ uint<vci_param::N> offset;337 sc_dt::sc_uint<vci_param::N> offset; 338 338 uint32_t index; 339 339 340 340 // p_vci_target port 341 p_vci_target.rsrcid = (sc_ uint<vci_param::S>)r_srcid.read();342 p_vci_target.rtrdid = (sc_ uint<vci_param::T>)r_trdid.read();343 p_vci_target.rpktid = (sc_ uint<vci_param::P>)r_pktid.read();341 p_vci_target.rsrcid = (sc_dt::sc_uint<vci_param::S>)r_srcid.read(); 342 p_vci_target.rtrdid = (sc_dt::sc_uint<vci_param::T>)r_trdid.read(); 343 p_vci_target.rpktid = (sc_dt::sc_uint<vci_param::P>)r_pktid.read(); 344 344 p_vci_target.reop = true; 345 345 … … 417 417 418 418 // p_vci_initiator port 419 p_vci_initiator.srcid = (sc_ uint<vci_param::S>)m_srcid;419 p_vci_initiator.srcid = (sc_dt::sc_uint<vci_param::S>)m_srcid; 420 420 p_vci_initiator.trdid = 0; 421 421 p_vci_initiator.pktid = 0; … … 432 432 p_vci_initiator.rspack = false; 433 433 p_vci_initiator.cmdval = true; 434 p_vci_initiator.address = (sc_ uint<vci_param::N>)r_buf_address.read() + offset;434 p_vci_initiator.address = (sc_dt::sc_uint<vci_param::N>)r_buf_address.read() + offset; 435 435 p_vci_initiator.cmd = vci_param::CMD_READ; 436 436 p_vci_initiator.wdata = 0; 437 437 p_vci_initiator.be = (uint32_t)0xF; 438 p_vci_initiator.plen = (sc_ uint<vci_param::K>)m_flits_per_burst*vci_param::B;438 p_vci_initiator.plen = (sc_dt::sc_uint<vci_param::K>)m_flits_per_burst*vci_param::B; 439 439 p_vci_initiator.eop = true; 440 440 break; … … 446 446 p_vci_initiator.rspack = false; 447 447 p_vci_initiator.cmdval = true; 448 p_vci_initiator.address = (sc_ uint<vci_param::N>)r_buf_address.read() + offset;448 p_vci_initiator.address = (sc_dt::sc_uint<vci_param::N>)r_buf_address.read() + offset; 449 449 p_vci_initiator.cmd = vci_param::CMD_WRITE; 450 450 p_vci_initiator.wdata = (uint32_t)m_local_buffer[index]; 451 451 p_vci_initiator.be = 0xF; 452 p_vci_initiator.plen = (sc_ uint<vci_param::K>)m_flits_per_burst*vci_param::B;452 p_vci_initiator.plen = (sc_dt::sc_uint<vci_param::K>)m_flits_per_burst*vci_param::B; 453 453 p_vci_initiator.eop = ( r_flit_count.read() == (m_flits_per_burst - 1) ); 454 454 break;
Note: See TracChangeset
for help on using the changeset viewer.