pub struct Ram4k { /* private fields */ }
Expand description
A Random Access Memory consisting of 4k 16-bit registers
Implementations
sourceimpl Ram4k
impl Ram4k
sourcepub fn sim(&mut self, inp: Signal16, load: Signal, address: Signal12) -> Signal16
pub fn sim(&mut self, inp: Signal16, load: Signal, address: Signal12) -> Signal16
Carries out the simulation, taking as input:
inp
: data inputload
: whether to writeinp
into the RAMaddress
: which register to select
It returns the value stored at address. Furthermore, when
loadis
HI,
inpis written at location
address`, and the loaded value will
be emitted from the next time step onward.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ram4k
impl Send for Ram4k
impl Sync for Ram4k
impl Unpin for Ram4k
impl UnwindSafe for Ram4k
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more