logicsim

Module circuits

Source

Macros§

  • Creates a wire with the same variable name and gate name.

Structs§

  • Data structure that helps with managing buses, it allows you to connect &[GateIndex] to it as well as providing a &[GateIndex] to connect to other components.
  • Data structure used to represent a piece of RAM that can be easily read and written to from Rust.
  • Data structure that helps with connecting wires to many different components.
  • Data Structure that allows you to easily manage a group of LeverHandles.

Functions§

  • Returns the output of a ripple carry adder.
  • Returns the output of an ALU which can only add and subtract.
  • Returns one of the inputs selected by address. Conceptually it is a combination of multiplexers, one for each I/O bit.
  • Returns a Vec of ON or OFF values representing the bits of any Copy + Sized + ’static value.
  • Returns the output of a counter. The output width will be the same as the provided input.
  • Returns the Q output of a D flip-flop.
  • Returns the output of a decoder. The output width will be 2^address.len().
  • Returns a pair representing an “updated” bit and the output of a register respectively, Whenever a write happens to the register, the “updated” bit is set,
  • Returns the output of a multiplexer. which selects one of the inputs by address. If inputs is not big enough to cover the whole address space, it will get filled by OFF.
  • Returns a Vec of size n full of ON.
  • Returns the output of a piece of RAM addressed by address.
  • Returns the output of a register. The output width will be the same as the provided input.
  • Returns the output of a piece of addressable ROM filled with data. If data is not long enough to fill the entire address space, it will be filled with OFF.
  • Returns the Q output of an SR latch.
  • Returns a Vec of size n full of OFF.