- Timestamp:
- Jan 7, 2012, 7:24:11 PM (13 years ago)
- Location:
- trunk/modules/vci_vdspin_target_wrapper/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_vdspin_target_wrapper/caba/source/include/vci_vdspin_target_wrapper.h
r149 r185 55 55 #include "generic_fifo.h" 56 56 #include "dspin_interface.h" 57 #include "static_fast_int.h" 57 58 58 59 namespace soclib { namespace caba { -
trunk/modules/vci_vdspin_target_wrapper/caba/source/src/vci_vdspin_target_wrapper.cpp
r149 r185 26 26 27 27 #include "../include/vci_vdspin_target_wrapper.h" 28 29 using namespace soclib::common; 28 30 29 31 namespace soclib { namespace caba { … … 67 69 tmpl(void)::transition() 68 70 { 69 sc_uint<dspin_cmd_width> cmd_fifo_data;70 bool cmd_fifo_write;71 bool cmd_fifo_read;72 73 sc_uint<dspin_rsp_width> rsp_fifo_data;74 bool rsp_fifo_write;75 bool rsp_fifo_read;71 sc_uint<dspin_cmd_width> cmd_fifo_data; 72 bool cmd_fifo_write; 73 bool cmd_fifo_read; 74 75 sc_uint<dspin_rsp_width> rsp_fifo_data; 76 bool rsp_fifo_write; 77 bool rsp_fifo_read; 76 78 77 79 if (p_resetn == false) … … 121 123 else 122 124 { 123 rsp_fifo_data = rsp_fifo_data | 0x100000000 ;125 rsp_fifo_data = rsp_fifo_data | 0x100000000LL; 124 126 r_rsp_fsm = RSP_WRITE; 125 127 } … … 135 137 if ( p_vci.reop ) 136 138 { 137 rsp_fifo_data = rsp_fifo_data | 0x100000000 ;139 rsp_fifo_data = rsp_fifo_data | 0x100000000LL; 138 140 r_rsp_fsm = RSP_IDLE; 139 141 } … … 208 210 r_cmd_buf1 = r_fifo_cmd.read(); // save command parameters 209 211 // read command if EOP 210 if ( (r_fifo_cmd.read() & 0x8000000000 ) ) r_cmd_fsm = CMD_READ;211 else r_cmd_fsm = CMD_WDATA;212 if ( (r_fifo_cmd.read() & 0x8000000000LL) ) r_cmd_fsm = CMD_READ; 213 else r_cmd_fsm = CMD_WDATA; 212 214 r_flit_count = 0; 213 215 } … … 223 225 if( r_fifo_cmd.rok() && p_vci.cmdack.read() ) 224 226 { 225 if ( (r_cmd_buf1.read() & 0x0000200000 ) == 0 )r_flit_count = r_flit_count + 1;227 if ( (r_cmd_buf1.read() & 0x0000200000LL) == 0 ) r_flit_count = r_flit_count + 1; 226 228 cmd_fifo_read = true; 227 if ( (r_fifo_cmd.read() & 0x8000000000 ) ) r_cmd_fsm = CMD_IDLE;229 if ( (r_fifo_cmd.read() & 0x8000000000LL) ) r_cmd_fsm = CMD_IDLE; 228 230 } 229 231 break; … … 254 256 if ( r_fifo_cmd.rok() ) 255 257 { 256 sc_uint<dspin_cmd_width> minmax = r_cmd_buf0.read() & 0x7FFFF80000 ;258 sc_uint<dspin_cmd_width> minmax = r_cmd_buf0.read() & 0x7FFFF80000LL; 257 259 if ( vci_param::N == 40 ) minmax = (minmax << 1); 258 260 else minmax = (minmax >> (39 - vci_param::N) ); … … 260 262 p_vci.address = (sc_uint<vci_param::N>)minmax | 0x3; 261 263 p_vci.cmd = vci_param::CMD_WRITE; 262 p_vci.wdata = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFF );263 p_vci.be = (sc_uint<vci_param::B>)((r_fifo_cmd.read() & 0x0F00000000) >> 32);264 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf0.read() & 0x000007FFE0) >> 5);265 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf0.read() & 0x000000001E) >> 1);264 p_vci.wdata = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFFLL); 265 p_vci.be = (sc_uint<vci_param::B>)((r_fifo_cmd.read() & 0x0F00000000LL) >> 32); 266 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf0.read() & 0x000007FFE0LL) >> 5); 267 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf0.read() & 0x000000001ELL) >> 1); 266 268 p_vci.pktid = 0; 267 269 p_vci.plen = vci_param::B; … … 282 284 p_vci.cmdval = true; 283 285 p_vci.address = address; 284 p_vci.cmd = (sc_uint<2>)((r_cmd_buf1.read() & 0x0001800000 ) >> 23);286 p_vci.cmd = (sc_uint<2>)((r_cmd_buf1.read() & 0x0001800000LL) >> 23); 285 287 p_vci.wdata = 0; 286 p_vci.be = (sc_uint<vci_param::B>)((r_cmd_buf1.read() & 0x000000001E ) >> 1);287 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000 ) >> 25);288 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0 ) >> 5);288 p_vci.be = (sc_uint<vci_param::B>)((r_cmd_buf1.read() & 0x000000001ELL) >> 1); 289 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000LL) >> 25); 290 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0LL) >> 5); 289 291 p_vci.pktid = 0; 290 p_vci.plen = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000 ) >> 13);291 p_vci.contig = ((r_cmd_buf1.read() & 0x0000400000 ) != 0);292 p_vci.cons = ((r_cmd_buf1.read() & 0x0000200000 ) != 0);292 p_vci.plen = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000LL) >> 13); 293 p_vci.contig = ((r_cmd_buf1.read() & 0x0000400000LL) != 0); 294 p_vci.cons = ((r_cmd_buf1.read() & 0x0000200000LL) != 0); 293 295 p_vci.eop = true; 294 296 } … … 302 304 p_vci.cmdval = true; 303 305 p_vci.address = address + (r_flit_count.read()*vci_param::B); 304 p_vci.cmd = (sc_uint<2>)((r_cmd_buf1.read() & 0x0001800000 ) >> 23);305 p_vci.wdata = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFF );306 p_vci.be = (sc_uint<vci_param::B>)((r_fifo_cmd.read() & 0x0F00000000 ) >> 32);307 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000 ) >> 25);308 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0 ) >> 5);306 p_vci.cmd = (sc_uint<2>)((r_cmd_buf1.read() & 0x0001800000LL) >> 23); 307 p_vci.wdata = (sc_uint<8*vci_param::B>)(r_fifo_cmd.read() & 0x00FFFFFFFFLL); 308 p_vci.be = (sc_uint<vci_param::B>)((r_fifo_cmd.read() & 0x0F00000000LL) >> 32); 309 p_vci.srcid = (sc_uint<vci_param::S>)((r_cmd_buf1.read() & 0x7FFE000000LL) >> 25); 310 p_vci.trdid = (sc_uint<vci_param::T>)((r_cmd_buf1.read() & 0x0000001FE0LL) >> 5); 309 311 p_vci.pktid = 0; 310 p_vci.plen = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000 ) >> 13);311 p_vci.contig = ((r_cmd_buf1.read() & 0x0000400000 ) != 0);312 p_vci.cons = ((r_cmd_buf1.read() & 0x0000200000 ) != 0);313 p_vci.eop = ((r_fifo_cmd.read() & 0x8000000000 ) == 0x8000000000);312 p_vci.plen = (sc_uint<vci_param::K>)((r_cmd_buf1.read() & 0x00001FE000LL) >> 13); 313 p_vci.contig = ((r_cmd_buf1.read() & 0x0000400000LL) != 0); 314 p_vci.cons = ((r_cmd_buf1.read() & 0x0000200000LL) != 0); 315 p_vci.eop = ((r_fifo_cmd.read() & 0x8000000000LL) == 0x8000000000LL); 314 316 } 315 317 else
Note: See TracChangeset
for help on using the changeset viewer.