Changeset 16 for trunk/lib/vci_ring_target
- Timestamp:
- Apr 9, 2010, 1:36:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/vci_ring_target/caba/source/include/vci_ring_target.h
r11 r16 30 30 #include "ring_signals_2.h" 31 31 32 #define T_DEBUG33 #define TR_DEBUG32 //#define T_DEBUG 33 //#define TR_DEBUG 34 34 //#define T_DEBUG_FSM 35 35 … … 192 192 193 193 #ifdef T_DEBUG_FSM 194 std::cout << "--------------------------------------------" << std::endl; 195 std::cout << " vci cmd fsm = " << vci_cmd_fsm_state_str_t[r_vci_cmd_fsm] << std::endl 196 << " vci rsp fsm = " << vci_rsp_fsm_state_str_t[r_vci_rsp_fsm] << std::endl 197 << " ring cmd fsm = " << ring_cmd_fsm_state_str_t[r_ring_cmd_fsm] << std::endl 198 << " ring rsp fsm = " << ring_rsp_fsm_state_str_t[r_ring_rsp_fsm] << std::endl; 194 if( trace(sc_time_stamp())) 195 std::cout << sc_time_stamp() << " - " << m_name 196 << " - vci cmd = " << vci_cmd_fsm_state_str_t[r_vci_cmd_fsm] 197 << " - vci rsp = " << vci_rsp_fsm_state_str_t[r_vci_rsp_fsm] 198 << " - ring cmd = " << ring_cmd_fsm_state_str_t[r_ring_cmd_fsm] 199 << " - ring rsp = " << ring_rsp_fsm_state_str_t[r_ring_rsp_fsm] 200 << std::endl; 199 201 #endif 200 202 … … 219 221 if (m_cmd_fifo.read() & 0x1 == 0x1) // broadcast 220 222 { 221 #ifdef I_DEBUG222 std::cout << sc_time_stamp() << " -- " << m_name << " -- broadcast " << std::endl;223 #endif224 223 r_addr = (sc_uint<vci_param::N>) 0x3; 225 r_srcid = (sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 2 1);224 r_srcid = (sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20); 226 225 r_cmd = (sc_uint<2>) 0x2; 227 226 r_contig = (sc_uint<1>) 0x1; … … 229 228 r_plen = (sc_uint<vci_param::K>) 0x04; 230 229 r_pktid = (sc_uint<vci_param::P>) 0x0; 231 r_trdid = (sc_uint<vci_param::T>) ((m_cmd_fifo.read() >> 1 7) & 0xF);230 r_trdid = (sc_uint<vci_param::T>) ((m_cmd_fifo.read() >> 16) & 0xF); 232 231 233 232 r_vci_cmd_fsm = WDATA; … … 269 268 else // write command 270 269 { 271 #ifdef T_DEBUG 272 if( trace(sc_time_stamp())) 273 std::cout << sc_time_stamp() << " -- " << m_name 274 << " -- r_vci_cmd_fsm -- CMD_SECOND_HEADER & !EOP (WRITE)" 275 << std::endl; 276 #endif 270 277 271 cmd_fifo_get = true; 278 272 r_srcid = (sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20) ; … … 319 313 { 320 314 case RSP_HEADER: 321 322 if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok()))323 {324 315 #ifdef T_DEBUG 325 316 if( trace(sc_time_stamp())) … … 332 323 << std::endl; 333 324 #endif 325 if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok())) 326 { 327 334 328 rsp_fifo_data = (((uint64_t) p_vci.rsrcid.read() & 0x3FFF) << 12) | 335 329 (((uint64_t) p_vci.rerror.read() & 0x1) << 8) | … … 342 336 343 337 case DATA: 344 345 if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok())) 346 { 347 #ifdef T_DEBUG 338 #ifdef T_DEBUG 348 339 if( trace(sc_time_stamp())) 349 340 std::cout << sc_time_stamp() << " -- " << m_name … … 354 345 << " -- reop : " << p_vci.reop.read() 355 346 << std::endl; 356 #endif 347 #endif 348 if((p_vci.rspval.read() == true) && (m_rsp_fifo.wok())) 349 { 350 357 351 358 352 rsp_fifo_put = true;
Note: See TracChangeset
for help on using the changeset viewer.