An HTML attachment was scrubbed...
URL: 
http://sos.ece.cmu.edu/pipermail/simflex/attachments/20060120/7ea2f1c0/attachment.html
From bgold at cmu.edu  Fri Jan 20 10:17:18 2006
From: bgold at cmu.edu (Brian Gold)
List-Post: [email protected]
Date: Fri Jan 20 12:42:39 2006
Subject: [Simflex] A question
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Hi Lu,

I'll provide a concise summary of InorderSimicsFeeder operation.  If you 
want more details, we can certainly help, but it gets ugly pretty quick.

Basically, think of real_hier_operate as a state machine.  Simics gives 
us only partial knowledge of what's going on with each call to 
real_hier_operate, so we have to transition through some states (it's 
reasonably documented in the code).  Our goal is to assemble a data or 
instruction fetch operation.

Once we have a 'ready' memory operation, we call 
theConsumer->consumeDataOperation().  This just marks that the consumer 
object is ready to provide data.  Note that in the real_hier_operate 
state machine, we've already called theConsumer->consumeInstOperation, 
which stores a reference to the instruction.  As Simics gives us more 
information about what the instruction does, we add to that object and 
then signal ready with consumeDataOperation.

Now, from the cache perspective (or some component that is going to act 
as the interface to the memory system), the connection to 
InorderSimicsFeeder is through a *pull* port.  This means that every 
cycle, the cache is going to check, "is the feeder ready to give me 
something", via an available() call.  Note what the 
InstructionOutputPort "available()" function does: it checks 
theConsumers[idx]->ready().  This is in InorderSimicsFeederImpl.cpp.

The consumeDataOperation marks the consumer as ready, and the cache will 
be checking that the consumer is ready.  When these line up, the cache 
'pulls' the data from the feeder by creating an 
ArchitecturalInstructionTag in the transport and getting the 
ready_instruction() from the consumer.  We don't pop the 
ready_instruction, but rather keep it around in a state machine that 
will eventually complete, allowing the feeder to return the stall cycles 
to Simics (have a look back in real_hier_operate for this 
end-of-transaction stuff).

Your question about reading data member of the class of 
SimicsTracerImpl: you can't/shouldn't directly, but rather use the port 
mechanism as explained above to get data to the cache.  If you have some 
new data field or information you need to pass, add it to the 
instruction object so it goes through the port.

Hope this helps, and let us know if you have more questions.

- Brian Gold

lu peng wrote:
> Hi, Tom,
>  
> Happy new year! I am trying to understand the connection between the 
> InorderSimicsFeeder and the cache subsystem (in version 1.0). Seems that 
> simics connects with the Flexus by the function of 'real_hier_operate()' 
> in SimicsTracer.hpp. The function 'real_hier_operate()' will call 
> theConsumer to do something if the operation is a data operation. My 
> question is: how these operations can be passed to the Cache subsystem? 
> Could you explain it and point which file & function are along the way? 
> Another question: can I read a data member of the class of 
> 'SimicsTracerImpl' in the code of the 'Cache' directory? If so, how? It 
> looks that each instance of 'SimicsTracerImpl' is associated with a cpu 
> object.
>  
> Thanks,
> Lu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> SimFlex mailing list
> [email protected]
> https://sos.ece.cmu.edu/mailman/listinfo/simflex
> SimFlex web page: http://www.ece.cmu.edu/~simflex
From penglu01 at hotmail.com  Sun Jan 22 17:46:12 2006
From: penglu01 at hotmail.com (lu peng)
List-Post: [email protected]
Date: Sun Jan 22 17:46:26 2006
Subject: [Simflex] A question
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>

Hi, Brian,

Thanks for your message. I got some general idea about the procedure. 
However, I still have some specific questions. Please see them inline.

>
>Your question about reading data member of the class of SimicsTracerImpl: 
>you can't/shouldn't directly, but rather use the port mechanism as 
>explained above to get data to the cache.  If you have some new data field 
>or information you need to pass, add it to the instruction object so it 
>goes through the port.
>
For each instruction or each memory operation, you created an instance of 
the object ArchitecturalInstruction. I have some new data fields in 
SimicsTracerImpl. So did you mean that I should add some related fields in 
this class and pass them to the Cache System? If so, more specifically, in 
which function & file does the cache system will 'pull' them out? I found 
many available() calls in the component/Cache directory. It looks that they 
called some functions such as FLEXUS_CHANNEL(TopOutI).available(). There are 
many MemoryPort instances such as BottomOut,TopOutI,TopOutD, etc.

In a word, if I modify a field in SimicsTracerImpl for an instruction or a 
memory operation, in which file & function of the Cache system can know 
this?

Thanks in advance,
Lu

Reply via email to