This is an old revision of the document!


Simulation library

The simulation library is a collection of components which will aid you in testing and verifying your designs. Components in this library are decidedly not synthesizable and should never be included in a final design. A lot of the components use actsim's capability to call external C functions from within CHP code.

All components of the simulation library can be found within the sim namespace. There are several sub-namespaces which contain components which fall under the same group. You can access all these components by importing the sim namespace.

import sim;

Components

  • Sources are components which emit tokens onto channels; multiple ways of specifying the data are supported
  • Sinks are the opposite of sources; they absorb tokens
  • Scoreboards are an advanced form of sink; they can compare a model output with the actual micro-architecture to verify the latter
  • Loggers provide a simple way of extracting data tokens from a channel without influencing visibility for the components they connect
  • The library also provides an infinite capacity buffer, which removes possible timing influences of the simulation harness
  • Random number generators are special sources, which output random tokens
  • Lastly, the library also exposes the functions used for file interaction