- Timestamp:
- Jan 15, 2013, 5:54:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_vdspin_target_wrapper/caba/source/include/vci_vdspin_target_wrapper.h
r185 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 … … 39 42 // - VCI address width <= 40 bits 40 43 // - VCI data == 32 bits 41 // - VCI plen 42 // - VCI srcid 43 // - VCI trdid <= 8bits44 // - VCI pktid field not transmitted45 // - VCI rerror == 2 bits44 // - VCI plen == 8 bits 45 // - VCI srcid <= 14 bits 46 // - VCI trdid <= 4 bits 47 // - VCI pktid <= 4 bits 48 // - VCI rerror == 1 bit 46 49 //////////////////////////////////////////////////////////////////////// 47 50 … … 62 65 template<typename vci_param, int dspin_cmd_width, int dspin_rsp_width> 63 66 class VciVdspinTargetWrapper 64 67 : public soclib::caba::BaseModule 65 68 { 66 69 67 // Command FSM 70 // Command FSM 68 71 enum fsm_state_cmd{ 69 72 CMD_IDLE, … … 77 80 enum fsm_state_rsp{ 78 81 RSP_IDLE, 79 RSP_ READ,80 RSP_ WRITE,82 RSP_DSPIN_SINGLE_FLIT, 83 RSP_DSPIN_MULTI_FLIT, 81 84 }; 82 85 … … 86 89 public: 87 90 // ports 88 sc_core::sc_in<bool> 89 sc_core::sc_in<bool> 90 soclib::caba::DspinOutput<dspin_rsp_width> 91 soclib::caba::DspinInput<dspin_cmd_width> 92 soclib::caba::VciInitiator<vci_param> 91 sc_core::sc_in<bool> p_clk; 92 sc_core::sc_in<bool> p_resetn; 93 soclib::caba::DspinOutput<dspin_rsp_width> p_dspin_out; 94 soclib::caba::DspinInput<dspin_cmd_width> p_dspin_in; 95 soclib::caba::VciInitiator<vci_param> p_vci; 93 96 94 97 // constructor / destructor 95 VciVdspinTargetWrapper( sc_module_name name,96 size_tcmd_fifo_depth,97 size_t rsp_fifo_depth);98 VciVdspinTargetWrapper( sc_module_name name, 99 size_t cmd_fifo_depth, 100 size_t rsp_fifo_depth ); 98 101 private: 99 102 // internal registers 100 sc_core::sc_signal<int> 101 sc_core::sc_signal<sc_uint<dspin_cmd_width> >r_cmd_buf0;102 sc_core::sc_signal<sc_uint<dspin_cmd_width> >r_cmd_buf1;103 sc_core::sc_signal<int> 104 sc_core::sc_signal<size_t> 103 sc_core::sc_signal<int> r_cmd_fsm; 104 sc_core::sc_signal<sc_uint<dspin_cmd_width> > r_cmd_buf0; 105 sc_core::sc_signal<sc_uint<dspin_cmd_width> > r_cmd_buf1; 106 sc_core::sc_signal<int> r_rsp_fsm; 107 sc_core::sc_signal<size_t> r_flit_count; 105 108 106 109 // fifos cmd and rsp 107 soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> > 108 soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> > 110 soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> > r_fifo_cmd; 111 soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> > r_fifo_rsp; 109 112 110 113 // methods systemc … … 118 121 119 122 }} // end namespace 120 123 121 124 #endif // VCI_VDSPIN_TARGET_WRAPPER_H_ 122 125
Note: See TracChangeset
for help on using the changeset viewer.