Hi Team, We are trying to implement an SDRAM aware router that re-orders packets based on their row address and bank address so as to minimize time.
In order to implement this, we are modifying the code in Swallocator_d.cc where the packets are re-ordered as per priority. To determine the priority we need the row address and bank address. So we tried to implement the logic similar to the below function void MemoryControl::enqueue(const MsgPtr& message, int latency) { Time current_time = g_eventQueue_ptr->getTime(); Time arrival_time = current_time + latency; * const MemoryMsg* memMess = safe_cast<const MemoryMsg*>(message.get()); physical_address_t addr = memMess->getAddress().getAddress();* MemoryRequestType type = memMess->getType(); bool is_mem_read = (type == MemoryRequestType_MEMORY_READ); MemoryNode thisReq(arrival_time, message, addr, is_mem_read, !is_mem_read); enqueueMemRef(thisReq); } Here the value returned by message.get() is type-casted into MemoryMsg and later this is used to retrieve address and type of request. We tried to implement similar logic in Swallocator_d.cc. Here the virtual channel buffers have flits. flit_d *t_flit = m_input_unit[inport]->getTopFlit(invc); MsgPtr msg_ptr = flit_d->get_msg_ptr(); * const MemoryMsg* memMess = safe_cast<const MemoryMsg*>(message.get());* const NetworkMessage* memMess = safe_cast<const NetworkMessage*>(msg_ptr.get()); Here the code in bold line throws an assertion error, but is being successfully type-casted into Network Message. Please let us know if it is possible to retrieve address and type of request from Network Message or any other possible way to extract the address and memory request type information from flit. To summarize, we are trying to schedule input requests at a router according to certain prioritizing criteria and store it in output port buffers. But our prioritizing criteria needs to know certain information from the flit (which is address and memory request type). Please let us know if there is any way to get this information. Thank You. Cheers Krishna.
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users