Struct origen::core::dut::Dut[][src]

pub struct Dut {
Show fields pub name: String, pub models: Vec<Model>, pub bits: Vec<Bit>, pub timesets: Vec<Timeset>, pub wavetables: Vec<Wavetable>, pub wave_groups: Vec<WaveGroup>, pub waves: Vec<Wave>, pub wave_events: Vec<Event>, pub pins: Vec<Pin>, pub pin_groups: Vec<PinGroup>, pub pin_headers: Vec<PinHeader>, pub id_mappings: Vec<IndexMap<String, usize>>, pub reg_descriptions: IndexMap<String, IndexMap<usize, String>>, // some fields omitted
}
Expand description

The DUT stores all objects associated with a particular device. Each object type is organized into vectors, where a particular object’s position within the vector is considered its unique ID. A register then (for example) does not embed its bit objects but rather contains a list of bit IDs. This approach allows bits to be easily passed around by ID to enable the creation of bit collections that are small (a subset of a register’s bits) or very large (all bits in a memory map).

Fields

name: Stringmodels: Vec<Model>bits: Vec<Bit>timesets: Vec<Timeset>wavetables: Vec<Wavetable>wave_groups: Vec<WaveGroup>waves: Vec<Wave>wave_events: Vec<Event>pins: Vec<Pin>pin_groups: Vec<PinGroup>pin_headers: Vec<PinHeader>id_mappings: Vec<IndexMap<String, usize>>reg_descriptions: IndexMap<String, IndexMap<usize, String>>

Cache of descriptions parsed from reg definition files

Implementations

Change the DUT, this replaces the existing mode with a fresh one (i.e. deletes all current DUT metadata and state, and updates the name/ID field with the given value

Returns a mutable reference to the top-level model

Returns an immutable reference to the top-level model

Get a mutable reference to the model with the given ID

Get a read-only reference to the model with the given ID, use get_mut_model if you need to modify it

Get a mutable reference to the memory map with the given ID

Get a read-only reference to the memory map with the given ID, use get_mut_memory_map if you need to modify it

Get a mutable reference to the address block with the given ID

Get a read-only reference to the address block with the given ID, use get_mut_address_block if you need to modify it

Get a mutable reference to the register file with the given ID

Get a read-only reference to the register file with the given ID, use get_mut_register_file if you need to modify it

Get a mutable reference to the register with the given ID

Get a read-only reference to the register with the given ID, use get_mut_register if you need to modify it

Get a mutable reference to the bit with the given ID

Get a read-only reference to the bit with the given ID, use get_mut_bit if you need to modify it

Create a new model adding it to the existing parent model with the given ID. The ID of the newly created model is returned to the caller who should save it if they want to access this model directly again (will also be accessible by name via the parent model).

Creates a bit for testing bit collections and so on, does not add the new bit to a parent register

Given a group/collection of pin names, verify: * Each pin exist * Each pin is unique (no duplicate pins) AND it points to a unique physical pin. That is, each pin is unique after resolving aliases. If all the above is met, we can group/collect these names.

Given a pin or alias name, finds either its name or alias in the group.

Given a pin name, check if the pin or any of its aliases are present in pin group.

Given a pin group name and model ID, converts it to a tuple containing: [0] -> Vec containing the physical pin IDs of the pins in this group [1] -> usize -> the resolved pin group ID

Trait Implementations

Formats the value using the given formatter. 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

Converts self into T using Into<T>. Read more

Converts self into a target type. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Attempts to convert self into T using TryInto<T>. Read more

Attempts to convert self into a target type. Read more

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.