pub struct WpeCaravel {
pub clk_period_ps: u32,
pub baud: u32,
pub pins: WpePins,
}Expand description
The engine on Caravel: its clock period, the host’s baud rate, and the pin plan.
Fields§
§clk_period_ps: u32§baud: u32§pins: WpePinsImplementations§
Source§impl WpeCaravel
impl WpeCaravel
Sourcepub fn clks_per_bit(&self) -> u64
pub fn clks_per_bit(&self) -> u64
System cycles per UART bit, the nearest the clock can make the baud rate.
Sourcepub fn baud_error_ppm(&self) -> u64
pub fn baud_error_ppm(&self) -> u64
How far that bit period is from the baud rate’s, in parts per million.
Sourcepub fn read_round_trip_ps(&self, memory: &OffchipMemory) -> u64
pub fn read_round_trip_ps(&self, memory: &OffchipMemory) -> u64
A read’s round trip from the edge’s SCLK flop to its sample flop, outside the macro: the falling edge crosses the harness and the board, the part drives after tACLK, and the data crosses back. The edge samples half an SCLK period after that falling edge, so the half period must cover it.
Sourcepub fn half_sclk_ps(&self, memory: &OffchipMemory) -> u64
pub fn half_sclk_ps(&self, memory: &OffchipMemory) -> u64
Half an SCLK period at the engine’s clock.
Sourcepub fn check(&self, memory: &OffchipMemory) -> Result<(), WpeCaravelUnplaceable>
pub fn check(&self, memory: &OffchipMemory) -> Result<(), WpeCaravelUnplaceable>
Refuse pins, a baud rate the clock cannot make, a clock the edge is not timed for, or a UART the
off-chip memories could lose bytes on. These are the wiring’s own rules, which hold in simulation with
ideal pins; WpeCaravel::check_harness adds the rule the chip’s harness imposes.
Sourcepub fn check_harness(
&self,
memory: &OffchipMemory,
) -> Result<(), WpeCaravelUnplaceable>
pub fn check_harness( &self, memory: &OffchipMemory, ) -> Result<(), WpeCaravelUnplaceable>
WpeCaravel::check, and a read window the round trip through Caravel’s harness and the board fits:
the configuration a chip can be built with.
Trait Implementations§
Source§impl Clone for WpeCaravel
impl Clone for WpeCaravel
Source§fn clone(&self) -> WpeCaravel
fn clone(&self) -> WpeCaravel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WpeCaravel
impl Debug for WpeCaravel
Source§impl PartialEq for WpeCaravel
impl PartialEq for WpeCaravel
impl Copy for WpeCaravel
impl Eq for WpeCaravel
impl StructuralPartialEq for WpeCaravel
Auto Trait Implementations§
impl Freeze for WpeCaravel
impl RefUnwindSafe for WpeCaravel
impl Send for WpeCaravel
impl Sync for WpeCaravel
impl Unpin for WpeCaravel
impl UnsafeUnpin for WpeCaravel
impl UnwindSafe for WpeCaravel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.