Changeset 549 for trunk/modules/vci_iox_network/caba/source
- Timestamp:
- Oct 17, 2013, 8:50:46 PM (11 years ago)
- Location:
- trunk/modules/vci_iox_network/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_iox_network/caba/source/include/vci_iox_network.h
r451 r549 27 27 */ 28 28 29 ////////////////////////////////////////////////////////////////////////////// 29 //////////////////////////////////////////////////////////////////////////////// 30 30 // This component emulates an external IO bus such as PCIe or Hypertransport, 31 // but respect the VCI protocol. 32 // It is considered as a local interconnect that must be attached to33 // one OR SEVERAL clusters in a global interconnect.34 // It uses two different routing table:35 // - the cmd_routing_table decodes the local field of the VCI address36 // to return the target port37 // - The rsp_routing_table decodes the local field of the VCI srcid31 // but respect the VCI protocol. It can be attached to one OR SEVERAL clusters, 32 // using a vci_io_bridge component. 33 // It is considered as a local interconnect, for the ADDRESS or SRCID 34 // decoding tables: 35 // - the CMD routing_table decodes the local field of the VCI ADDRESS 36 // to return the local target port 37 // - The RSP routing_table decodes the local field of the VCI SRCID 38 38 // to return the initator port 39 39 // It is implemented as two independant crossbars, for VCI commands and 40 40 // VCI responses respectively. 41 // - The CMD crossbar has nb_ini input ports, and nb_tgt output ports. 41 // - The CMD crossbar has nb_ini input ports, and nb_tgt output ports, 42 // including the ports to the vci_io_bridge component(s). 42 43 // - The RSP crossbar has nb_tgt input ports, and nb_ini output ports. 44 // including the ports to the vci_io_bridge component(s). 43 45 // For both crossbars, output ports allocation policy is round robin. 44 ////////////////////////////////////////////////////////////////////////////// 46 //////////////////////////////////////////////////////////////////////////////// 45 47 46 48 #ifndef VCI_IOX_NETWORK_H … … 91 93 92 94 AddressDecodingTable<uint64_t,size_t> m_cmd_rt; // routing table for CMD 93 AddressDecodingTable<uint 64_t,size_t> m_rsp_rt; // routing table for RSP95 AddressDecodingTable<uint32_t,size_t> m_rsp_rt; // routing table for RSP 94 96 95 97 void transition(); … … 108 110 VciIoxNetwork( sc_module_name name, 109 111 const soclib::common::MappingTable &mt, 110 size_t cluster_id,111 112 size_t nb_tgt, 112 113 size_t nb_ini ); -
trunk/modules/vci_iox_network/caba/source/src/vci_iox_network.cpp
r471 r549 26 26 */ 27 27 28 //////////////////////////////////////////////////////////////////////////////// 29 // This component emulates an external IO bus such as PCIe or Hypertransport, 30 // but respect the VCI protocol. It can be attached to one OR SEVERAL clusters, 31 // using a vci_io_bridge component. 32 // It is considered as a local interconnect, for the ADDRESS or SRCID 33 // decoding tables: 34 // - the CMD routing_table decodes the local field of the VCI ADDRESS 35 // to return the local target port 36 // - The RSP routing_table decodes the local field of the VCI SRCID 37 // to return the initator port 38 // It is implemented as two independant crossbars, for VCI commands and 39 // VCI responses respectively. 40 // - The CMD crossbar has nb_ini input ports, and nb_tgt output ports, 41 // including the ports to the vci_io_bridge component(s). 42 // - The RSP crossbar has nb_tgt input ports, and nb_ini output ports. 43 // including the ports to the vci_io_bridge component(s). 44 // For both crossbars, output ports allocation policy is round robin. 45 //////////////////////////////////////////////////////////////////////////////// 46 28 47 #include <systemc> 29 48 #include <cassert> … … 50 69 typedef typename pkt_t::output_port_t output_port_t; 51 70 52 const bool 53 const size_t 54 const size_t 55 AddressDecodingTable<uint64_t,size_t>*m_rt; // pointer on routing table (CMD or RSP)56 57 sc_signal<bool>* 58 sc_signal<size_t>* 59 sc_signal<bool>* 60 sc_signal<size_t>* 71 const bool m_is_cmd; // CMD XBAR if true 72 const size_t m_inputs; // number of inputs 73 const size_t m_outputs; // number of outputs 74 void* m_rt; // pointer on routing table (CMD or RSP) 75 76 sc_signal<bool>* r_out_allocated; // for each output: allocation state 77 sc_signal<size_t>* r_out_origin; // for each output: input port index 78 sc_signal<bool>* r_in_allocated; // for each input: allocation state 79 sc_signal<size_t>* r_in_dest; // for each input: output port index 61 80 62 81 public: 63 82 /////////////////////// 64 IoXbar( bool 65 size_t 66 size_t 67 AddressDecodingTable<uint64_t,size_t>* rt )83 IoXbar( bool is_cmd, 84 size_t nb_inputs, 85 size_t nb_outputs, 86 void* rt ) 68 87 : m_is_cmd( is_cmd ), 69 88 m_inputs( nb_inputs ), … … 150 169 if ( m_is_cmd ) 151 170 { 152 req = ((AddressDecodingTable<uint64_t,size_t>*)m_rt)->get_value( 153 (uint64_t)(input_port[in]->address.read()) ); 171 AddressDecodingTable<uint64_t, size_t>* rt = 172 (AddressDecodingTable<uint64_t, size_t>*)m_rt; 173 req = rt->get_value((uint64_t)(input_port[in]->address.read())); 154 174 } 155 175 else 156 176 { 157 req = ((AddressDecodingTable<uint64_t,size_t>*)m_rt)->get_value( 158 (uint64_t)(input_port[in]->rsrcid.read()) ); 177 AddressDecodingTable<uint32_t, size_t>* rt = 178 (AddressDecodingTable<uint32_t, size_t>*)m_rt; 179 req = rt->get_value((uint32_t)(input_port[in]->rsrcid.read())); 159 180 } 160 181 // allocate the output port if requested … … 260 281 tmpl(/**/)::VciIoxNetwork( sc_core::sc_module_name name, 261 282 const soclib::common::MappingTable &mt, 262 size_t cluster_id,263 283 size_t nb_tgt, 264 284 size_t nb_ini ) … … 274 294 m_nb_ini( nb_ini ), 275 295 276 m_cmd_rt( mt.get PortidFromAddress(cluster_id) ),277 m_rsp_rt( mt.get PortidFromSrcid(cluster_id) )296 m_cmd_rt( mt.getLocalIndexFromAddress(0) ), 297 m_rsp_rt( mt.getLocalIndexFromSrcid(0) ) 278 298 { 279 299 std::cout << " Building VciIoxNetwork : " << name << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.