As I'm sure you've all noticed, a new version of Ruby has been checked
in to the main m5 tree.  This new version was the result of an effort
to turn Ruby into a general library that could interface with a
variety of drivers.  Along the way a significant clean-up of the Ruby
code has occurred, as well as the addition of some new features, and
unfortunately the loss of some others.  I'll try to give a summary of
the major changes since the Ruby of GEMS 2.1 (which more or less was
the version that went into the original GEM5 tree) below and also
detail some additions planned for the future.

Changes Summary:

 1. Heterogeneous (object-based) configuration
 2. Ruby-lang configuration scripts
 3. DMA support
 4. Data support
 5. SLICC generated code improvements
 6. Code cleanup

Planned Changes:

 7. SLICCer
 8. Tighter M5 integration

Details:

1. The biggest internal changes to Ruby are all focused on making Ruby
more general.  In the previous version, many assumptions were made
about how many cache levels a system contains, what they are called,
etc.  This made it very difficult, for example, to add a third level
of cache; in addition to writing a new coherence protocol, you would
also have to write your own mapping functions, profiler hooks,
callbacks, etc.  In the new version, it's now possible to add a third
level of cache (or fourth, or fifth, or even a DMA controller) by
modifying a protocol and telling the configuration that it exists.
Much like M5, ruby components are now connected during initialization
using named ports, and there are very few remaining assumptions about
what is connected to one of those ports.

2. Probably the biggest user-visible change is the configuration, and
for better or worse that change is going to disappear.  The original
Ruby used a simple name:value list of parameters for configuration.
This limited Ruby to, among other things, homogeneous configurations
(e.g. all L1 caches have to be identical).  The new Ruby is now
configured on an individual component basis, making it possible to
specify rather arbitrary systems.  Again similar to M5, Ruby is now
configured in an object-oriented way using ruby-language
scripts.Converting these to python is high on the list of things to do
for a tighter M5 integration.

3. Ruby now supports coherent DMA accesses.  In addition to the
Ruby-side additions, this obviously requires protocol changes as well.
 So far MI_example and MESI_CMP have been adapted.

4. Ruby now handles data by default, rather than just calculating timing.

5. SLICC has also seen some non-trivial changes along the way.
Protocols no longer generate chip objects, and by extension no object
in Ruby expects there to be a chip.  SLICC now generates only the
coherence controllers, leaving it up to the Ruby system to decide how
those controllers should be connected.  Other changes made for the
sake generalization have unfortunately temporarily deprecated all
previous protocols with the exception of MI_example, which I have kept
in sync along the way.  The changes that need to be made to the other
protocols are very mechanical, though, and Somayeh Sardashti is
working on bringing some of them back (I believe MESI_CMP should be
checked in very soon). I have no plans to bring back the token
protocols, though, as they would require more substantial changes.  I
can certainly help anyone who would want to take on the task, though.

6. I have also done a lot of code cleanup in Ruby.  I've taken out
chunks of dead code, removed all LogTM and Simics related code, and
removed some functions that I didn't think belonged in Ruby like TSO
timing and SMT support (both of which belong in a cpu model).  Also
gone are the various drivers.  The tester has been removed from the
internals of Ruby and has been repurposed by Polina Dudnik as a Ruby
library driver.

7. As for future plans, there has been an effort here (though
admittedly it has been stalled for some time now) to develop the next
generation SLICC.  One of the main features of this next generation
SLICC (working name SLICCer) is it's efficiency; it is possible to
specify an identical protocol in SLICCer in about one tenth the lines
of code it would take in SLICC.  This efficiency comes through the
removal of needless redundancy in SLICC specifications, and also
through the use of implicit actions (for example, hit callbacks occur
automatically). SLICCer was also started with the goal of using it to
develop formal models of coherence protocols to aid in protocol
development.

8. The other, more obvious, future plan is to begin a tighter
itegration with M5.  As it exists now, Ruby compiles in the M5 binary
but otherwise has very little in common with the code.  Integrating
the configuration, stats, event queues, etc are all on the todo list.

-Derek
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to