gem5.components.processors.complex_generator module

class gem5.components.processors.complex_generator.ComplexGenerator(num_cores: int = 1)

Bases: AbstractGenerator

abstract = False
add_linear(duration: str = '1ms', rate: str = '100GiB/s', block_size: int = 64, min_addr: int = 0, max_addr: int = 32768, rd_perc: int = 100, data_limit: int = 0) None

This function will add a linear traffic to all the cores in the generator with the params specified.

Parameters:
  • duration – The number of ticks for the generator core to generate traffic.

  • rate – The rate at which the synthetic data is read/written.

  • block_size – The number of bytes to be read/written with each request.

  • min_addr – The lower bound of the address range the generator will read/write from/to.

  • max_addr – The upper bound of the address range the generator will read/write from/to.

  • rd_perc – The percentage of read requests among all the generated requests. The write percentage would be equal to 100 - rd_perc.

  • data_limit – The amount of data in bytes to read/write by the generator before stopping generation.

add_random(duration: str = '1ms', rate: str = '100GiB/s', block_size: int = 64, min_addr: int = 0, max_addr: int = 32768, rd_perc: int = 100, data_limit: int = 0) None

This function will add a random traffic to all the cores in the generator with the params specified.

Parameters:
  • duration – The number of ticks for the generator core to generate traffic.

  • rate – The rate at which the synthetic data is read/written.

  • block_size – The number of bytes to be read/written with each request.

  • min_addr – The lower bound of the address range the generator will read/write from/to.

  • max_addr – The upper bound of the address range the generator will read/write from/to.

  • rd_perc – The percentage of read requests among all the generated requests. The write percentage would be equal to 100 - rd_perc.

  • data_limit – The amount of data in bytes to read/write by the generator before stopping generation.

cxx_exports = []
cxx_extra_bases = []
cxx_param_exports = []
cxx_template_params = []
set_traffic_from_python_generator(generator: Iterator[Any]) None

Sets the traffic pattern defined by generator argument.

Parameters:

generator – A python generator object that creates traffic patterns through calls to methods of PyTrafficGen.

start_traffic() None

This function will start the traffic at the top of the traffic list. It will also pop the first element so that the generator will start a new traffic everytime this is called.