👉New update about my RISC-V CPU Simulator
I've redesigned the ENTIRE user interface!
What do you think? Looks much better than before?
My goal is to make bare metal programming easy to learn
Assembly programming tooling is very bare bones and archaic. I want to change that.
The RISC-V Simulator now has an output
My goal is to make learning computer architecture intuitive and accessible:
- Visual: See every step of an instructions execution.
- Interactive: Explore how data flows through the CPU in real-time.
This is just the beginning. Stay tuned!
Imagine if you scale up what's inside a CPU
Watch this video and you can see the MASSIVE scale is build a computer in 1960's
UNIVAC 1108
RAM: 328KB - 1.3 MB (Expandable up to 4MB
SSD: 1.18MB - 9.44MB (Magnetic drum memory is equivalent to an SSD drive)
https://t.co/ZqU5gSZ700
Modern CPUs are logically deterministic, but temporally non-deterministic.
You know exactly WHAT your code will do, but because of:
- Caches
- Pipelines
- Branch prediction
You never know exactly WHEN.
You know 2+2 will be 4, but the CPU decides exactly when you get to see it.
The difficulty in programming in Assembly comes from:
- Cognitive load
- Lack of safety nets
And other things:
- Register allocation
- Calling conventions
- Expression evaluation
- Memory management
- Optimization
I think some of this problems can be fixed! 👇
One of the problems with Assembly is the lack of safety and context.
What about adding type safety and ownership to Assembly?
Good idea or "you are just reinventing the wheel"?
Inspired on #JSDoc#Rust#Type_Script#LLVM_IR
CPUs are very fast, but memory aren't
That's why we have caches (L1, L2,L3) out of order execution, branch prediction
But this kills determinism
You don't know how much time it will take to execute the instructions
CPU has to add wait states
This list shows the real speed
Fortunately there's a modern SoC that you can truly own
Baochip-1x
- "Transparent" die chip
- Open bootloader
- Mostly open RTL (you can simulate the entire chip on your computer)
- Memory Management Unit
- RISC-V 350MHz
- 2MB RAM
- 4MB Flash
- $10
Building a computer from simple TTL chips is the ultimate form of digital sovereignty
Modern systems have hidden processors inside them like the Intel ME
They have full access to your RAM, your network card, and your screen. You cannot see them, you cannot turn them off
Modern CPUs run hidden microcode and background tasks you will never know about
You don't own them
The Z80 and 68k gave us transparency, but production is dead.
6502 how many years will be produced?
The only way to truly own a computer today? Build it yourself from TTL chips
✨There's something magical in 80's 8bit computers
That feeling of TOTAL understanding and ownership of the machine
One person could hold the entire system in their head
Modern PCs are unfathomable to a single human mind
Out-of-order execution, branch prediction, Intel ME 👇
Hot take: data types don't exist in hardware.
Your CPU sees no difference between the integer 65 or the character 'A'. They're all just bits.
Every typed language (C, Rust, TypeScript) is just a human agreement about what those bits mean.
The CPU is completely indifferent.
Learning how to multiply 2 numbers in a RISC-V CPU that doesn't have a multiply instruction extension (RV32M).
Came to a conclusion this algorithm is a bad idea. Need to learn Big-O notation.
This helps me to understand the real cost of bad programming practices.
Fun fact: You can run ANY software on ANY computer
Whether it was built in 1980 or 2026 they are fundamentally the same
The only things separating them are SPEED and MEMORY!
Even a massive AI LLM can run on an ancient machine (if you have enough memory). It just take more time
The RISC-V Simulator now has an output
My goal is to make learning computer architecture intuitive and accessible:
- Visual: See every step of an instructions execution.
- Interactive: Explore how data flows through the CPU in real-time.
This is just the beginning. Stay tuned!