From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com, sid@sources.redhat.com
Subject: Re: [patch][rfa] CGEN Model Support for SID
Date: Mon, 14 Apr 2003 14:49:00 -0000 [thread overview]
Message-ID: <3E9ACA6A.3080300@redhat.com> (raw)
In-Reply-To: <3E88B3D9.6060000@redhat.com>
No comments on this? Too much or too little information?
OK to commit?
Dave
Dave Brolley wrote:
> Hi,
>
> This submission cleans up the partially adapted support for CGEN
> models for SID and enables it. Attached are patches for CGEN and SID
> which accomplish this:
>
> o sid-model.patch.txt's: Patches for CGEN and SID
> o cgen-model.h: New class definition in sid/component/cgen-cpu
> o *.ChangeLog: ChangeLogs for the above
>
> Also attached are examples of the generated code and suggested usage
> for the xstormy16:
>
> o xstormy16-model.{cxx,h}: CGEN-generated model code
> o xstormy16-model-gen.patch.txt: Additional code generated into
> xstormy16-decode.h and xstormy16-sem.cxx
> o xstormy16-model.patch.txt: Patch showing suggest usage of the
> generated code by a SID cgen-cpu.
>
> Notes:
>
> o The implementation is similar to the existing implementation for
> sim/common simulators except:
> - The generated functions are encapsulated into a class:
> <prefix>_<model>_model
> - Functions are generated for modelling each insn both before and
> after execution. The sim/common implementation only generated a
> function to be called after execution, however, there was a need for
> modelling both before and after in the implementaion of the FRV
> simulator which was handled somewhat awkwardly. Therefore I added this
> capability for this implementation.
> - As in the existing sim/common implementation, there are hooks
> provided (at the cgen-model level) for modelling before and after
> groups of parallel insns.
>
> A general outline of the design follows:
>
> o A new class, cgen-model, has been defined in
> sid/component/cgen-cpu/cgen-model.h. It provides the methods for
> modelling before and after groups of parallel insns with default
> virtual implementations and keeps a pointer to the cpu for reporting
> computed latencies.
>
> o The script sid/component/cgen-cpu/CGEN.sh has been enhanced to
> process the option 'with-profile=fn' and to generate the files
> model.cxx and model.h.
>
> o For each model (cgen model) used by a all machines (cgen mach) being
> generated, a class, @prefix@_@model@_model is generated in
> sid/component/cgen-cpu/@cpu@/@prefix@-model.{cxx,h}. These classes
> each inherit from cgen-cpu and implement the functions for modelling
> each unit before and after each insn. Default virtual implementations
> are provided as well as a table mapping each insn to its unit
> modelling functions and functions for indexing the table to make the
> calls.
>
> o The generated code, as is, is complete and implements default
> latency computations as defined by the (timing ...) elements of each
> insn in the .cpu file.
>
> o Since the default implementations are virtual, the programmer may
> inherit the generated class(es) to implement more complex modelling
> behavior for each unit of each model as needed.
>
> o Calls to the modelling functions are inserted, as necessary, into
> the cpu's step_insns method. See xstormy16-model.patch.txt for an
> example.
>
> This implementation has been tested on xstormy16 and an internal port
> which makes extensive use of this new work. Other ports are not
> affected since they do not make use of this functionality.
>
> I am seeking comments leading toward approval to commit the general
> changes. I can also commit the xtormy16-specific code if folks think
> it would be of use as an example.
>
> Dave
next prev parent reply other threads:[~2003-04-14 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-31 21:30 Dave Brolley
2003-04-14 14:49 ` Dave Brolley [this message]
2003-04-14 14:53 ` Frank Ch. Eigler
2003-04-16 19:56 ` Dave Brolley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E9ACA6A.3080300@redhat.com \
--to=brolley@redhat.com \
--cc=cgen@sources.redhat.com \
--cc=sid@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).