Changeset 98 for trunk/modules/vci_synthetic_initator/caba/sources/include
- Timestamp:
- Sep 29, 2010, 2:32:06 PM (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h
r96 r98 32 32 33 33 #include <systemc> 34 #include <inttypes.h> 35 #include "generic_fifo.h" 36 #include "vci_initiator.h" 37 #include "soclib_endian.h" 38 #include "caba_base_module.h" 39 #include "int_tab.h" 40 #include "mapping_table.h" 34 41 35 42 namespace soclib { namespace caba { … … 40 47 : public soclib::caba::BaseModule 41 48 { 42 typedef uint32_t addr_t; 49 //typedef sc_dt::sc_uint<40> addr_t; 50 typedef typename vci_param::fast_addr_t vci_addr_t; 43 51 typedef uint32_t data_t; 44 52 typedef uint32_t tag_t; … … 46 54 typedef uint32_t be_t; 47 55 typedef uint32_t copy_t; 56 57 // Type of the addr_t and access of the fields 58 typedef union{ 59 PACKED_BITFIELD( 60 vci_addr_t srcid:vci_param::S, 61 vci_addr_t null:(8*sizeof(vci_addr_t)-(2*vci_param::S)), 62 ) normal_address; 63 PACKED_BITFIELD( 64 vci_addr_t xmin:vci_param::S, 65 vci_addr_t xmax:vci_param::S, 66 vci_addr_t ymin:vci_param::S, 67 vci_addr_t ymax:vci_param::S, 68 vci_addr_t null_:(8*sizeof(vci_addr_t)-(4*vci_param::S)), 69 vci_addr_t bc:2, 70 ) broadcast_address; 71 } addr_t; 48 72 49 73 … … 75 99 VciSyntheticInitiator( 76 100 sc_module_name name, 101 const soclib::common::MappingTable &mt, 102 const soclib::common::IntTab &vci_index, 77 103 size_t length, // Packet length (flit numbers) 78 104 float rho, // Packets ratio on the network 79 105 size_t depth, // Fifo depth 80 size_t x, // X location of the synthetic initiator81 size_t y, // Y location of the synthetic initiator82 106 size_t xmesh, 83 107 size_t ymesh, 84 size_t bc_period, // Broadcast period, if no broadcast => 0 85 size_t xmin, 86 size_t xmax, 87 size_t ymin, 88 size_t ymax, 89 const soclib::common::IntTab &vci_index 108 size_t bc_period = 0, // Broadcast period, if no broadcast => 0 109 size_t xmin = 0, 110 size_t xmax = 0, 111 size_t ymin = 0, 112 size_t ymax = 0, 90 113 ); 91 114 … … 101 124 102 125 // Component attributes 103 const size_t m_length; // Number of flits of a packet126 const size_t m_length; // Number of words to write 104 127 const size_t m_rho; // Rate of packets in the network wanted 105 128 const size_t m_depth; // Fifo depth 106 const size_t m_x; // X location107 const size_t m_y; // Y location108 129 const size_t m_xmesh; 109 130 const size_t m_ymesh; … … 113 134 const size_t m_ymin; 114 135 const size_t m_ymax; 136 const size_t m_srcid; 137 const size_t m_coord; 115 138 116 size_t m_count; 117 size_t m_npackets; // Total number of packets already sent 139 size_t m_count; // Numbers of words sent 140 size_t m_npackets; // Total number of packets already sent 141 uint64_t m_start_latency1; // Start time of sending packet wanted 142 uint64_t m_start_latency2; // Start time of sending packet 143 addr_t m_address_to_send; // Address to send the write command 144 float m_rhos; // Effective Rho during the simulation 145 size_t m_bc_nrsp; // Expected number of responses for a broadcast command 118 146 119 147 // Fifo transmitting date to the VCI FSM 120 148 GenericFifo<uint64_t> m_date_fifo; 121 149 122 sc_signal<int> r_vci_fsm;150 sc_signal<int> r_vci_fsm; 123 151 124 sc_signal<size_t> r_index;152 sc_signal<size_t> r_index; 125 153 126 sc_signal<bool> r_broadcast_req;154 sc_signal<bool> r_broadcast_req; 127 155 128 156 }; // end class VciSyntheticInitiator
Note: See TracChangeset
for help on using the changeset viewer.