Changeset 186 for trunk/modules/vci_vdspin_initiator_wrapper
- Timestamp:
- Jan 7, 2012, 7:27:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_vdspin_initiator_wrapper/caba/source/src/vci_vdspin_initiator_wrapper.cpp
r153 r186 126 126 { 127 127 r_cmd_fsm = CMD_BROADCAST; 128 cmd_fifo_data = (address & 0x7FFFF80000 ) |129 ((srcid << 5) & 0x000007FFE0 ) |130 ((trdid << 1) & 0x000000001E ) |131 0x0000000001 ;128 cmd_fifo_data = (address & 0x7FFFF80000LL) | 129 ((srcid << 5) & 0x000007FFE0LL) | 130 ((trdid << 1) & 0x000000001ELL) | 131 0x0000000001LL; 132 132 } 133 133 else if (is_read ) // VCI READ command 134 134 { 135 135 r_cmd_fsm = CMD_READ; 136 cmd_fifo_data = address & 0x7FFFFFFFFE ;136 cmd_fifo_data = address & 0x7FFFFFFFFELL; 137 137 } 138 138 else // VCI WRITE command 139 139 { 140 140 r_cmd_fsm = CMD_WRITE; 141 cmd_fifo_data = address & 0x7FFFFFFFFE ;141 cmd_fifo_data = address & 0x7FFFFFFFFELL; 142 142 } 143 143 } … … 151 151 sc_uint<dspin_cmd_width> data = (sc_uint<dspin_cmd_width>)p_vci.wdata.read(); 152 152 sc_uint<dspin_cmd_width> be = (sc_uint<dspin_cmd_width>)p_vci.be.read(); 153 cmd_fifo_data = (data & 0x00FFFFFFFF ) |154 ((be << 32) & 0x0300000000 ) |155 0x8000000000 ;153 cmd_fifo_data = (data & 0x00FFFFFFFFLL) | 154 ((be << 32) & 0x0300000000LL) | 155 0x8000000000LL; 156 156 r_cmd_fsm = CMD_IDLE; 157 157 } … … 169 169 sc_uint<dspin_cmd_width> plen = (sc_uint<dspin_cmd_width>)p_vci.plen.read(); 170 170 sc_uint<dspin_cmd_width> be = (sc_uint<dspin_cmd_width>)p_vci.be.read(); 171 cmd_fifo_data = ((be << 1 ) & 0x000000001E ) |172 ((trdid << 5 ) & 0x0000001FE0 ) |173 ((plen << 13) & 0x00001FE000 ) |174 ((cmd << 23) & 0x0001800000 ) |175 ((srcid << 25) & 0x7FFE000000 ) ;176 if ( p_vci.contig.read() ) cmd_fifo_data = cmd_fifo_data | 0x0000400000 ;177 if ( p_vci.cons.read() ) cmd_fifo_data = cmd_fifo_data | 0x0000200000 ;171 cmd_fifo_data = ((be << 1 ) & 0x000000001ELL) | 172 ((trdid << 5 ) & 0x0000001FE0LL) | 173 ((plen << 13) & 0x00001FE000LL) | 174 ((cmd << 23) & 0x0001800000LL) | 175 ((srcid << 25) & 0x7FFE000000LL) ; 176 if ( p_vci.contig.read() ) cmd_fifo_data = cmd_fifo_data | 0x0000400000LL ; 177 if ( p_vci.cons.read() ) cmd_fifo_data = cmd_fifo_data | 0x0000200000LL ; 178 178 179 179 if( r_cmd_fsm == CMD_READ ) // read command 180 180 { 181 181 r_cmd_fsm = CMD_IDLE; 182 cmd_fifo_data = cmd_fifo_data | 0x8000000000 ;182 cmd_fifo_data = cmd_fifo_data | 0x8000000000LL ; 183 183 } 184 184 else // write command … … 196 196 sc_uint<dspin_cmd_width> data = (sc_uint<dspin_cmd_width>)p_vci.wdata.read(); 197 197 sc_uint<dspin_cmd_width> be = (sc_uint<dspin_cmd_width>)p_vci.be.read(); 198 cmd_fifo_data = (data & 0x00FFFFFFFF ) |199 ((be << 32) & 0x0F00000000 ) ;198 cmd_fifo_data = (data & 0x00FFFFFFFFLL) | 199 ((be << 32) & 0x0F00000000LL) ; 200 200 201 201 if ( p_vci.eop.read() ) 202 202 { 203 cmd_fifo_data = cmd_fifo_data | 0x8000000000 ;203 cmd_fifo_data = cmd_fifo_data | 0x8000000000LL; 204 204 r_cmd_fsm = CMD_IDLE; 205 205 } … … 242 242 rsp_fifo_read = true; 243 243 r_rsp_buf = r_fifo_rsp.read(); 244 if ( (r_fifo_rsp.read() & 0x000020000 ) == 0 ) r_rsp_fsm = RSP_READ;245 else 244 if ( (r_fifo_rsp.read() & 0x000020000LL) == 0 ) r_rsp_fsm = RSP_READ; 245 else r_rsp_fsm = RSP_WRITE; 246 246 } 247 247 break; … … 252 252 { 253 253 rsp_fifo_read = true; 254 if ( (r_fifo_rsp.read() & 0x100000000 ) ) r_rsp_fsm = RSP_IDLE;254 if ( (r_fifo_rsp.read() & 0x100000000LL) ) r_rsp_fsm = RSP_IDLE; 255 255 } 256 256 break; … … 291 291 p_vci.rspval = true; 292 292 p_vci.rdata = 0; 293 p_vci.rsrcid = (sc_uint<vci_param::S>)((r_rsp_buf.read() & 0x0FFFC0000 ) >> 18);294 p_vci.rtrdid = (sc_uint<vci_param::T>)((r_rsp_buf.read() & 0x00000FF00 ) >> 8);293 p_vci.rsrcid = (sc_uint<vci_param::S>)((r_rsp_buf.read() & 0x0FFFC0000LL) >> 18); 294 p_vci.rtrdid = (sc_uint<vci_param::T>)((r_rsp_buf.read() & 0x00000FF00LL) >> 8); 295 295 p_vci.rpktid = 0; 296 p_vci.rerror = (sc_uint<vci_param::E>)((r_rsp_buf.read() & 0x000030000 ) >> 16);296 p_vci.rerror = (sc_uint<vci_param::E>)((r_rsp_buf.read() & 0x000030000LL) >> 16); 297 297 p_vci.reop = true; 298 298 } … … 300 300 { 301 301 p_vci.rspval = r_fifo_rsp.rok(); 302 p_vci.rdata = (sc_uint<8*vci_param::B>)(r_fifo_rsp.read() & 0x0FFFFFFFF );303 p_vci.rsrcid = (sc_uint<vci_param::S>)((r_rsp_buf.read() & 0x0FFFC0000 ) >> 18);304 p_vci.rtrdid = (sc_uint<vci_param::T>)((r_rsp_buf.read() & 0x00000FF00 ) >> 8);302 p_vci.rdata = (sc_uint<8*vci_param::B>)(r_fifo_rsp.read() & 0x0FFFFFFFFLL); 303 p_vci.rsrcid = (sc_uint<vci_param::S>)((r_rsp_buf.read() & 0x0FFFC0000LL) >> 18); 304 p_vci.rtrdid = (sc_uint<vci_param::T>)((r_rsp_buf.read() & 0x00000FF00LL) >> 8); 305 305 p_vci.rpktid = 0; 306 p_vci.rerror = (sc_uint<vci_param::E>)((r_rsp_buf.read() & 0x000030000 ) >> 16);307 p_vci.reop = ((r_fifo_rsp.read() & 0x100000000 ) == 0x100000000);306 p_vci.rerror = (sc_uint<vci_param::E>)((r_rsp_buf.read() & 0x000030000LL) >> 16); 307 p_vci.reop = ((r_fifo_rsp.read() & 0x100000000LL) == 0x100000000LL); 308 308 } 309 309
Note: See TracChangeset
for help on using the changeset viewer.