For stores, I don't believe that there is an existing way to check only
the registers that are used to compute the address.
You can probably do it quick and dirty with something like
bool eaRegsReady(DynInstPtr &inst) {
for(unsigned i = first_ea_reg; i < last_ea_reg + 1; i++) {
//-> and . may be mixed-up, you'll have to check
if(!inst->cpu->rename.scoreboard.get(inst->renameDestRegIdx(i))) {
return false;
}
}
return true;
}
I seem to recall the the register at index numSrcReg() - 2 is the store
data, so first_ea_reg might be 0 while late_ea_reg might be numSrcReg()
- 3 (but this sounds fishy).
You'll have to find out the bounds for yourself and make sure that they
are valid for all kind of stores.
Arthur.
Le 01/09/2015 10:58, Abhishek Rajgadia a écrit :
Thanks Arthur.
inst->readyToIssue() would be useful for Load instruction. For Store
instruction, there will be a register which will contain the data. I
want to check if the registers which will be needed to computer
effAddr are ready or not, no matter the register containing data is
ready or not.
Can I check in the instruction queue which registers are used for
address computation and if they are ready(for both load and store
instructions) ?
On Tue, Sep 1, 2015 at 2:25 PM, Arthur Perais <[email protected]
<mailto:[email protected]>> wrote:
Abhishek,
You can scan the memory dependency predictor (mem_dep_unit.hh) for
entries that 1) Relate to loads 2) Have the regReady field set to
true (means that source registers are ready but it may depend on a
previous store, depending on the memDepReady field).
Otherwise you can look at inst->readyToIssue(), that will be true
if both source registers are ready and the the memory dependency
is satisfied.
Hope it helps,
Arthur Perais.
Le 01/09/2015 06:34, Abhishek Rajgadia a écrit :
Dear All,
I am new to gem5. I am trying to figure out if memory
instructions in the instruction queue have those registers ready
which are used for effective address calculation.
How to perform this check?
--
Regards,
Abhishek Rajgadia
Electrical Engineering,
IIT Bombay
_______________________________________________
gem5-users mailing list
[email protected] <mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Arthur Perais
INRIA Bretagne Atlantique
Bâtiment 12E, Bureau E303, Campus de Beaulieu
35042 Rennes, France
_______________________________________________
gem5-users mailing list
[email protected] <mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Regards,
Abhishek Rajgadia
Electrical Engineering,
IIT Bombay
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Arthur Perais
INRIA Bretagne Atlantique
Bâtiment 12E, Bureau E303, Campus de Beaulieu
35042 Rennes, France
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users