[gem5-users] Re: What is the role of TimeBuffer in gem5?

2020-11-03 Thread Daniel Gerzhoy via gem5-users
Hey guys,

I just interacted with it to fix a bug in the O3 cpu. Seems to me
a Timebuffer is how the pipeline stages communicate with each other.
Looks like a wrapper for the datastructures that
communicate between different stages, as "wires."
Each wire within a time buffer communicates between different stages, some
backwards, some forwards, each with a specific latency based on the config.
Every tick you advance() each of the buffers to propagate signals between
the stages.
When the data reaches its endpoint the timebuffer takes care of getting rid
of it.

In O3 its a little confusing because the timeBuffer object which takes care
of backwards communication is of type TimeBuffer ,
and there are the fetchQueue decodeQueue etc which are of type TimeBuffer
as well.

Hope this helps,

Dan

On Tue, Nov 3, 2020 at 11:49 AM Jason Lowe-Power via gem5-users <
gem5-users@gem5.org> wrote:

> Hello,
>
> I've been using gem5 for ~10 years, and this is the first time I've ever
> seen this code :D. It  was committed 14 years ago, and it hasn't been
> touched since.
>
> It looks to me like it's used for gathering statistics about the activity
> of different CPU pipeline stages. However, I *know* it's not actively
> maintained, so I would guess that it doesn't work anymore. As far as what
> it's doing, I think the comment in activity.hh is probably the best
> explanation:
>
> http://doxygen.gem5.org/release/current/classActivityRecorder.html#details
>
> Cheers,
> Jason
>
> On Tue, Nov 3, 2020 at 4:49 AM yujiecui--- via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> What does TimeBuffer in gem5 do? I read its source code, but there are no
>> comments and it is not easy to understand operations. I saw in the tick
>> function in the cpu.cc file that every tick() will proceed
>> timeBuffer.advance();
>> fetchQueue.advance();
>> decodeQueue.advance();
>> renameQueue.advance();
>> iewQueue.advance();
>> But the function of advance is
>> advance()
>> {
>>  if (++base >= size)
>> base = 0;
>> int ptr = base + future;
>> if (ptr >= (int)size)
>> ptr -= size;
>> (reinterpret_cast(index[ptr]))->~T();
>> std::memset(index[ptr], 0, sizeof(T));
>> new (index[ptr]) T;
>> }
>> Just looking at the source code, this is really hard to understand. I
>> think if someone can tell me what it is doing? I think it’s easier for me
>> to understand this code
>> ___
>> gem5-users mailing list -- gem5-users@gem5.org
>> To unsubscribe send an email to gem5-users-le...@gem5.org
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: What is the role of TimeBuffer in gem5?

2020-11-03 Thread Jason Lowe-Power via gem5-users
Hello,

I've been using gem5 for ~10 years, and this is the first time I've ever
seen this code :D. It  was committed 14 years ago, and it hasn't been
touched since.

It looks to me like it's used for gathering statistics about the activity
of different CPU pipeline stages. However, I *know* it's not actively
maintained, so I would guess that it doesn't work anymore. As far as what
it's doing, I think the comment in activity.hh is probably the best
explanation:

http://doxygen.gem5.org/release/current/classActivityRecorder.html#details

Cheers,
Jason

On Tue, Nov 3, 2020 at 4:49 AM yujiecui--- via gem5-users <
gem5-users@gem5.org> wrote:

> What does TimeBuffer in gem5 do? I read its source code, but there are no
> comments and it is not easy to understand operations. I saw in the tick
> function in the cpu.cc file that every tick() will proceed
> timeBuffer.advance();
> fetchQueue.advance();
> decodeQueue.advance();
> renameQueue.advance();
> iewQueue.advance();
> But the function of advance is
> advance()
> {
>  if (++base >= size)
> base = 0;
> int ptr = base + future;
> if (ptr >= (int)size)
> ptr -= size;
> (reinterpret_cast(index[ptr]))->~T();
> std::memset(index[ptr], 0, sizeof(T));
> new (index[ptr]) T;
> }
> Just looking at the source code, this is really hard to understand. I
> think if someone can tell me what it is doing? I think it’s easier for me
> to understand this code
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s