- Timestamp:
- Jan 15, 2013, 5:54:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_vdspin_initiator_wrapper/caba/source/include/vci_vdspin_initiator_wrapper.h
r150 r287 5 5 * 6 6 * SOCLIB_LGPL_HEADER_BEGIN 7 * 7 * 8 8 * This file is part of SoCLib, GNU LGPLv2.1. 9 * 9 * 10 10 * SoCLib is free software; you can redistribute it and/or modify it 11 11 * under the terms of the GNU Lesser General Public License as published 12 12 * by the Free Software Foundation; version 2.1 of the License. 13 * 13 * 14 14 * SoCLib is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 17 * Lesser General Public License for more details. 18 * 18 * 19 19 * You should have received a copy of the GNU Lesser General Public 20 20 * License along with SoCLib; if not, write to the Free Software 21 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 22 * 02110-1301 USA 23 * 23 * 24 24 * SOCLIB_LGPL_HEADER_END 25 * 26 * Maintainers: alexandre.joannou@lip6.fr 27 * 25 28 */ 26 29 … … 41 44 // - VCI plen == 8 bits 42 45 // - VCI srcid <= 14 bits 43 // - VCI trdid <= 8bits44 // - VCI pktid field not transmitted45 // - VCI rerror == 2 bits46 // - VCI trdid <= 4 bits 47 // - VCI pktid <= 4 bits 48 // - VCI rerror == 1 bit 46 49 //////////////////////////////////////////////////////////////////////// 47 50 … … 60 63 template<typename vci_param, int dspin_cmd_width, int dspin_rsp_width> 61 64 class VciVdspinInitiatorWrapper 62 65 : public soclib::caba::BaseModule 63 66 { 64 // Command FSM 67 // Command FSM 65 68 enum fsm_state_cmd{ 66 67 68 69 70 69 CMD_IDLE, 70 CMD_BROADCAST, 71 CMD_READ, 72 CMD_WRITE, 73 CMD_WDATA, 71 74 }; 72 75 73 76 // Response FSM 74 77 enum fsm_state_rsp{ 75 76 RSP_READ, 77 RSP_WRITE, 78 RSP_IDLE, 79 RSP_DSPIN_SINGLE_FLIT, 80 RSP_DSPIN_MULTI_FLIT, 78 81 }; 79 82 … … 83 86 public: 84 87 // ports 85 sc_core::sc_in<bool> 86 sc_core::sc_in<bool> 87 soclib::caba::DspinOutput<dspin_cmd_width> 88 soclib::caba::DspinInput<dspin_rsp_width> 89 soclib::caba::VciTarget<vci_param> 88 sc_core::sc_in<bool> p_clk; 89 sc_core::sc_in<bool> p_resetn; 90 soclib::caba::DspinOutput<dspin_cmd_width> p_dspin_out; 91 soclib::caba::DspinInput<dspin_rsp_width> p_dspin_in; 92 soclib::caba::VciTarget<vci_param> p_vci; 90 93 91 94 // constructor / destructor 92 VciVdspinInitiatorWrapper( sc_module_name name,93 size_tcmd_fifo_depth,94 size_t rsp_fifo_depth);95 VciVdspinInitiatorWrapper( sc_module_name name, 96 size_t cmd_fifo_depth, 97 size_t rsp_fifo_depth ); 95 98 private: 96 99 // internal registers 97 sc_core::sc_signal<int> 98 sc_core::sc_signal<int> 99 sc_core::sc_signal<sc_uint<dspin_rsp_width> >r_rsp_buf;100 sc_core::sc_signal<int> r_cmd_fsm; 101 sc_core::sc_signal<int> r_rsp_fsm; 102 sc_core::sc_signal<sc_uint<dspin_rsp_width> > r_rsp_buf; 100 103 101 104 // fifos cmd and rsp 102 soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> > 103 soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> > 105 soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> > r_fifo_cmd; 106 soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> > r_fifo_rsp; 104 107 105 108 // methods systemc … … 113 116 114 117 }} // end namespace 115 118 116 119 #endif // VCI_VDSPIN_INITIATOR_WRAPPER_H_ 117 120
Note: See TracChangeset
for help on using the changeset viewer.