Thanks, Nilay. I can know the ranks and banks from the physical address
(datatype physical_address_t) which I get from MemoryMsg or RubyRequest but
my main issue is how to extract that information from a single flit. As per
the current code, I can only get a msg_ptr from it of type Message*. I am
able to typecast the message ptr to NetworkMessage msg_ptr safely and can
get destination of the flit of the type NetDest, I can also extract the
message type from it using MessageSizeType() (please see code below) but
that doesn't quite serve my purpose. I need to know at the router if the
request flit is memory_read or memory_write and its physical address at the
memory. I am assuming I can schedule the memory request flits at the switch
allocator(please correct me if I am wrong).

Code at SWallocator_d.cc

                // remove flit from Input Unit
                flit_d *t_flit = m_input_unit[inport]->getTopFlit(invc);

                MsgPtr& msg_ptr = t_flit->get_msg_ptr();

const NetworkMessage* netMess = dynamic_cast<const
NetworkMessage*>(msg_ptr.get());
                const MessageSizeType& type = netMess->getMessageSize();
                const NetDest& dest = netMess->getDestination() ;


Also, could you please help me in understanding the journey of memory
packets better, e.g. if a request originates at a node and if that request
is memory writeback, in that case what is the typical itinerary of a flit
of that request message to get to the main memory? Sorry for pestering you
with a lot of questions.
Thanks a lot for your guidance.


On Thu, Oct 4, 2012 at 4:22 PM, Nilay Vaish <ni...@cs.wisc.edu> wrote:

> On Thu, 4 Oct 2012, tejasi pimpalkhute wrote:
>
>  Thanks a ton for explaining this, I think I was mistaken earlier. In that
>> case, can I know beforehand the physical address of the request flits
>> which
>> will be going to the directory controller? Can I calculate the rank and
>>
>
> When router forwards a flit, it knows the final destination of the flit.
> So it should be possible to figure out if a flit is meant for the directory
> controller.
>
>
>  bank address of that flit as done in the memory controller (if the router
>> has information about the physical memory)? I could see some mapping
>> functions in the directory controller to map the address to the physical
>> address of memory. Can I use those to get final main memory address?
>>
>
> A flit holds pointer to a message that holds the physical address. You
> would need to read the memory controller code to figure out how to map the
> physical address to ranks and banks.
>
> --
> Nilay
>



-- 
Thanks and Regards,
Tejasi
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to