My Ben Eater inspired homemade 8-bit CPU - Part 9: Control Unit

preview_player
Показать описание
Here we look at the hardware which makes up the control unit. As usual, Ben Eater's work serves as a starting point. His control unit is built up systematically in these 3 videos:

David Courtney's video series, where he analyses the EEPROM's fluctuations is here:

Рекомендации по теме
Комментарии
Автор

James, I just wanted to formally thank you for your immensely detailed video series and for the help you gave me when I was building your CPU. I just really appreciate it and I have learned a lot. My CPU is done and working flawlessly. Thanks again.

joelhowell
Автор

HI James.. great job. I like what you did for the ALU!
To get more control lines, you don't have to keep adding chips.
You can multiplex some lines so for example if you have a read instruction, one bit can be a read flag (which enables the read demultiplexer) and use 4 lines to multiplex one of 16 sources. Same for write. This way 10 buts give you in and out control for 16 different devices from just 10 lines.

tvoipapa
Автор

On hand, I only have a few AT28C16 EEPROM chips. My thinking is that I could add an additional register (labelled J for jump, this register would be connected to the program counter directly via an octal bus transceiver), and use some combinational logic to create conditional jump commands. I would use two control lines, which would be demultiplexed into four secondary control lines. I can then AND each secondary line with a corresponding ALU flag, and then OR the outputs of those four and gates together. The output of the OR gate would be connected to the octal bus transceiver, which would control whether or not the register is being written to the inputs of the program counter.

eli
Автор

If your micro timer counts on falling clock edges, and the control unit sets its reset signal on a falling clock edge, why can you be sure that it will actually count up and then reset next cycle and not immediately. It is the same problem you described with the instruction register and the flags register.

Jaultaub
Автор

I have written an emulator for your micorcomputer. Because I considered clock low to start a cycle (and didn't clearly understand your version in the beginning), I have register bus assert happen on rising clock and register write on falling clock; exactly the opposite of your system. I assume this is arbitrary.
Also, I think there is a possible problem with the control word EEPROMs. Might it be possible for a register enable bit on one EEPROM to turn on before a register enable bit on another EEPROM turns off? I would guess that the duration of this state (if it happens) is too small to cause problems.
If I do make my own computer, I will put all the register enable control bits on one EEPROM. I would hope all bits of an EEPROM change at the same time. If they don't, then they will need to be buffered, like the IR, T and flag bits are.

davidtanner
Автор

Why don't you use the manual clock for advancing the clock?

GRBtutorials
Автор

Hi, looking at your flags register solution I was thinking, if you use a separate EEPROM, you could implement the negatives (like JNZ).

xZise
Автор

Hi James, in schematics there are on EEPROM0 wires called BA and ALS3. BA could be ALB? but whats about ALS3?

peterwtlprnft
Автор

Hi James, I´m actually building the control unit as the last part of your cpu. It`s unclear to me, why schematics says, that pin 7 of 74161 is connected to the inverted PROG Signal.. In the video I think to see, that pin 7 of the 74161 is also connected to pin 9 and one of the I/O lines of the EEPRPM3. could you please explain. thanx a lot!

peterwtlprnft
Автор

I just finished wiring the the control unit (I have not yet hooked up the outputs to their respective registers though), however, I'm not getting correct outputs..is there a way I can accurately test this before I finalize the wiring? Thanks.

joelhowell