Traffic Gen


Q&A

  • How to run traffic gen
    • ———————–

Overview

(src/cpu/testers/traffic_gen/traffic_gen.hh) describes a state transition graph where each state is a specific generator behaviour. Examples include idling, generating linear address sequences, random sequences and replay of captured traces. By describing these behaviours as states, it is straight forward to create very complex behaviours, simply by arranging them in graphs. The graph transitions can also be annotated with probabilities, effectively making it a Markov Chain.

Example Usage

in configs/dram/lat_mem_rd.py

This script is helpful to observe the memory latency for various levels in a cache hierarchy, and various cache and memory configurations, in essence replicating the lmbench lat_mem_rd thrash behavior

  1. Collect memory traces. This script create random trace by iteself.
    • in create_trace(filename, max_addr, burst_size, itt)
    • with names like lat_mem_rd0.trc.gz
  2. Create config file for TrafficGen.
    • Put the trace file name in cfg file: STATE 0 153600000 TRACE m5out/lat_mem_rd0.trc.gz 0
  3. Create TrafficGen: system.tgen = TrafficGen(...)
  4. Configure port connection: system.tgen.port = system.monitor.slave.
  5. System monitor is connected to L1_DCache: system.monitor.master = system.l1cache.cpu_side

Reference 1


  1. reference ↩
Created Jun 18, 2020 // Last Updated May 18, 2021

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?