Hi Gabe,

I totally agree with you on this.
I think it’s also quite a blocker when learning gem5 as it makes the code 
difficult to follow and understand.
Do you intend to do it as one big patch or split that into several steps (if 
that’s possible)?

Thanks,
Nathanael

From: Gabe Black via gem5-dev [mailto:[email protected]]
Sent: Saturday, February 27, 2021 11:13 AM
To: gem5 Developer List <[email protected]>
Cc: Gabe Black <[email protected]>
Subject: [gem5-dev] de-templating the O3 CPU

Hi folks. The O3 CPU uses templates pretty heavily, I think nominally to make 
it possible to switch in different parts of the CPU to change how, for example, 
a pipeline stage is implemented.

Realistically, the different parts of the CPU are probably too interdependent 
for that to actually work, and all the templates and indirection make the code 
a lot more complicated than it really needs to be.

Also, there is a pseudo-generic dynamic instruction base class in 
cpu/base_dyn_inst.hh which could, again theoretically, be used as a base class 
for other CPUs to reuse. Unfortunately that too is probably too tied to its 
only consumer, the O3 CPU, to be realistically reusable.

I would like to merge the base dynamic instruction class into the O3 version, 
and then de-templatize the whole O3 CPU. I think that will make the code a lot 
easier to work on, and I think our ability to maintain and update O3 is 
something we need to improve in at least the medium term.

Any thoughts? Objections? Votes of support?

Gabe
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to