- Timestamp:
- Jun 8, 2010, 4:31:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/vci_ring_target/caba/source/include/vci_ring_target.h
r35 r44 105 105 106 106 // internal registers 107 sc_ signal<int> r_ring_cmd_fsm; // ring command packet FSM108 sc_ signal<int> r_ring_rsp_fsm; // ring response packet FSM109 sc_ signal<int> r_vci_cmd_fsm; // vci command packet FSM110 sc_ signal<int> r_vci_rsp_fsm; // vci response packet FSM111 112 sc_ signal<sc_uint<vci_param::S> > r_srcid;113 sc_ signal<sc_uint<2> > r_cmd;114 sc_ signal<sc_uint<vci_param::T> > r_trdid;115 sc_ signal<sc_uint<vci_param::P> > r_pktid;116 sc_ signal<sc_uint<vci_param::K> > r_plen;117 sc_ signal<sc_uint<1> > r_contig;118 sc_ signal<sc_uint<1> > r_const;119 sc_ signal<sc_uint<vci_param::N> > r_addr;107 sc_core::sc_signal<int> r_ring_cmd_fsm; // ring command packet FSM 108 sc_core::sc_signal<int> r_ring_rsp_fsm; // ring response packet FSM 109 sc_core::sc_signal<int> r_vci_cmd_fsm; // vci command packet FSM 110 sc_core::sc_signal<int> r_vci_rsp_fsm; // vci response packet FSM 111 112 sc_core::sc_signal<sc_dt::sc_uint<vci_param::S> > r_srcid; 113 sc_core::sc_signal<sc_dt::sc_uint<2> > r_cmd; 114 sc_core::sc_signal<sc_dt::sc_uint<vci_param::T> > r_trdid; 115 sc_core::sc_signal<sc_dt::sc_uint<vci_param::P> > r_pktid; 116 sc_core::sc_signal<sc_dt::sc_uint<vci_param::K> > r_plen; 117 sc_core::sc_signal<sc_dt::sc_uint<1> > r_contig; 118 sc_core::sc_signal<sc_dt::sc_uint<1> > r_const; 119 sc_core::sc_signal<sc_dt::sc_uint<vci_param::N> > r_addr; 120 120 121 121 // internal fifos … … 224 224 if (m_cmd_fifo.read() & 0x1 == 0x1) // broadcast 225 225 { 226 r_addr = (sc_ uint<vci_param::N>) 0x3;227 r_srcid = (sc_ uint<vci_param::S>) (m_cmd_fifo.read() >> 20);228 r_cmd = (sc_ uint<2>) 0x2;229 r_contig = (sc_ uint<1>) 0x1;230 r_const = (sc_ uint<1>) 0x0;231 r_plen = (sc_ uint<vci_param::K>) 0x04;232 r_pktid = (sc_ uint<vci_param::P>) 0x0;233 r_trdid = (sc_ uint<vci_param::T>) ((m_cmd_fifo.read() >> 16) & 0xF);226 r_addr = (sc_dt::sc_uint<vci_param::N>) 0x3; 227 r_srcid = (sc_dt::sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20); 228 r_cmd = (sc_dt::sc_uint<2>) 0x2; 229 r_contig = (sc_dt::sc_uint<1>) 0x1; 230 r_const = (sc_dt::sc_uint<1>) 0x0; 231 r_plen = (sc_dt::sc_uint<vci_param::K>) 0x04; 232 r_pktid = (sc_dt::sc_uint<vci_param::P>) 0x0; 233 r_trdid = (sc_dt::sc_uint<vci_param::T>) ((m_cmd_fifo.read() >> 16) & 0xF); 234 234 235 235 r_vci_cmd_fsm = WDATA; … … 237 237 else 238 238 { 239 r_addr = (sc_ uint<vci_param::N>) (m_cmd_fifo.read() << 1);239 r_addr = (sc_dt::sc_uint<vci_param::N>) (m_cmd_fifo.read() << 1); 240 240 r_vci_cmd_fsm = CMD_SECOND_HEADER; 241 241 } … … 273 273 274 274 cmd_fifo_get = true; 275 r_srcid = (sc_ uint<vci_param::S>) (m_cmd_fifo.read() >> 20) ;276 r_cmd = (sc_ uint<2>) ((m_cmd_fifo.read() >> 18) & 0x3);277 r_contig = (sc_ uint<1>) ((m_cmd_fifo.read() >> 17) & 0x1);278 r_const = (sc_ uint<1>) ((m_cmd_fifo.read() >> 16) & 0x1);279 r_plen = (sc_ uint<vci_param::K>) ((m_cmd_fifo.read() >> 8) & 0xFF);280 r_pktid = (sc_ uint<vci_param::P>) ((m_cmd_fifo.read() >> 4) & 0xF);281 r_trdid = (sc_ uint<vci_param::T>) (m_cmd_fifo.read() & 0xF);275 r_srcid = (sc_dt::sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20) ; 276 r_cmd = (sc_dt::sc_uint<2>) ((m_cmd_fifo.read() >> 18) & 0x3); 277 r_contig = (sc_dt::sc_uint<1>) ((m_cmd_fifo.read() >> 17) & 0x1); 278 r_const = (sc_dt::sc_uint<1>) ((m_cmd_fifo.read() >> 16) & 0x1); 279 r_plen = (sc_dt::sc_uint<vci_param::K>) ((m_cmd_fifo.read() >> 8) & 0xFF); 280 r_pktid = (sc_dt::sc_uint<vci_param::P>) ((m_cmd_fifo.read() >> 4) & 0xF); 281 r_trdid = (sc_dt::sc_uint<vci_param::T>) (m_cmd_fifo.read() & 0xF); 282 282 r_vci_cmd_fsm = WDATA; 283 283 } … … 300 300 301 301 cmd_fifo_get = true; 302 sc_ uint<1> contig = r_contig;302 sc_dt::sc_uint<1> contig = r_contig; 303 303 if(contig == 0x1) 304 304 r_addr = r_addr.read() + vci_param::B ; … … 633 633 { 634 634 p_vci.cmdval = m_cmd_fifo.rok(); 635 p_vci.address = (sc_ uint<vci_param::N>) r_addr.read();636 p_vci.cmd = (sc_ uint<2>) ((m_cmd_fifo.read() >> 18) & 0x3);635 p_vci.address = (sc_dt::sc_uint<vci_param::N>) r_addr.read(); 636 p_vci.cmd = (sc_dt::sc_uint<2>) ((m_cmd_fifo.read() >> 18) & 0x3); 637 637 p_vci.be = 0xF; 638 638 p_vci.wdata = 0; 639 p_vci.pktid = (sc_ uint<vci_param::P>) ((m_cmd_fifo.read() >> 4) & 0xF);640 p_vci.srcid = (sc_ uint<vci_param::S>) (m_cmd_fifo.read() >> 20) ;641 p_vci.trdid = (sc_ uint<vci_param::T>) (m_cmd_fifo.read() & 0xF);642 p_vci.plen = (sc_ uint<vci_param::K>) ((m_cmd_fifo.read() >> 8) & 0xFF);639 p_vci.pktid = (sc_dt::sc_uint<vci_param::P>) ((m_cmd_fifo.read() >> 4) & 0xF); 640 p_vci.srcid = (sc_dt::sc_uint<vci_param::S>) (m_cmd_fifo.read() >> 20) ; 641 p_vci.trdid = (sc_dt::sc_uint<vci_param::T>) (m_cmd_fifo.read() & 0xF); 642 p_vci.plen = (sc_dt::sc_uint<vci_param::K>) ((m_cmd_fifo.read() >> 8) & 0xFF); 643 643 p_vci.eop = true; 644 sc_ uint<1> cons = (sc_uint<1>) ((m_cmd_fifo.read() >> 16) & 0x1) ;644 sc_dt::sc_uint<1> cons = (sc_dt::sc_uint<1>) ((m_cmd_fifo.read() >> 16) & 0x1) ; 645 645 if (cons == 0x1) 646 646 p_vci.cons = true; 647 647 else 648 648 p_vci.cons = false; 649 sc_ uint<1> contig = (sc_uint<1>) ((m_cmd_fifo.read() >> 17) & 0x1);649 sc_dt::sc_uint<1> contig = (sc_dt::sc_uint<1>) ((m_cmd_fifo.read() >> 17) & 0x1); 650 650 if(contig == 0x1) 651 651 p_vci.contig = true; … … 661 661 662 662 p_vci.cmdval = m_cmd_fifo.rok(); 663 p_vci.address = (sc_ uint<vci_param::N>) r_addr.read();664 p_vci.be = (sc_ uint<vci_param::B>)((m_cmd_fifo.read() >> 32) & 0xF);663 p_vci.address = (sc_dt::sc_uint<vci_param::N>) r_addr.read(); 664 p_vci.be = (sc_dt::sc_uint<vci_param::B>)((m_cmd_fifo.read() >> 32) & 0xF); 665 665 p_vci.cmd = r_cmd; 666 p_vci.wdata = (sc_ uint<32>)(m_cmd_fifo.read());666 p_vci.wdata = (sc_dt::sc_uint<32>)(m_cmd_fifo.read()); 667 667 p_vci.pktid = r_pktid; 668 668 p_vci.srcid = r_srcid; 669 669 p_vci.trdid = r_trdid; 670 670 p_vci.plen = r_plen; 671 sc_ uint<1> cons = r_const;671 sc_dt::sc_uint<1> cons = r_const; 672 672 if (cons == 0x1) 673 673 p_vci.cons = true; 674 674 else 675 675 p_vci.cons = false; 676 sc_ uint<1> contig = r_contig;676 sc_dt::sc_uint<1> contig = r_contig; 677 677 if(contig == 0x1) 678 678 p_vci.contig = true;
Note: See TracChangeset
for help on using the changeset viewer.