pub struct CpuModel {
pub max_vector_size: usize,
pub execution_latencies: InstructionLatencies,
pub fetch: Fetch,
pub memory_controller: MemoryController,
pub caches: Vec<Cache>,
pub decoder: Decoder,
pub reorder_buffer: ReorderBuffer,
pub dispatch_cycle_count: usize,
pub register_file: RegisterFile,
pub schedulers: Vec<Scheduler>,
pub pipelines: Vec<Pipeline>,
pub load_store_unit: LoadStoreUnit,
}Expand description
The configuration of an abstract CPU model.
Fields§
§max_vector_size: usizeThe maximum supported vector size of the model in bits.
execution_latencies: InstructionLatenciesThe ALU latency of each instruction class.
fetch: FetchConfiguration for the fetch stage of the front end.
memory_controller: MemoryControllerConfiguration for the memory controller.
caches: Vec<Cache>Caches of the memory hierarchy.
decoder: DecoderConfiguration for the decode stage of the front end.
reorder_buffer: ReorderBufferConfiguration for the reorder buffer.
dispatch_cycle_count: usizeHow many cycles the dispatch unit needs to dispatch an instruction.
register_file: RegisterFileConfiguration of the register file.
schedulers: Vec<Scheduler>Configuration of schedulers.
pipelines: Vec<Pipeline>Configuration for each pipeline from just after the front end to the last stage.
load_store_unit: LoadStoreUnitConfiguration of the load/store unit.
Implementations§
Source§impl CpuModel
impl CpuModel
Sourcepub fn validate(&self, isa: &Isa) -> Result<(), FailedValidation>
pub fn validate(&self, isa: &Isa) -> Result<(), FailedValidation>
Validates the model for a correct configuration.
This does the same as validation::validate and can be used if one prefers an object oriented interface.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CpuModel
impl<'de> Deserialize<'de> for CpuModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GpcasFileStruct for CpuModel
impl GpcasFileStruct for CpuModel
Source§const FILE_IDENTIFIER: &'static str = "gpcas::cpu_model"
const FILE_IDENTIFIER: &'static str = "gpcas::cpu_model"
A string used as identifier in every file of this type.
Source§const CURRENT_FILE_VERSION: usize = 5usize
const CURRENT_FILE_VERSION: usize = 5usize
The current file version.
Source§const COMPATIBLE_VERSIONS: &'static [(usize, DeserializeFunction<Self>)]
const COMPATIBLE_VERSIONS: &'static [(usize, DeserializeFunction<Self>)]
A slice of compatible file versions, along with a pointer to a function that deserializes
the inner data of a GPCAS file into this type. Read more
Auto Trait Implementations§
impl Freeze for CpuModel
impl RefUnwindSafe for CpuModel
impl Send for CpuModel
impl Sync for CpuModel
impl Unpin for CpuModel
impl UnwindSafe for CpuModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more