Struct gpcas_cpu_model::InstructionLatencies[][src]

pub struct InstructionLatencies {
    pub integer_multiply: Option<u16>,
    pub integer_divide: Option<u16>,
    pub integer_multiply_add: Option<u16>,
    pub integer_shift: Option<u16>,
    pub float_add: Option<u16>,
    pub float_multiply: Option<u16>,
    pub float_divide: Option<u16>,
    pub float_multiply_add: Option<u16>,
}
Expand description

Defines the amount of clock cycles each instruction type needs.

The fields of this struct are used to selectively overwrite default values. If a field is None, the default value is used.

A value of zero means that the type isn’t supported in a pipeline. By default, all types are supported.

Fields

integer_multiply: Option<u16>

Typically takes multiple, but few clock cycles.

integer_divide: Option<u16>

Takes many clock cycles, usually dependent on the operand size.

integer_multiply_add: Option<u16>

Combination of add- and mul-operation.

integer_shift: Option<u16>

Completes fast, but needs a shifter.

float_add: Option<u16>

Might take longer than floating point multiplication.

float_multiply: Option<u16>

Usually as fast as integer multiplication.

float_divide: Option<u16>

Takes many clock cycles, usually dependent on the operand size.

float_multiply_add: Option<u16>

Might need multiple execution ports if a design has separate add- and mul-pipes.

Implementations

Transforms the object into an array conforming to the gpcas_base::instruction_type definition as array indices.

Trait Implementations

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.