Skip to content
Snippets Groups Projects
  1. Oct 20, 2014
  2. Oct 16, 2014
    • Andreas Hansson's avatar
      mem: Modernise PhysicalMemory with C++11 features · 043672f4
      Andreas Hansson authored
      Bring the PhysicalMemory up-to-date by making use of range-based for
      loops and vector intialisation where possible.
      043672f4
    • Andreas Hansson's avatar
      misc: Move AddrRangeList from port.hh to addr_range.hh · 1d1e44e5
      Andreas Hansson authored
      The new location seems like a better fit. The iterator typedefs are
      removed in favour of using C++11 auto.
      1d1e44e5
    • Andreas Sandberg's avatar
      ext: Update fputils to rev 6a47fd8358 · 2d79179a
      Andreas Sandberg authored
      This patch updates fputils to the latest revision (6a47fd8358) from
      the upstream repository (github.com/andysan/fputils). Most notably,
      this includes changes that export a limited set of 64-bit float
      manipulation and avoids a warning about unused 64-bit floats in clang.
      2d79179a
    • Geoffrey Blake's avatar
      dev: refactor pci config space for sysfs scanning · a0139d0d
      Geoffrey Blake authored
      Sysfs on ubuntu scrapes the entire PCI config space
      when it discovers a device using 4 byte accesses.
      This was not supported by our devices, in particular the NIC
      that implemented the extended PCI config space.  This change
      allows the extended PCI config space to be accessed by
      sysfs properly.
      a0139d0d
    • Andrew Bardsley's avatar
      mem: Add ExternalMaster and ExternalSlave ports · 75a1a67d
      Andrew Bardsley authored
      This patch adds two MemoryObject's: ExternalMaster and ExternalSlave.
      Each object has a single port which can be bound to an externally-
      provided bridge to a port of another simulation system at
      initialisation.
      75a1a67d
    • Andrew Bardsley's avatar
      sim: SystemC hosting · 0115992e
      Andrew Bardsley authored
      This patch hosts gem5 onto SystemC scheduler. There's already an upstream
      review board patch that does something similar but this patch ...:
      
       1) is less obtrusive to the existing gem5 code organisation. It's divided
       into the 'generic' preparatory patches (already submitted) and this patch
       which affects no existing files
      
       2) does not try to exactly track the gem5 event queue with notifys into
       SystemC and so doesn't requive the event queue to be modified for
       anything other than 'out of event queue' scheduling events
      
       3) supports debug logging with SC_REPORT
      
      The patch consists of the files:
          util/systemc/
              sc_gem5_control.{cc,hh} -- top level objects to use to
                                         instantiate gem5 Systems within
                                         larger SystemC test harnesses as
                                         sc_module objects
              sc_logger.{cc,hh}       -- logging support
              sc_module.{cc,hh}       -- a separated event loop specific to
                                         SystemC
              stats.{cc,hh}           -- example Stats handling for the sample
                                         top level
              main.{cc,hh}            -- a sample top level
      
      On the downside this patch is only currently functional with C++
      configuration at the top level.
      
      The above sc_... files are indended to be compiled alongside gem5 (as a
      library, see main.cc for a command line and util/systemc/README for
      more details.)
      
      The top-level system instantiation in sc_gem5_control.{cc,hh} provides
      two classes: Gem5Control and Gem5System
      
      Gem5Control is a simulation control class (from which a singleton
      object should be created) derived from Gem5SystemC::Module which
      carries the top level simulation control interface for gem5.  This
      includes hosting a system-building configuration file and
      instantiating the Root object from that file.
      
      Gem5System is a base class for instantiating renamed gem5 Systems
      from the config file hosted by the Gem5Control object.  In use, a
      SystemC module class should be made which represents the desired,
      instantiable gem5 System.  That class's instances should create
      a Gem5System during their construction, set the parameters of that
      system and then call instantiate to build that system.  If this
      is all carried out in the sc_core::sc_module-derived classes
      constructor, the System's external ports will become children of
      that module and can then be recovered by name using sc_core::
      sc_find_object.
      
      It is intended that this interface is used with dlopen.  To that
      end, the header file sc_gem5_control.hh includes no other header
      files from gem5 (and so can be easily copied into another project).
      The classes Gem5System and Gem5Control have all their member
      functions declared `virtual' so that those functions can be called
      through the vtable acquired by building the top level Gem5Control
      using dlsym(..., "makeGem5Control") and `makeSystem' on the
      Gem5Control.
      0115992e
    • Andreas Hansson's avatar
      sim: EventQueue wakeup on events scheduled outside the event loop · 7a8e7367
      Andreas Hansson authored
      This patch adds a 'wakeup' member function to EventQueue which should be
      called on an event queue whenever an event is scheduled on the event queue
      from outside code within the call tree of the gem5 event loop.
      
      This clearly isn't necessary for normal gem5 EventQueue operation but
      becomes the minimum necessary interface to allow hosting gem5's event loop
      onto other schedulers where there may be calls into gem5 from external
      code which schedules events onto an EventQueue between the current time and
      the time of the next scheduled event.
      
      The use case I have in mind is a SystemC hosting where the event loop is:
      
          while (more events) {
              wait(time_to_next_event or wakeup)
              setCurTick
              service events at this time
          }
      
      where the 'wait' needs to be woken up if time_to_next_event becomes shorter
      due to a scheduled event from SystemC arriving in a gem5 object.
      
      Requiring 'wakeup' to be called is a more efficient interface than
      requiring all gem5 event scheduling actions to affect the host scheduler.
      
      This interface could be located elsewhere, say on another global object,
      or by being passed by the host scheduler to objects which will schedule
      such events, but it seems cleanest to put it on EventQueue as it is
      actually a signal to the queue.
      
      EventQueue::wakeup is called for async_event events on event queue 0 as
      it's only important that *some* queue be triggered for such events.
      7a8e7367
    • Andrew Bardsley's avatar
      base: Reimplement the DPRINTF mechanism in a Logger class · 32797e10
      Andrew Bardsley authored
      This patch adds a Logger class encapsulating dprintf.  This allows
      variants of DPRINTF logging to be constructed and substituted in
      place of the default behaviour.
      
      The Logger provides a logMessage(when, name, format, ...) member
      function like Trace::dprintf and a getOstream member function to
      use a raw ostream for logging.
      
      A class OstreamLogger is provided which generates the customary
      debugging output with Trace::OstreamLogger::logMessage being the
      old Trace::dprintf.
      32797e10
    • Andreas Hansson's avatar
      arch: Use shared_ptr for all Faults · 50d52dbd
      Andreas Hansson authored
      This patch takes quite a large step in transitioning from the ad-hoc
      RefCountingPtr to the c++11 shared_ptr by adopting its use for all
      Faults. There are no changes in behaviour, and the code modifications
      are mostly just replacing "new" with "make_shared".
      50d52dbd
    • Andreas Hansson's avatar
      o3: Use shared_ptr for MemDepEntry · 65a40800
      Andreas Hansson authored
      This patch transitions the o3 MemDepEntry from the ad-hoc
      RefCountingPtr to the c++11 shared_ptr. There are no changes in
      behaviour, and the code modifications are mainly replacing "new" with
      "make_shared".
      65a40800
    • Andreas Hansson's avatar
      mem: Use shared_ptr for Ruby Message classes · b4197a38
      Andreas Hansson authored
      This patch transitions the Ruby Message and its derived classes from
      the ad-hoc RefCountingPtr to the c++11 shared_ptr. There are no
      changes in behaviour, and the code modifications are mainly replacing
      "new" with "make_shared".
      
      The cloning of derived messages is slightly changed as they previously
      relied on overriding the base-class through covariant return types.
      b4197a38
    • Andreas Hansson's avatar
      base: Use shared_ptr for stat Node · e8686a4e
      Andreas Hansson authored
      This patch transitions the stat Node and its derived classes from
      the ad-hoc RefCountingPtr to the c++11 shared_ptr. There are no
      changes in behaviour, and the code modifications are mainly replacing
      "new" with "make_shared".
      e8686a4e
    • Andreas Hansson's avatar
      1e2a30be
    • Andreas Hansson's avatar
      dev: Use shared_ptr for EthPacketData · b8739f76
      Andreas Hansson authored
      This patch transitions the EthPacketData from the ad-hoc
      RefCountingPtr to the c++11 shared_ptr. There are no changes in
      behaviour, and the code modifications are mainly replacing "new" with
      "make_shared".
      
      The bool casting operator for the shared_ptr is explicit, and we must
      therefore either cast it, compare it to NULL (p != nullptr), double
      negate it (!!p) or do a (p ? true : false).
      b8739f76
    • Andreas Hansson's avatar
      dev: Use shared_ptr for Arguments::Data · 17476a5d
      Andreas Hansson authored
      This patch takes a first few steps in transitioning from the ad-hoc
      RefCountingPtr to the c++11 shared_ptr. There are no changes in
      behaviour, and the code modifications are mainly introducing the
      use of make_shared.
      
      Note that the class could use unique_ptr rather than shared_ptr, was
      it not for the postfix increment and decrement operators.
      17476a5d
    • Andreas Hansson's avatar
      arch,x86,mem: Dynamically determine the ISA for Ruby store check · ac92174b
      Andreas Hansson authored
      This patch makes the memory system ISA-agnostic by enabling the Ruby
      Sequencer to dynamically determine if it has to do a store check. To
      enable this check, the ISA is encoded as an enum, and the system
      is able to provide the ISA to the Sequencer at run time.
      ac92174b
    • Andreas Hansson's avatar
      mem: Dynamically determine page bytes in memory components · 2b5e6d6e
      Andreas Hansson authored
      This patch takes a step towards an ISA-agnostic memory
      system by enabling the components to establish the page size after
      instantiation. The swap operation in the memory is now also allowing
      any granularity to avoid depending on the IntReg of the ISA.
      2b5e6d6e
    • Andreas Sandberg's avatar
    • Andreas Sandberg's avatar
      cpu: Probe points for basic PMU stats · 0b0b8509
      Andreas Sandberg authored
      This changeset adds probe points that can be used to implement PMU
      counters for CPU stats. The following probes are supported:
      
        * BaseCPU::ppCycles / Cycles
        * BaseCPU::ppRetiredInsts / RetiredInsts
        * BaseCPU::ppRetiredLoads / RetiredLoads
        * BaseCPU::ppRetiredStores / RetiredStores
        * BaseCPU::ppRetiredBranches RetiredBranches
      0b0b8509
    • Andreas Sandberg's avatar
      arm: Add TLB PMU probes · 8424d3db
      Andreas Sandberg authored
      This changeset adds probe points that can be used to implement PMU
      counters for TLB stats. The following probes are supported:
      
      * ArmISA::TLB::ppRefills / TLB Refills (TLB insertions)
      8424d3db
    • Andreas Sandberg's avatar
      cpu: Add branch predictor PMU probe points · 1c37353b
      Andreas Sandberg authored
      This changeset adds probe points that can be used to implement PMU
      counters for branch predictor stats. The following probes are
      supported:
      
       * BPRedUnit::ppBranches / Branches
       * BPRedUnit::ppMisses / Misses
      1c37353b
    • Andreas Sandberg's avatar
      arm: Add a model of an ARM PMUv3 · a7164d51
      Andreas Sandberg authored
      This class implements a subset of the ARM PMU v3 specification as
      described in the ARMv8 reference manual. It supports most of the
      features of the PMU, however the following features are known to be
      missing:
      
       * Event filtering (e.g., from different privilege levels).
       * Access controls (the PMU currently ignores the execution level).
       * The chain counter (event no. 0x1E) is unimplemented.
      
      The PMU itself does not implement any events, it merely provides an
      interface for the configuration scripts to hook up probes that drive
      events. Configuration scripts should call addEventProbe() to configure
      custom events or high-level methods to configure architected
      events. The Python implementation of addEventProbe() automatically
      delays event type registration until after instantiation.
      
      In order to support CPU switching and some combined counters (e.g.,
      memory references synthesized from loads and stores), the PMU allows
      multiple probes per event type. When creating a system that switches
      between CPU models that share the same PMU, PMU events for all of the
      CPU models can be registered with the PMU.
      
      Kudos to Matt Horsnell for the initial gem5 implementation of the PMU.
      a7164d51
    • Andreas Sandberg's avatar
      sim: Add typedefs for PMU probe points · 71f99285
      Andreas Sandberg authored
      In order to show make PMU probe points usable across different PMU
      implementations, we want a common probe interface. This patch the
      namespace ProbePoins that contains typedefs for probe points that are
      shared between multiple SimObjects. It also adds typedefs for the PMU
      probe interface.
      71f99285
    • Andreas Sandberg's avatar
      sim: Add support for serializing BitUnionXX · 844b7267
      Andreas Sandberg authored
      BitUnion instances can normally not be used with the SERIALIZE_SCALAR
      and UNSERIALIZE_SCALAR macros due to the way they are converted
      between their storage type and their actual type. This changeset adds
      a set of parm(In|Out) functions specifically for gem5 bit unions to
      work around the issue.
      844b7267
    • Andreas Hansson's avatar
      config: Add the ability to read a config file using C++ and Python · 0b47cc7e
      Andreas Hansson authored
      This patch adds the ability to load in config.ini files generated from
      gem5 into another instance of gem5 built without Python configuration
      support. The intended use case is for configuring gem5 when it is a
      library embedded in another simulation system.
      
      A parallel config file reader is also provided purely in Python to
      demonstrate the approach taken and to provided similar functionality
      for as-yet-unknown use models. The Python configuration file reader
      can read both .ini and .json files.
      
      C++ configuration file reading:
      
      A command line option has been added for scons to enable C++ configuration
      file reading: --with-cxx-config
      
      There is an example in util/cxx_config that shows C++ configuration in action.
      util/cxx_config/README explains how to build the example.
      
      Configuration is achieved by the object CxxConfigManager. It handles
      reading object descriptions from a CxxConfigFileBase object which
      wraps a config file reader. The wrapper class CxxIniFile is provided
      which wraps an IniFile for reading .ini files. Reading .json files
      from C++ would be possible with a similar wrapper and a JSON parser.
      
      After reading object descriptions, CxxConfigManager creates
      SimObjectParam-derived objects from the classes in the (generated with this
      patch) directory build/ARCH/cxx_config
      
      CxxConfigManager can then build SimObjects from those SimObjectParams (in an
      order dictated by the SimObject-value parameters on other objects) and bind
      ports of the produced SimObjects.
      
      A minimal set of instantiate-replacing member functions are provided by
      CxxConfigManager and few of the member functions of SimObject (such as drain)
      are extended onto CxxConfigManager.
      
      Python configuration file reading (configs/example/read_config.py):
      
      A Python version of the reader is also supplied with a similar interface to
      CxxConfigFileBase (In Python: ConfigFile) to config file readers.
      
      The Python config file reading will handle both .ini and .json files.
      
      The object construction strategy is slightly different in Python from the C++
      reader as you need to avoid objects prematurely becoming the children of other
      objects when setting parameters.
      
      Port binding also needs to be strictly in the same port-index order as the
      original instantiation.
      0b47cc7e
    • Andreas Hansson's avatar
      scons: Add Undefined Behavior Sanitizer (UBSan) option · 96f745ea
      Andreas Hansson authored
      This patch adds the Undefined Behavior Sanitizer (UBSan) for clang and
      gcc >= 4.9. Due to the performance impact, the usage is guarded by a
      command-line option.
      96f745ea
  3. Sep 22, 2014
  4. Aug 12, 2014
  5. Oct 16, 2014
  6. Oct 11, 2014
Loading