system

package module
v0.0.0-...-de32f7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2017 License: MIT Imports: 5 Imported by: 2

README

System Build Status

The package provides an abstraction of an electronic system for the purpose of simulation. Such a system is composed of a platform and an application. A platform is a collection of processing elements, referred to as cores, and an application is a collection of data-dependent tasks, forming a directed acyclic graph.

Documentation

Contributing

  1. Fork the project.
  2. Implement your idea.
  3. Open a pull request.

Documentation

Overview

Package system provides an abstraction of an electronic system for the purpose of simulation. Such a system is composed of a platform and an application. A platform is a collection of processing elements, referred to as cores, and an application is a collection of data-dependent tasks, forming a directed acyclic graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path string) (*Platform, *Application, error)

Load constructs a platform and an application based on the specification given in a file. The only supported format is TGFF.

Types

type Application

type Application struct {
	Tasks []Task
}

Application represents an application as a collection of dependent tasks. The tasks are assumed to form a directed acyclic graph.

func (*Application) Leafs

func (self *Application) Leafs() []uint

Leafs returns the IDs of the tasks without children.

func (*Application) Len

func (self *Application) Len() int

Len returns the number of tasks.

func (*Application) Roots

func (self *Application) Roots() []uint

Roots returns the IDs of the tasks without parents.

type Core

type Core struct {
	ID    uint
	Time  []float64
	Power []float64
}

Core represents a processing element of a platform. Each core is characterized by two vectors: execution time (Time) and power consumption (Power). Each entry in these vectors corresponds to a task Type, not to a task ID (see the ID and Type fields of the Task struct).

type Platform

type Platform struct {
	Cores []Core
}

Platform represents a platform composed of a number of processing elements, referred to as cores, which is capable of running an application.

func (*Platform) Len

func (self *Platform) Len() int

Len returns the number of processing elements.

type Profile

type Profile struct {
	ASAP     []float64 // As Soon As Possible, the earliest start time
	ALAP     []float64 // As Late As Possible, the latest start time
	Mobility []float64 // max(0, ALAP - ASAP)
	// contains filtered or unexported fields
}

Profile captures various statistics about the tasks of an application running on a platform.

func NewProfile

func NewProfile(platform *Platform, application *Application) *Profile

NewProfile collects a profile of the given system. Since the mapping of the tasks onto the cores is assumed to be unknown at this stage, the profile is based on the average execution time of the tasks across all the cores.

type Task

type Task struct {
	ID       uint
	Type     uint
	Parents  []uint
	Children []uint
}

Task represents a task of an application. A task can have a number of children, which are tasks that depend on the current one (they can only proceed when this task is done). Each task is also given a type (Type), which is used for looking up the execution time and power consumption of the task when it is being executed of a core (see the definition of Core).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL