Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #32605 > unrolled thread

essential features of modern day CPU architecure modeling technology

Started bymag <mag@nospam.com>
First post2016-01-08 09:52 -0800
Last post2016-01-28 05:32 -0800
Articles 5 — 3 participants

Back to article view | Back to comp.arch


Contents

  essential features of modern day CPU architecure modeling technology mag <mag@nospam.com> - 2016-01-08 09:52 -0800
    Re: essential features of modern day CPU architecure modeling technology MitchAlsup <MitchAlsup@aol.com> - 2016-01-08 16:31 -0800
      Re: essential features of modern day CPU architecure modeling technology mag <mag@nospam.com> - 2016-01-10 08:36 -0800
        Re: essential features of modern day CPU architecure modeling technology Theo Markettos <theom+news@chiark.greenend.org.uk> - 2016-01-12 18:58 +0000
          Re: essential features of modern day CPU architecure modeling technology mag <mag@nospam.com> - 2016-01-28 05:32 -0800

#32605 — essential features of modern day CPU architecure modeling technology

Frommag <mag@nospam.com>
Date2016-01-08 09:52 -0800
Subjectessential features of modern day CPU architecure modeling technology
Message-ID<20160108095238799-mag@nospam.com>
When you are looking to write architectural models to verify the 
benefit of a CPU architecture or architectural feature, what 
capabilities do you require in that technology?

Here are things I would require:

* Speed: To be able to run benchmarks in a reasonable amount of time
* Model the affects of caches: Cache policies, coherence policies
* Be able to model the hardware accurately (algorithmically but not 
necessarily 100% cycle accurately). In other words in situations when 
the HW has to perform a decision (like branch prediction) it can model 
that behavior correctly in accurate event order without necessarily
* Model asynchronous events: Interrupts
* Be able to be cycle approximate
* Be able to be cycle accurate (with maybe an incremental amount of 
effort and simulation slowdown)
* Portability: Be able to use it easily in various contexts (HW 
implementors can use it [without pulling out their last few hairs], the 
various software teams can use it [systems SW people, and even 
application developers without losing too much sleep])
Extensibility: Be able to build on it to test new architectures or 
different configurations of the same architecture

What are some things you look for not listed above or are any of the 
above actually not necessary in your experience and why?

Follow up question: What technologies you use (if you can tell) that 
incorporate these capabilities?

[toc] | [next] | [standalone]


#32608

FromMitchAlsup <MitchAlsup@aol.com>
Date2016-01-08 16:31 -0800
Message-ID<9b950e94-28d4-4a0a-ac19-868f60f21921@googlegroups.com>
In reply to#32605
When:: I have been writing those kinds of things for 40-odd years.
.......I start writing the code before the microarchitecture is even firm.

Speed:: No OS excursions:: a good metric is DIV 1000, that is simulation of
        a single instruction should take no more than 1000 native instructions.
        With OS excursions:: DIV 2000.

Accuracy:: Not-Bit-Level:: DIV 1000
           Bit-Level    :: DIV 1200

Asynchronous:: This has more to do with determining when to see the external event. This typically adds little, but requires running an OS excursion capable Simulator. DIV 2000.

Cycle approximate: why bother
Cycle accurate DIV 1000 or DIV 200 depending on OS excursions

Portable:: Academic: sure
           Industrial:: Only from the designted tools given the simulation team to the actual machine being simulated. No other portability is required. Good programming practices should not prevent portability, but when you get into bit munging for device control registers in the OS capable simulators, crap happens that harms portability.

Be able to access the native OS disk storage, and environment variables.

[toc] | [prev] | [next] | [standalone]


#32639

Frommag <mag@nospam.com>
Date2016-01-10 08:36 -0800
Message-ID<2016011008362014292-mag@nospam.com>
In reply to#32608
On 2016-01-09 00:31:41 +0000, MitchAlsup said:

> When:: I have been writing those kinds of things for 40-odd years.
> .......I start writing the code before the microarchitecture is even firm.
> 
> Speed:: No OS excursions:: a good metric is DIV 1000, that is simulation of
>         a single instruction should take no more than 1000 native instructions.
>         With OS excursions:: DIV 2000.
> 
> Accuracy:: Not-Bit-Level:: DIV 1000
>            Bit-Level    :: DIV 1200
> 
> Asynchronous:: This has more to do with determining when to see the 
> external event. This typically adds little, but requires running an OS 
> excursion capable Simulator. DIV 2000.
> 
> Cycle approximate: why bother

For performance reasons. Cycle accuracy entails slow down in my 
experience, but you get better results as you're usually modeling the 
pipeline accurately and thus have a clearer picture of what design 
you're actually going to implement. Likely you don't have a product 
until you can model at the cycle accurate level and do benchmarking 
therewith.

> Cycle accurate DIV 1000 or DIV 200 depending on OS excursions
> 
> Portable:: Academic: sure
>            Industrial:: Only from the designted tools given the 
> simulation team to the actual machine being simulated. No other 
> portability is required. Good programming practices should not prevent 
> portability, but when you get into bit munging for device control 
> registers in the OS capable simulators, crap happens that harms 
> portability.

In my experience portability has more to do with how well the model 
integrates well with the simulation tool(s) (can it run natively or 
does the simulator have to stop and run some other runtime 
environment/framework in which the model was created over some [usually 
inefficient and difficult to maintain] back-plane), with the foreign 
computer languages it has to talk to (preferebly we all use the same 
language that can model hardware at sufficiently required levels of 
abstraction, but often it's not the case yet [SystemC doesn't seem to 
have permeated all architectural modeling groups yet]), so 
alternatively it at least has the same ability to model hardware as a 
mature hardware modeling language but maybe using different (but 
hopefully similar) language expressions.

Also does it have the API to lend itself easily to multiple use cases: 
Can the hardware team use it easily for testing (there are many 
different ways but at a high level testing in simulation, testing in 
emulation, and testing in prototyping contexts), can the SW team use it 
to do many things for example easily create a tool chain that targets 
the hardware.

> 
> Be able to access the native OS disk storage, and environment variables.


Can you describe some modeling technology that meets these requirements 
with which you are familiar?

[toc] | [prev] | [next] | [standalone]


#32699

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2016-01-12 18:58 +0000
Message-ID<L4C*1mvPv@news.chiark.greenend.org.uk>
In reply to#32639
mag <mag@nospam.com> wrote:
> For performance reasons. Cycle accuracy entails slow down in my 
> experience, but you get better results as you're usually modeling the 
> pipeline accurately and thus have a clearer picture of what design 
> you're actually going to implement. Likely you don't have a product 
> until you can model at the cycle accurate level and do benchmarking 
> therewith.

The danger of even 'cycle accurate' simulation is that you can be rather
optimistic of what you can achieve in a single cycle.  'Oh, that's a
single-cycle floating point divide', 'let's make a million-way associative
cache'.  Which might work, if you don't mind trashing your clock frequency.

It's only when you repeatedly bash the synthesis tools (FPGA or ASIC) do you
get a good picture of how your feature affects the maximum clock rate.

It's very easy to throw in slow muxes or long combinatorial paths without
realising it when you're writing C/Gem5/SystemC - only when you fail timing
do you realise how bloody it is to make it work for real.

Theo

PS. Another fun feature of architectural simulators is when they implement
the bare minimum to (eg) boot Linux, and then walk away.  Which causes a
whole pile of pain if you try to use their components for other things, even
booting a different kernel to the one they specified.  Published results
from these simulators need to be scrutinised /very/ carefully.

[toc] | [prev] | [next] | [standalone]


#33219

Frommag <mag@nospam.com>
Date2016-01-28 05:32 -0800
Message-ID<2016012805325157126-mag@nospam.com>
In reply to#32699
On 2016-01-12 18:58:29 +0000, Theo Markettos said:

> mag <mag@nospam.com> wrote:
>> For performance reasons. Cycle accuracy entails slow down in my
>> experience, but you get better results as you're usually modeling the
>> pipeline accurately and thus have a clearer picture of what design
>> you're actually going to implement. Likely you don't have a product
>> until you can model at the cycle accurate level and do benchmarking
>> therewith.
> 
> The danger of even 'cycle accurate' simulation is that you can be rather
> optimistic of what you can achieve in a single cycle.  'Oh, that's a
> single-cycle floating point divide', 'let's make a million-way associative
> cache'.  Which might work, if you don't mind trashing your clock frequency.
Indeed!
> 
> It's only when you repeatedly bash the synthesis tools (FPGA or ASIC) do you
> get a good picture of how your feature affects the maximum clock rate.

What I've done in the past is use the technology information to inform 
how many levels of logic I can place in each pipe stage (say to meet a 
clock frequency target) and how much routing resources are available 
(used to determine what kind of bus/fabric [or catalog of 
buses/fabrics]) I can use and let that inform my microarchitecture and 
architecture and hence what I model.

There is a cost to product success in writing the HDL first and then 
synthesizing it to see if you hit PPA. You end of fooling yourself for 
a long time and by the time you see the real implementation you don't 
have time to react to hit your PPA goal.

> 
> It's very easy to throw in slow muxes or long combinatorial paths without
> realising it when you're writing C/Gem5/SystemC - only when you fail timing
> do you realise how bloody it is to make it work for real.

Unfortunately I still see this happening today.

The best architectures are those that are not necessarily wholey 
dictated by implementation possibilities, but are heavily influenced by 
them and can scale up better than their peers as implementation 
technologies improve.

> 
> Theo
> 
> PS. Another fun feature of architectural simulators is when they implement
> the bare minimum to (eg) boot Linux, and then walk away.  Which causes a
> whole pile of pain if you try to use their components for other things, even
> booting a different kernel to the one they specified.  Published results
> from these simulators need to be scrutinised /very/ carefully.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.arch


csiph-web