8 ms·
32-bit homebrew CPU using 74' series logic
- codebook 10y agoAppraise for the effort. But I do not know why anybody did this kind of tedious job. Isn't it enough to do with Verilog / VHDL to fully understand basic architecture of CPU?
- analog31 10y agoIn my view, it depends on what you get your pleasure from. Taking something from model to metal invokes a certain crazy satisfaction that's hard to describe. I've built things that didn't really need to be built, for this reason.
- mysterydip 10y agoSeems similar to ship-in-a-bottle in the age of 3d modeling/painting/printing :)
- dom0 10y agoYou can still do it old-style with no custom-made PC boards ... I actually have quite a few protoboards made with a wiring pencil. No CPU/computer though. Most complex thing is probably a serial-to-NATO (alphabet/language) board :)
- Gracana 10y agoThe toolchain for a 7400 series project is very different from an FPGA. That's a bit obvious of course, but compare them... With an FPGA you have a giant proprietary software package, with some incredibly powerful tools at your disposal. They're damn useful, and they're fast, but the focus is on learning how to describe your design to Xilinx ISE or whatever, and you have to learn the software so you can use its testbench facilities to validate your design, etc. With discrete logic, the design can be done on paper and with standard EDA tools, and you can prototype it and test and build it on your workbench, and all the signals are exposed so you can inject and probe signals with standard test equipment. I like the discrete logic approach because it feels more tangible and it's fun from an electronics tinkering perspective. But the FPGA method is for sure gonna be faster and smaller and cheaper, you just have to do all the work in software. Depends on the experience you want in your hobby project, I guess. :)
- ryao 10y agoI am not part of the FSF, but this probably would qualify for the FSF's certified device program if the full blue prints were made available.
- BuuQu9hu 10y agoUnlikely, since the designs are only editable in the proprietary Eagle EDA tool.
- lucaspiller 10y agoWhat's the best free alternative to Eagle?
- duskwuff 10y agoKicad: http://kicad-pcb.org/ http://kicad-pcb.org/ There's a bit of a learning curve, but it's a highly capable EDA suite.
- qume 10y agoEveryone mentions the learning curve... I just learned it myself and pretty much was up and running after an amazing and fast paced intro tutorial of about 20 mins. Maybe it used to be hard to learn because now it seems to me very logical. Just dont bother without watching a video first. I wish more people would use it so more footprints would be available, although making them from a datasheet is trivial. And fun... I dont wish bad luck on the good folk who make eagle but long live free software.
- dfox 10y agoIt is hard to learn when you come from Eagle or expect it to behave like "normal" Windows drawing application. But that holds for mostly any EDA package or even general purpose CADs. Biggest problem with KiCad's UI is that while it's UI is actually highly consistent when it comes to drawing itself, it's GUI is a mess (things that are only on toolbar or only in main menu, no correlation between icons in menu and on toolbars, crucial functions buried in random non-related dialog boxes, behavior and feature set changing depending on graphics backend etc.). But in comparison with various other EDA packages (including Eagle) I find the overall experience mostly consistent and logical. In comparison with one very expensive EDA package at least snap to grid works in a way that is actually usable and all KiCad windows use same GUI toolkit.
- dbcurtis 10y agoI'm lucky enough to say this was my day job in the 1980's. The sad thing is that today the TTL catalog is much thinner, so it is actually harder to do today than it was then. I'm happy to see RISC-V getting so much traction with serious builders. It seems like the most viable path to hardware freedom right now.
- bogomipz 10y agoWhat do you mean by the TTL catalog is much thinner?
- PhilWright 10y agoTTL = transistor transistor logic This is the technology in the common 74' series integrated circuits that became popular in the late 1960's and 1970's. You can get basic IC's that perform AND, NOT, XOR operations but also more complex IC's that perform as multiplexors, buffers, registers and so forth. You can find these in computers like the PDP or VAX series machines. They are not used as much today and so less of them are still manufactured.
- dom0 10y agoAlthough when we say TTL/74 today, usually HCMOS is meant. Real TTL 7400 series parts are, I think, all EOL and have been for many years.
- dboreham 10y agoLooks like 'F' is still available: http://www.nxp.com/documents/data_sheet/74F74.pdf http://www.nxp.com/documents/data_sheet/74F74.pdf
- Gracana 10y agoTI still makes a lot of them, but you have to mix and match series if you want broad coverage of the device family. This document is a very helpful overview of their range and how they interoperate: http://www.ti.com/lit/sg/sdyu001aa/sdyu001aa.pdf http://www.ti.com/lit/sg/sdyu001aa/sdyu001aa.pdf (fwiw it sounds like you know what you're talking about; I just wanted to share this info for anyone else who might be interested)
- PhilWright 10y agoHackaday project owner here... The idea of the project is the fun of playing around with electronics, something I have not done before, and trying to understand everything about a real computer. Starting with the CPU and then building it out with a simple graphics card. After that create an assembler/compiler for RISC-V and write a small OS. Yes, all of these will be relatively simple and not of a commercial standard, but building a machine and watching it run with all the hardware and software written from scratch is the longer term goal.
- BuuQu9hu 10y agoDid you consider using KiCAD or another open EDA tool instead of Eagle?
- PhilWright 10y agoHave to admit I never heard of those two tools! Given I use PCBWay for cheap production of boards I can only create boards that are 100m x 100m at a max anyway. So the Eagle restriction of free use up to 100m x 80m is not bad.
- unwind 10y agoThis is awesome. One tiny request: please change the board dimensions text on the page to "100mm x 80mm", or "100x80 mm" or something. I had to stop and think about this for a second or two, since I wondered what on Earth you were doing building 100-meter boards. Units matter, and the symbol for "millimeters" is "mm". Thanks. Mods: also it would be awesome to have "RISC-V" in the title.
- johnt15 10y agoIt's possible to work around the restriction easily. This tool (https://github.com/p12tic/eagle-brd-merge https://github.com/p12tic/eagle-brd-merge) can move a single Eagle board around, so whenever you want to move a component outside the allowed window you simply move the board. You can panelize the boards without any board size restriction using that tool too.
- 10y ago
- userbinator 10y agoThis is important as any 32 bit design is already going to be a big project, so lets not make it impossible by going for something like the CISC of the 80386! From a practical standpoint, going with 32-bit over 16-bit means not much more than making the datapath twice as wide --- which increases area but not actual complexity per se. And seeing a discrete i386 would actually be pretty interesting, especially if implemented on top of this one as an x86-to-RISCV uop-based decoder like the original P5. Here's another well-known one, although it's 16-bit and uses a custom ISA (but its creator ported a whole OS to it): http://www.homebrewcpu.com/ http://www.homebrewcpu.com/
- robzyb 10y ago> From a practical standpoint, going with 32-bit over 16-bit means not much more than making the datapath twice as wide Actually, that is more true from a theoretical standpoint. From a practical standpoint you have twice as many traces to fit on your board and route, you have more chips, higher power requirement, etc.
- Gracana 10y agoSo very true. I have an ongoing 32-bit computer project using a simple MPU and RAM/ROM/peripherals attached via a standard bus, and oh my god is that ever a lot of signals. It's not as bad if you use big device packages, but at higher speeds and with now-common BGA parts, it is damn hard to route all those signals with the processes that are easily available to hobbyists (like OSH Park's four layer board service).
- userbinator 10y agoIt's unfortunate that hobbyist PCB processes haven't increased much in layer count vs, price even after several decades; the original IBM PC (8-bit data/16-bit address, multiplexed), if my sources are accurate, used a 4-layer motherboard. 386/486-era motherboards with real 32-bit busses, already had 6-8 layers. It seems cost goes up more than the multiple of the layer count --- a 10-layer board costs more than 5x a 2-layer one.
- cmrdporcupine 10y agoLast time I was playing with 74 series chips I kept wishing there was a Verilog or VHDL library with impementations of all the common 74 series chips (complete with the proper pinouts and timings etc), so one could do a full working simulation of the circuit before going ahead and breadboarding it or laying out a PCB.
- SAI_Peregrinus 10y agoIt's not VHDL or Verilog, but SPICE tools are what you are looking for. LTSpice is free, and quite good: http://www.linear.com/designtools/software/#LTspice http://www.linear.com/designtools/software/#LTspice A good tutorial page: http://www.simonbramble.co.uk/lt_spice/ltspice_lt_spice.htm http://www.simonbramble.co.uk/lt_spice/ltspice_lt_spice.htm LTWiki page on component libraries, Bordodynov's library in particular contains lots of 74HC and 74HCT series chips: http://ltwiki.org/?title=Components_Library http://ltwiki.org/?title=Components_Library
- dbcurtis 10y agoWow. No, what he wants is a logic similator, not a circuit simulator. Spice is a circuit simulator. In any case, it is libraries where the rubber meets the road. A logic simulator is a programming homework assignment. Enough libraries to simulate a CPU is months of effort.
- tzs 10y agoI took the MITx MOOC version of MIT's 6.004 (Computation Structures) class. In that class students design and implement in logic gate level simulator a 32-bit RISC CPU. I was going to try to build it out of 74' series logic as a summer project last summer. Then I did a count of the gates I was using. In the following, a number after a gate type means the number of inputs. My gate count: 295 AND2 8 AND3 3 NOR2 4 OR2 96 OR3 20 OR4 226 XOR2 6 NOT 563 MUX2 161 MUX4 32 D FLIP FLOPS I'm not including memory for the registers. I would probably not have tried to make that out of 74' series logic. In terms of chips, it is something like 140 4xMUX2 75 4xAND2 81 2xMUX2 55 4xXOR2 plus a few more. The project pretty much died at that point. I could cut a lot of those out by moving some functions from hardware to software. My design includes a shifter than can left or right, logical or arithmetic shift 1 to 32 bits in one cycle. 353 of the MUX2s are involved in that. I could take that out, add a much simpler unit that can only do logical right shift by 1, add a new shift instruction that uses that simpler shifter, and make the current shift instruction into illegal instructions. They would then trap, and the illegal instruction handler could emulate the missing instructions. Still too many chips after that, though. I may still build it someday, but rather than making it out of real chips I'll use it as an excuse to learn about FPGAs. If any of this seems interesting, I highly recommend 6.004 at MITx.
- userbinator 10y agoIn that class students design and implement in logic gate level simulator a 32-bit RISC CPU. Is that an euphemism to avoid saying "MIPS"? ;-) One way to really cut down on hardware (and speed) is to use a bit-serial design, as found on some minicomputers in the 70s. Memory elements like registers still need the full width, but by processing only 1 bit at a time, many of the other components in the datapath can be reduced by a factor of 32. You can also get left and right shifts for "free" since that's intrinsic in the design. Another strategy is to use microcode to break down instructions even further, e.g. reuse the ALU to do address calculations and incrementing the instruction pointer.
- Cursuviam 10y agoIt's an ISA called Beta. It's based off of Alpha. See specification: https://6004.mit.edu/handouts/beta.pdf https://6004.mit.edu/handouts/beta.pdf.
- pacaro 10y agoWould it be worth faking parts you haven't gotten to yet? Have boards with the correct connectors for higher level components and simulate using off the shelf microcontrollers. This would allow system level testing, and get to a working device sooner. Over time migrate everything to TTL
- OJFord 10y agoTiming could be difficult, might not end up actually saving any (calendar) time.
- Gracana 10y agoQuinn Dunki did something like that when building her "Veronica" 68k computer. IIRC the VGA output remains AVR-based. Seems like a good way to go, provided you don't get bogged down in timing constraints. If you just need to test a unit (and don't need full functionality), a nice logic analyzer works well... I have an HP 16700A with pattern generator, which I can use to simulate just about anything (more or less.. sometimes it's a bit cumbersome to use.)
- systemshacker 10y agoBuilding a cpu using 74 series logic was a required project in our undergraduate micro-architecture course. It was a fun time debugging the bread boards! First time we learnt the fact that voltage at one end of bread board to the other drops due to resistance so 5V gates do not work if power supply is not connected close enough.
- greglindahl 10y agoI know a startup that wasted $10mm (and precious time to market) because of a similar issue. They wish they'd learned this lesson much earlier!
- dnotq 10y ago> So creating it as a big breadboard project is out the window. No. We need to create some actual proper PCB designs that can then be connected together in a modular fashion. Before you write off prototyping large sections on breadboards, I highly recommend you take a look at the Vulcan-74: http://forum.6502.org/viewtopic.php?f=4&t=3329 http://forum.6502.org/viewtopic.php?f=4&t=3329
- cmrdporcupine 10y agoI've followed that thread for a long time. He keeps changing direction, which is unfortunate. His breadboarding technique is quite amazing -- I tried copying his approach and my fingers just can't do it :-)
- nmeofthestate 10y agoTo learn about architecture (and also just for fun), I am building a full-size copy of the Space Needle out of clay bricks that I'm firing myself.
- Limb 10y agoI actually just started breadboarding an 8-bit CPU inspired by Ben Eater's project of the same nature [0]. The book he makes reference to "Digital Computer Electronics" by Malvino provides plans for a complete 'Simple As Possible' CPU using 74LS chips. [0] https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2565dvjafglHU https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2...
- akavel 10y agoCan anybody estimate roughly how big can this end up physically, and how fast it can get in clock Hz or (better?) ops Hz? Also, how many discrete components it might take?
- digi_owl 10y agoI find myself wondering if the final result will be anything like the Xerox Alto.