Before all

Key interfaces

  1. SST::Component: basic class for simulation objects
  2. SST::Event: interactions between components or recurring events like component clock ticks
    1. Event class can have handler with form of void func(Event* ev). The handler will invoke a given member function whenever triggered.
    2. The handler is templated with () operator overloaded to call the member function on the object
      // event.h
      template <typename classT, typename dataT = void>
      using Handler = SSTHandler<void, Event*, false, classT, dataT>;
      
      // ssthandler.h, how to pass the handler function to the event
      template <typename returnT, typename argT, bool createIdT, typename classT, typename dataT = void>
      class SSTHandler : public SSTHandlerBase<returnT, argT, createIdT>
      {
      
      ...
      
      /** Constructor
       * @param object - Pointer to Object upon which to call the handler
       * @param member - Member function to call as the handler
       * @param data - Additional argument to pass to handler
       */
      SSTHandler(classT* const object, PtrMember member, dataT data) :
          SSTHandlerBase<returnT, argT, createIdT>(),
          object(object),
          member(member),
          data(data)
      {}
      
    3. An example:
      // NICeventHandler(ev) will call the 
      // proc::handle_nic_events on Event ev
      NICeventHandler = new Event::Handler<proc>
          (this, &proc::handle_nic_events);
          
      ...
      
      bool proc::handle_nic_events(Event *event) {
      
      ...
      
      }
      
    4. Can handle either type of the events
  3. Using the Event Handlers
    1. Need to register handler for link or clock
    2. SST::Component::configureLink()
    3. SST::Component::registerClock()
  4. SST::Link: communicate components by passing events
    1. Specified in Python configuration file

Basically an SST component is comprised of the constructor and setup functions (Setup() and Init()) to perform any necessary setup. During these functions, handlers should be bound to the links/ports of the components to handle transcations. In addition, depend on the component, the clock event should also be handle.

Running the SST

  1. sst [FLAGS] CONFIG_FILE
    1. Ex:
    # in miranda/
    sst -n 24 tests/randomgen.py -v
    
  2. Enabling logging
    1. Set the verbose param in the Python script
    2. Ex: change the 0 to 1 will enable all logging statements with level <= 1
    # Define the simulation components
    comp_cpu = sst.Component("cpu", "miranda.BaseCPU")
    comp_cpu.addParams({
        "verbose" : 0,
        "printStats" : 1,
    })
    
  3. Running Vanadis
    1. Use the basic test script

Standard Memory interface

In the core source code under interface folder.

MMIO

Not an interface in SST, implemented with the standardmem interface? check its handlers.

Check the handle functions of standardmem

  1. read/write request: from other device to this
  2. read/write response: from this to other
  3. There is an example MMIO component in memHierarchy/testcpu/standardMMIO.h

Balar

How it work

  1. Based on Ariel? connected to Pin, which generates trace info
  2. Catch the cuda calls in ariel via pin traces? and send to balar: ariel/frontend/simple/fesimple.cc
  3. When building balar, do not specify the mpi compiler in the element config script