execution unit: model of an execution unit

This includes EIQ, a pipeline (scalar or vector) and a writeback queue.

The commit also includes scoreboard models for scalar register files, and
vector register files.

Change-Id: I6f4f116dd06d45ab76182dc09b35ce6aa69afc0d
4 files changed
tree: 400d9469f9f6381816fa1fd2101991606c1c9219
  1. config/
  2. buffered_queue.py
  3. counter.py
  4. cpu.py
  5. disassembler.py
  6. exec_unit.py
  7. fetch_unit.py
  8. functional_trace.py
  9. gentrace-spike.py
  10. instruction.fbs
  11. instruction.py
  12. interfaces.py
  13. README.md
  14. scalar_pipe.py
  15. sched_unit.py
  16. scoreboard.py
  17. tbm.py
  18. tbm_options.py
  19. utilities.py
  20. vector_pipe.py
README.md

Trace Based Model (TBM)

Code structure

Executables:

  • gentrace-spike.py - reads a Spike trace and reformat it. We expect to support other functional simulators, each of those will have its own gentrace-*.py file.
  • tbm.py - runs a trace in TBM; the main tool here.
  • merge-counters.py - merges results from multiple runs of TBM.

Python modules:

NOTE: currently TBM includes a single model for each of the building block units. The intention is that other models will be added in the future to cover uArchs that are not supported by the current models. interfaces.py defines (what we expect to be) the API of the building blocks.

  • counter.py - performance counters.
  • cpu.py - defines CPU, a cpu model (includes instances of FetchUnit, SchedUnit, ExecUnit, and MemorySystem).
  • disassembler.py - bits we need to elaborate Spike traces.
  • exec_unit.py - defines ExecUnit, an execution unit model (includes instances of ScalarPipe, VectorPipe, scoreboard.Preemptive and scoreboard.VecPreemptive).
  • fetch_unit.py - defines FetchUnit.
  • instruction.fbs - FlatBuffer schema for the Instruction data class (used for saving elaborated traces). The FBInstruction.Instruction module is generated from this file.
  • instruction.py - defines Instruction, a data class representing a single instruction instance in the trace.
  • interfaces.py - defines the internal API. This will be more important when we add different models (i.e. implementations) for the various units.
  • memory_system.py - defines MemorySystem, a main memory and cache hierarchy model.
  • queue.py - defines Queue, FIFO queue model.
  • scalar_pipe.py - defines ScalarPipe, a scalar functional unit model.
  • sched_unit.py - defines SchedUnit, an issue queue model.
  • scoreboard.py - defines Preemptive and VecPreemptive, scoreboard models.
  • tbm_options.py - command line parsing for tbm.py.
  • trace.py - reads a trace (as generated by gentrace-*.py).
  • utilities.py - general purpose constructs.
  • vector_pipe.py - defines VectorPipe, a vector functional unit model.

Other files:

  • config/uarch.schema.json - JSON schema for uArch configuration files.
  • config/default_arch.yaml - a uArch configuration example.