SILICON
Loading...
Searching...
No Matches
README

Silicon An Open Source Suite for simulating Circuits, Finite State Machines and Microcontrollers (WIP)

Package repository hosting is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Currently supported by the Bachelor's Degree programme in Electronic Engineering and Informaton tecnology @ The University of Genoa

TODOs

A roadmap (+ various diagrams/ideas) is available hereCanva, written partly in Italian.

  • MacOS support
  • Documentation
    • [ ] User docs
  • CI/CD
    • [X] GitHub Actions
    • [X] Multi-OS support (kinda done: windows builds are now supported)
      • [ ] Deployment (setup packages for Win & Mac). See here.
  • Multiplexers & demultiplexers
  • Timed simulation
  • Flip flops & synchronous components
  • Wires-to-bus & bus-to-wires
  • INPUTS & OUTPUTS!!!!
  • Bus display
  • 7-segment display
  • Memories
  • Waveform input & automated testing
  • Subcircuits
  • Verilog support
    • Yosys integration (JSON netlist)
  • File format

FSMs

  • TBD

Microcontrollers

  • TBD

Using clangd

This project is currently being developed using EMACS. The following packages will be useful:

Clangd uses the file compile_commands.json, that should be placed in the project root. CMAKE generates it in the build subdirectory so you need to symlink it:

cd <project-root>
ln -s ./build/compile_commands.json compile_commands.json

Compiling

On Linux

SILICON uses Nix and CMake in order to manage dependencies. It's recomended to use Ninja Build as a generator.

If you're not using NixOS as a distro, you can install Nix using the official instructions, however I personally recommend using Lix, a modern Nix fork, which can be installed running the following command in a Linux system:

curl -sSf -L https://install.lix.systems/lix | sh -s -- install

Then enable the experimental features required by SILICON running:

echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

Finally, run the commands below to compile the develop edition of SILICON on Linux:

git clone https://github.com/GiulioCocconi/SILICON
cd SILICON
nix build # Downloads the dependencies and builds the software

On Windows

Only recent versions of the MinGW compiler are supported (tested using version 13.0), you can install them via this graphical installer.

The only thing you need to install for dependency management is CMake, since the CMakeLists installs the dependency manager vcpkg automatically. Since all dependencies are built from source, the first time you run CMake you might need to wait a few minutes (or hours, depending on your compute power).

To start the compilation process, once you have installed the compiler and CMake, run the following commands:

git clone https://github.com/GiulioCocconi/SILICON
cd SILICON
mkdir build
cmake -G "MinGW Makefiles" -Bbuild
make -C build

Developing

Using Linux (Nix)

git clone https://github.com/GiulioCocconi/SILICON
cd SILICON
nix develop # It also installs the DDD debugger
mkdir build
cmake -G "Ninja" -Bbuild -DCMAKE_BUILD_TYPE=Debug
ninja -C build

Using Windows

git clone https://github.com/GiulioCocconi/SILICON
cd SILICON
mkdir build
cmake -G "MinGW Makefiles" -Bbuild -DCMAKE_BUILD_TYPE=Debug
make -C build