@@ -4,4 +4,60 @@ There is a Logisim circuit available for simulating the F8ful CPU.
4
4
It requires version 3.9.0 or later of Logisim Evolution.
5
5
If lines turn to error values you may be running an earlier version.
6
6
7
- ![ Image of the main circuit] ( ../misc/logisim.jpg )
7
+ The circuit is broken up into a few major subcircuits:
8
+ * [ main] ( #main-circuit )
9
+ * [ register_bank] ( #register-bank )
10
+ * [ memory_bank] ( #memory-bank )
11
+ * [ alu] ( #alu )
12
+ * [ control] ( #control )
13
+ * [ sreg] ( #status-register )
14
+ * [ ports] ( #ports )
15
+
16
+ You can run a program by first loading it into the 64Kb ROM located in the ` control ` subcircuit.
17
+ After your program is loaded, simply reset the CPU by toggling the ` RESET ` button, then run the clock.
18
+
19
+ ## Main Circuit
20
+
21
+ The main circuit connects all of the subcircuits through the bus (B),
22
+ as well as supplying the reset (R) and clock (C) signals.
23
+
24
+ ![ Image of the main circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-main.jpg )
25
+
26
+ ## Register Bank
27
+
28
+ The register bank contains the 8 general-purpose registers.
29
+ It handles reading and writing to specific registers.
30
+
31
+ ![ Image of the register bank circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-register-bank.jpg )
32
+
33
+ ## Memory Bank
34
+
35
+ The memory bank handles reading and writing to adresses in memory.
36
+ In addition, it controls writing to ports for MMI/O.
37
+
38
+ ![ Image of the memory bank circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-memory-bank.jpg )
39
+
40
+ ## Arithmetic Logic Unit
41
+
42
+ The Arithmetic Logic Unit (ALU) handles arithmetic and logic operations (woah),
43
+ such as addition, bitwise operations, etc..
44
+ It contains two internal registers, which are used for the operations.
45
+
46
+ ![ Image of the ALU circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-alu.jpg )
47
+
48
+ ## Control
49
+
50
+ The control circuit controls the rest of the CPU.
51
+ It contains a program counter that adresses the program file stored in ROM.
52
+ It uses a series of 3 ROMs to map instructions to bits in the Control Word,
53
+ which instructs the rest of the CPU what to do each clock cycle.
54
+
55
+ ![ Image of the control circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-control.jpg )
56
+
57
+ ## Ports
58
+
59
+ The ports circuit simply acts as a sample MMI/O chip,
60
+ behaving similarly to the GPIO pins on an ATMega or ATtiny microcontroller.
61
+
62
+ ![ Image of the ports circuit] ( https://github.com/commonkestrel/fateful/raw/master/misc/logisim-ports.jpg )
63
+
0 commit comments