Crate gpcas_cpu_model

Source
Expand description

Defines the structure of an abstract CPU model and some helpful functions for working with it, as well as the corresponding file structure.

Any application working with the model should use the structs and definitions in this crate to ensure compatibility.

Modules§

config
Structs that describe a configuration of a specific model component.
default_latencies
The default latency in clock cycles for all instruction types.

Structs§

CpuModel
The configuration of an abstract CPU model.
FailedValidation
Error signaling a failed validation, carrying individual errors inside.
InstructionLatencies
Defines the amount of clock cycles each instruction type needs to execute.

Enums§

BranchPredictionError
Represents an error inside the configuration of a branch predictor.
ValidationError
An individual error of a model that was found during validation.

Functions§

validate
Validates the correctness of a CPU model configuration and returns a list of errors on failure.