Yea, now that you say that,it does jog my memory on us starting to do this...

Hey, mercurial patchqueues ARE a good idea!

I'll fix it in this patch, then in a separate patch go through the
InOrder model and  make sure I'm conforming to the coding standard.

On Mon, Mar 2, 2009 at 12:15 PM, nathan binkert <[email protected]> wrote:
> We agreed to start to avoid using names like getfoo() and setfoo() and
> instead just have the get and set function both be called foo(), and
> the protected member variable should be called _foo.
>
> If you don't mind fixing it, that'd be nice.
>
>  Nate
>
> On Mon, Mar 2, 2009 at 7:58 AM, Korey Sewell <[email protected]> wrote:
>> # HG changeset patch
>> # User Korey Sewell <[email protected]>
>> # Date 1236007006 18000
>> # Node ID bcb6c464587b1ef278165ff41442b226fed2a4a9
>> # Parent  8340f7c1862ea4bcb29e6e018dbdb8ae19b282ce
>> Give TimeBuffer an ID that can be set. Necessary because InOrder uses 
>> generic stages so w/o an ID there is no way to differentiate buffers when 
>> debugging
>>
>> diff -r 8340f7c1862e -r bcb6c464587b src/base/timebuf.hh
>> --- a/src/base/timebuf.hh       Mon Mar 02 10:16:45 2009 -0500
>> +++ b/src/base/timebuf.hh       Mon Mar 02 10:16:46 2009 -0500
>> @@ -43,6 +43,7 @@ class TimeBuffer
>>     int past;
>>     int future;
>>     int size;
>> +    int id;
>>
>>     char *data;
>>     std::vector<char *> index;
>> @@ -148,6 +149,7 @@ class TimeBuffer
>>             new (ptr) T;
>>             ptr += sizeof(T);
>>         }
>> +        id = -1;
>>     }
>>
>>     TimeBuffer()
>> @@ -160,6 +162,16 @@ class TimeBuffer
>>         for (int i = 0; i < size; ++i)
>>             (reinterpret_cast<T *>(index[i]))->~T();
>>         delete [] data;
>> +    }
>> +
>> +    void setId(int _id)
>> +    {
>> +        id = _id;
>> +    }
>> +
>> +    int getId()
>> +    {
>> +        return id;
>>     }
>>
>>     void
>> diff -r 8340f7c1862e -r bcb6c464587b src/cpu/inorder/cpu.cc
>> --- a/src/cpu/inorder/cpu.cc    Mon Mar 02 10:16:45 2009 -0500
>> +++ b/src/cpu/inorder/cpu.cc    Mon Mar 02 10:16:46 2009 -0500
>> @@ -230,11 +230,9 @@ InOrderCPU::InOrderCPU(Params *params)
>>     }
>>
>>     // Initialize TimeBuffer Stage Queues
>> -    // For now just have these time buffers be pretty big.
>> -    // @note: This could be statically allocated but changes
>> -    // would have to be made to the standard time buffer class.
>>     for (int stNum=0; stNum < NumStages - 1; stNum++) {
>>         stageQueue[stNum] = new StageQueue(NumStages, NumStages);
>> +        stageQueue[stNum]->setId(stNum);
>>     }
>>
>>
>> diff -r 8340f7c1862e -r bcb6c464587b src/cpu/inorder/pipeline_stage.cc
>> --- a/src/cpu/inorder/pipeline_stage.cc Mon Mar 02 10:16:45 2009 -0500
>> +++ b/src/cpu/inorder/pipeline_stage.cc Mon Mar 02 10:16:46 2009 -0500
>> @@ -556,8 +556,8 @@ PipelineStage::sortInsts()
>>     if (prevStageValid) {
>>         int insts_from_prev_stage = prevStage->size;
>>
>> -        DPRINTF(InOrderStage, "%i insts available from previous stage.\n",
>> -                insts_from_prev_stage);
>> +        DPRINTF(InOrderStage, "%i insts available from stage buffer %i.\n",
>> +                insts_from_prev_stage, prevStageQueue->getId());
>>
>>         for (int i = 0; i < insts_from_prev_stage; ++i) {
>>
>> @@ -985,8 +985,9 @@ PipelineStage::sendInstToNextStage(DynIn
>>                     tid, cpu->pipelineStage[next_stage]->stageBufferAvail());
>>
>>             DPRINTF(InOrderStage, "[tid:%u]: [sn:%i]: being placed into  "
>> -                    "index %i stage %i queue.\n",
>> -                    tid, inst->seqNum, toNextStageIndex, inst->nextStage);
>> +                    "index %i of stage buffer %i queue.\n",
>> +                    tid, inst->seqNum, toNextStageIndex,
>> +                    
>> cpu->pipelineStage[prev_stage]->nextStageQueue->getId());
>>
>>             int next_stage_idx = 
>> cpu->pipelineStage[prev_stage]->nextStage->size;
>>
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>



-- 
----------
Korey L Sewell
Graduate Student - PhD Candidate
Computer Science & Engineering
University of Michigan
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to