Skip to content

YJDoc2/pcb-rs-examples

Repository files navigation

PCB-RS Examples


This repository contains examples to demonstrate use of pcb-rs. To see more information about what is pcb-rs, the reasoning behind it, and basic syntax and examples, visit its repository at https://www.github.com/YJDoc2/pcb-rs.

This repository contains various examples on how to write components, as well as how to reuse components from other libraries to create a composite component. Each of the directories contain their own readme describing the that particular example.

The web version of these examples is hosted at yjdoc2.github.io/pcb-rs-examples/, so you can try them right in your browser without needing to install anything, as well as show the possibilities with this library and WASM for making such electronics related tools and simulations.


Various directories in this repo contain different examples, and their details are explained in their own readmes in that directory. Currently this repo contains following directories :

  • Basic Gates : This contains basic gates such as And, Or, Not etc.
  • Full Adder : This contains a full (3-bit) adder, made using basic gates.
  • Ripple Carry Adder : This contains a 4-bit ripple carry adder made using full adders.
  • CLA Adder : This contains a 4-bit carry look ahead adder, which is a faster version of ripple adder, but needs more gates and complex circuit.
  • Latches : This contains various latches such as SR, D, T, JK etc.
  • Ring Counter : This contains One-Hot and Johnson's ring counter made using Latches.
  • RAM : This contains a 256-byte ram chip.
  • CPU : This contains a 8-bit CPU having 18 instructions such as add, sub, mov, jmps etc.
  • PCB : This has a pcb, which connected the RAM and CPU to form a runnable (although not much useful) microprocessor. This is a binary (not a lib) and can be run from command line using cargo run.

Apart from these, this also contains following two directories which provides a svelte web app to show the above using a web interface, and WASM bindings.

  • wasm-bindings : This contains the WASM interface and bindings needed for using the above components from web interface.
  • pcb-web-interface : This has the svelte app, which provides a web interface for above components, so you don't have to install anything to try them. This is hosted at yjdoc2.github.io/pcb-rs-examples/.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Repository containing examples of usage of pcb-rs

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published