You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/Andy4495/Homemade-CPU/actions/workflows/check-wiki-links.yml)
5
5
6
-
Designing my own CPU.
6
+
Designing my own CPU:
7
7
8
-
Check out my [blog][3] to see my progress.
9
-
10
-
See the [Wiki][2] for design details and documentation.
11
-
12
-
An [emulator][1] is available to run the CPU instructions and compare with the actual hardware.
8
+
-[Blog][3] documenting my progress
9
+
-[Wiki][2] for design details and documentation
10
+
-[Emulator][1] to run the CPU instructions and compare with the actual hardware
13
11
14
12
## Latest Updates
15
13
16
-
## 2025-Oct-28: Instruction Set Update
14
+
## 2025-Nov-07: Fetch Logic - Program Counter and Instruction Register Hardware
17
15
18
-
As I was working on the overall block diagram and data connections between the various components, I realized that implementing the `PUSH` and `POPP` stack operations for every register makes the internal CPU connections much more complicated than I wanted. [(full blog entry...)][ref]
16
+
I have implemented the `PC`and fetch logic in hardware: the clock increments the `PC` and fetches an instruction into `IR` with each clock cycle. `PC` is incremented on the rising edge of the clock, and `IR` latches the instruction from memory on the falling edge. [(full blog entry...)][ref]
- Implement with readily-available, off-the-shelf logic chips
26
-
- 74HCxx-series
23
+
- Implement with readily-available, off-the-shelf 74HCxx-series logic chips
27
24
- Based on RISC principles
28
25
- Each instruction should execute in one clock cycle (not including fetch)
29
26
- Fixed-length 8-bit instructions
@@ -33,43 +30,33 @@ As I was working on the overall block diagram and data connections between the v
33
30
- Although RISC CPUs typically have a high number of internal registers, this implementation will have relatively few registers
34
31
- Little Endian (least significant byte at lowest address)
35
32
- von Neumann architecture
36
-
- PC and SP are implemented with a counter chip (e.g., 74HC161 or 74HC163) for ease of incrementing without having to use the ALU
37
-
- Additional ideas that may be implemented
33
+
-`PC` and `SP` are implemented with counter chips (74HC161 for `PC`, 74HC193 or 74HC194 for `SP`) for ease of incrementing/decrementing without having to use the ALU
34
+
35
+
## Longer Term
36
+
37
+
- Create an assembler
38
+
- The assembler will also implement higher-level operations beyond what is supported by the CPU
39
+
- Create a hardware model (VHDL or Verilog)
40
+
- This may lag a little, as my VHDL is a little rusty at this point
41
+
- Additional CPU improvements not implemented in the first iteration of the design:
38
42
- Pipeline fetch, decode, execute
39
-
- Support for hard-coded constants (0, 1, 255)
40
43
- Interrupt support
41
-
- Create and update an assembler as the hardware is implemented
42
-
- The assembler will probably implement higher-level operations beyond what is supported by the CPU
43
-
- For example, 16-bit add
44
-
- Create and update an emulator as the hardware is implemented
45
-
- Create and update a hardware model (VHDL or Verilog) as the hardware is implemented
46
-
- This may lag a little, as my VHDL is a little rusty at this point
47
-
- Track development
48
-
- Document each step in the process: why a design decision was made, why something was later changed
49
-
- Use a tracker table to show progress of my various design goals (implemnted, not implemted yet, will not implement)
50
44
51
45
## Next Steps
52
46
53
-
Create an emulator/disassembler: add support for the Homemade CPU to my existing [emulator-8-bit][1] application.
54
-
55
-
-[10-Oct-2025] The emulator and disassembler have been implemented, and some manual tests have been run. Still need to run more complete tests and create some automated test actions.
56
-
57
-
Initial circut:
58
-
59
-
- Program counter to access memory and load into `AC`
60
-
- LEDs to show value of `AC` and `PC`
61
-
- Clock circuit with debounced toggle switch
47
+
Start implementing the instruction decoding logic.
62
48
63
49
## History
64
50
65
-
| Date| Action|
66
-
| ---- | ------ |
51
+
| Date. | Activity|
52
+
| --------|-------- |
67
53
| Sep-2025 | Document project design goals. Set up repo. |
68
54
| Oct-2025 | Initial CPU design: registers, addressing modes, opcode size and format, instruction set. |
0 commit comments