Re: [Gems-users] Could Opal simulate MIPS?


Date: Mon, 6 Nov 2006 08:59:54 -0600 (CST)
From: Luke Yen <lyen@xxxxxxxxxxx>
Subject: Re: [Gems-users] Could Opal simulate MIPS?
> Dear all,
>
> We want to use Simics+Ruby+Opal to simulate a CMP system constructed by MIPS
> R10000 processors. However, we saw that Opal implements SPARC instruction
> set although it models after MIPS R10000. Further more, we find in Simics
> document that Simics only support Malta (MIPS 4kc) which looks like a
> embedded system. Does that mean Simics cannot simulate a CMP system with
> MIPS processors? Is it the reason why GEMS models Opal after MIPS R10000 but
> support SPARC instruction set?

   We were trying to model the high-level micro-architectural features of
the R10K, namely the traditional 5 stage pipeline.  We chose SPARC because
it was the first ISA first implemented by Simics, and we had used their
full system-sim from the beginning.

   If you want to migrate to MIPS, you would have to create your own
instruction decode and functionality.  See opal/system/dx.i for details on
how we currently do this for the SPARC instruction set.  As for whether
the Malta can support a general purpose CMP I cannot comment on that.  I
suggest you take a look at the actual instructions that it supports.  If
it is not too stripped down I can see it can be a straight-forward port
to MIPS.

>
> Another question: If we have a MIPS simulator, could we migrate Ruby to
> interface with our simulator and use our simulator sending memory
> transitions to Ruby such as Simics does?
>

   The important thing to keep in mind is that Opal is timing-first, that
is it can simulate the timing of an out-of-order processor but relies on
Simics to check and implement 100% functional correctness.  If your MIPS
simulator is 100% functionally correct all that is needed is a callback to Simics
to ask it to advance itself X instructions, since your MIPS sim would also
drive Simics execution.  We curently use SIM_continue() to do this.

   As for sending Ruby memory requests, this is feasible since we
currently use Opal to send memory requests to Ruby.  Opal and Ruby exchange
requests and callbacks through the OpalInterface, defined in
ruby/interfaces/OpalInterface.[Ch], while all Opal/Ruby API functions are declared in
ruby/interfaces/mf_api.h   Opal links its API callback functions in opal/system/system.[Ch], and you can
do the same to link Ruby callbacks to your simulator.

  When running with your simulator and Ruby, Simics will not send any
memory requests to Ruby, as your MIPS simulator will determine which
memory requests will get sent to Ruby.  Take a look at our ISCA slides
detailing Opal and Ruby interactions.

  Luke
[← Prev in Thread] Current Thread [Next in Thread→]