Struct acs::arch::cpu::Cpu

source · []
pub struct Cpu { /* private fields */ }
Expand description

Central Processing Unit able to execute a given instruction and to determine which instruction should be fetched and executed next

Implementations

Carries out the simulation, taking as input:

  • in_m: data from memory
  • instruction: fetched from ROM
  • reset: whether to set the program counter to zero

It returns the following:

  • write_m: whether to write to memory
  • out_m: data going to memory
  • address_m: memory address
  • pc: program counter

Trait Implementations

Returns the “default value” for a type. Read more
Carries out the tock-phase of a clock cycle: HIGH
Carries out the tick-phase of a clock cycle: LOW
Evaluates the logic expression as we do with arithmetic without advancing the time. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.