102 lines
4.8 KiB
Markdown
102 lines
4.8 KiB
Markdown
|
# Vision
|
||
|
|
||
|
Designing custom silicon is really challenging for a number of reasons, but
|
||
|
it doesn't have to be. The reasons for this feed into eachother.
|
||
|
Since chip manufacturing is incredibly expensive, the silicon design
|
||
|
industry as a whole is incredibly conservative and resistant to adopting
|
||
|
new tools and highly innovative design methodologies. Because the industry
|
||
|
is so resistant to innovation on the tooling front, capable young talent
|
||
|
that could make an impact in this industry often find careers in alternative
|
||
|
industries.
|
||
|
|
||
|
To address this problem, we're creating a platform that makes it a joy
|
||
|
to learn how to do custom hardware design. Joy Of Hardware. We're targetting
|
||
|
high-schoolers and young college students who have not yet been biased into
|
||
|
the current mindest on how to design chips.
|
||
|
|
||
|
Our platform will teach chip design using innovative tools and approaches
|
||
|
including Bluespec(allowing us to build IPs that "just work" when
|
||
|
snapped together with various compiler enforced guarantees), Haskell for
|
||
|
formal modeling, Yosys, and NextPNR(for hassle free syntehsis and place and
|
||
|
routing), and our own custom IDE with a built-in waveform veiwer.
|
||
|
|
||
|
# ReplIt, but for Hardware
|
||
|
|
||
|
Essentially, we're trying to make ReplIt, but for hardware. A user logs into
|
||
|
app.joyofhardware.com and is greeted by an IDE containing a code editor,
|
||
|
terminal, and, file browser pane. The user must create a `shell.nix`
|
||
|
and `default.nix` so that they can have reproducible builds. They
|
||
|
might for example work on an FPGA deisgn in Bluespec targetting
|
||
|
the Lattice ECP5. Below is a link to an example `shell.nix` and
|
||
|
`default.nix` that a user might write for their design.
|
||
|
|
||
|
<!-- Add link to `default.nix` from https://git.joyofhardware.com/Tutorials/bluespec-joh-template-->
|
||
|
|
||
|
The IDE drops the user into a nix shell session. If the user wants their
|
||
|
work to be persistent, they must commit their work to `git.joyofhardware.com`.
|
||
|
Once they've commited, they can visit their repo on git.joyofhardware.com
|
||
|
and click, "Open In JoyofHardware", which would take them to app.joyofhardware.com,
|
||
|
start their IDE, and open their git repo. The terminal in the IDE would drop them into
|
||
|
the shell with packages available specified by `shell.nix`.
|
||
|
|
||
|
Right now, everything is hosted with co-location with very capable and powerful
|
||
|
infrastructure. More on this in [Architecture.md](./Architecture.md).
|
||
|
|
||
|
# Programming Hardware
|
||
|
|
||
|
The user can purchase their own FPGA hardware and program it through their browser.
|
||
|
We have proted OpenFPGALoader to work in the browser via webUSB which means that
|
||
|
it is possible to program FPGAs such as the Lattice ECP5 based ULX3S.
|
||
|
|
||
|
We may at some pont in time start manufacturing ULX3S boards at scale should user
|
||
|
demand grow.
|
||
|
|
||
|
# Tutorials
|
||
|
|
||
|
We will have tutorials that assume users have little to no knowledge on digital design.
|
||
|
Our aim is to give the user all the knowledge to eventually be able to design implement
|
||
|
a CPU on an FPGA that is capable of running the Linux kernel.
|
||
|
|
||
|
# Hardware Centric But Not Exclusive
|
||
|
|
||
|
This platform is hardware/FPGA first, but it doesn't mean that a user couldn't also simply
|
||
|
use JoyOfHardware for learning how to write standard software. The FPGA-first components of
|
||
|
the JoyOfHardware experience mainly stem from the fact that our online IDE has an integrated
|
||
|
waveform viewer as well as the ability to program FPGA from the browser.
|
||
|
|
||
|
# Low Cost
|
||
|
|
||
|
Becasue we make use of co-location, our monthly hosting costs are an order of magnitude
|
||
|
lower than they would be in AWS or GCP. As such, we can charge a fraction of the price charged
|
||
|
by other platforms such as ReplIt.
|
||
|
|
||
|
|
||
|
# Loading Times
|
||
|
|
||
|
The platform must feel snappy at all times! Every possible interaction should
|
||
|
always happen in a 10th of a second including page loads. Right now, it takes up
|
||
|
to 30s to load a GitHub codespace, and up to 15s to start a ReplIt session! This
|
||
|
is insane!!! We're writing our frontend in Elm and backend in Rust. Frontend IDE page
|
||
|
loads must be measured in KB. The average page load should never be more than 500KB.
|
||
|
|
||
|
In rare cases, I might make an exception for the maximum page load to be capped at
|
||
|
1MB.
|
||
|
|
||
|
# Next Gen IDE
|
||
|
|
||
|
Because the IDE we're building is so snappy in the browser, it also makes a good candidate
|
||
|
for being a desktop IDE. We will port the IDE to work with Tauri on the desktop. Fully packaged,
|
||
|
I imagine the download size of the desktop IDE might come in at just a few MB.
|
||
|
|
||
|
# Nix For Infrastructure
|
||
|
|
||
|
All of our servers are fully managed with Nix from remote deploy, to
|
||
|
re-configuration, to backup, to secret management.
|
||
|
|
||
|
Our entire stack is fully reproducible(down to the actual hash of all binaries
|
||
|
if built single threaded), and easily scalable. We even have Nix backup configuration
|
||
|
to config files and data, which could be re-deployed at a moments notice on new hardware.
|
||
|
|
||
|
The only configs nix doesn't backup are router and switch configs(whihc we commit to git
|
||
|
manually).
|