Drawing a computer on paper with led pencil - Page 1
Forum section: electronics / beginners

author: Capernicus
author_rank: Frequent Contributor
timestamp: March 31, 2022, 12:42:29 pm
content: How good do you think an EE has to be to just get an a1 piece of paper out, a big stock of led pencils and literally just draw a cpu out then and there connect up a battery and whizz it at a gigahert or so?

author: Berni
author_rank: Super Contributor
timestamp: March 31, 2022, 01:01:43 pm
content: This is how the worlds first microprocessor at Intel was designedNot only was the schematic drawn by hand, but also the masks used to etch the chip into a silicon wafer.

author: Capernicus
author_rank: Frequent Contributor
timestamp: March 31, 2022, 01:27:32 pm
content: Cool, I didn't know, Is there a picture of the beast anywhere?I remember the sketch of one of the apple guru's of a couple of dips getting wired together to make the "apple" was a little bit of a let down, compared to what a hand sketched cpu would look like, what u'd expect your "computer design gods" be able to do.but I'd imagine plenty could do it because of the computers we are using now to communicate, were all designed by someone!I think a cool one to get started with would be a finite state automata, and put the flip flops with the gates themselves, and do a hard wired program. That'll get you started, and it could be all nice thick lines and under 20 registers+gates!

author: hamster_nz
author_rank: Super Contributor
timestamp: April 01, 2022, 07:33:40 am
content: Quote from: Capernicus on March 31, 2022, 01:27:32 pmhttps://www.4004.com/mcs4-masks-schematics-sim.htmlQuoteI think this is most likely not possible. Even if you ignore the + and - power connections, the network of connections between things won't 'map down' onto a simple 2D surface - connecting 'lines' will have to cross, and where they cross you have a problem. Crossing signals on a 2D surface is hard.If anybody is up for a small challenge, try to make a schematic of NAND gates where a signal enters on the left and exits on the right, and another enters on the top and exits on the bottom, without crossing any lines.

author: Berni
author_rank: Super Contributor
timestamp: April 01, 2022, 09:52:15 am
content: You can have a go at creating your own CPU pretty easily by using some cheep FPGA development board.Building a working CPU is a lot easier than a lot of people think. If you haven't seen how CPUs work internally the whole thing looks like this magical piece of circuitry that makes a big confusing pile of transistors do intelligent things. But in reality older simple CPUs can be broken up into a bunch of simple to understand basic blocks.The early CPUs are nothing more than a set of registers (basically tiny RAMs) and a ALU (Arithamtic logic unit, aka the thing that calculates math) some bus multiplexers and a bit of state machine logic to make it move in the correct sequence.What makes things even easier is that you actually need very few instructions in your custom CPU for it to be Turing complete. All you need is a bit of bit manipulation and a way to conditionally branch. It doesn't even need to be capable of calculating addition. It doesn't even need to be 8bit or even 4bit, you can make a 1 bit CPU. Such a CPU was even mass produced in sizable volume like the Motorola MC14500B. Since its so tiny you have to handle memory addressing externally, but this also means that this 1bit CPU could address 1000GB of RAM if it wanted to.The only reason most CPUs are much more complicated than this is that they strive to be more powerful. They use heavily pipelined architectures to get as many instructions executed per clock cycle as possible while also making the instructions more complicated so that the same thing can be done with fewer instructions.

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 10:47:17 am
content: Quote from: hamster_nz on April 01, 2022, 07:33:40 amthat's pretty nice. thanks for linking, its what I've got on my plate to eat now. Starting from Ben Eater's tutorials then going straight to this is fairly big step, have to believe in yourself.Quote from: hamster_nz on April 01, 2022, 07:33:40 amI was thinking of doing it on 2 back to back pieces of paper and pressing it down hard to get a connection, that would do it, but would help if it were see through paper.I've got a finite state automata I'm going to try and put together, for a little arcade game.Its two space ships with a velocity and position, and when the bullet hits the other ship it rehashes its position. Its very small, I just need a way of putting a screen on it, I wonder If I could do it by setting off a spark gap per game object at its 2d location. (4 game objects.)It shouldnt be more than 12*precision registers linked together with truth tables, and do it for 32 precision, so it would be x10 cause of x and y.

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 10:49:47 am
content: Quote from: Berni on April 01, 2022, 09:52:15 amMakes sense thankyou.Ive had tonnes of setbacks but I should start getting it going now.

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 11:55:22 am
content: Thats really nice, hand made. I guess these days they are all done with robots and its all virtual cad, but its the same thing.Do you think you make much money selling IC's and Computer chips? Or is it really oversaturated and you make just as much selling pottery, competing against all the rest of the potters.I.E. naff all.

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 03:21:12 pm
content: I'm not sure I understand the topic nor do I know what an 'led' pencil is but will assume we're talking about sketching a computer with a common No. 2 pencil and implementing it. Sure it can be done!There is a 'classic' CPU in Caxton C Foster's "Computer Architecture" book called "Blue". It is a 16 instruction, 16 bit CPU with 4k words of memory. It is trivial to implement in an FPGA. I never finished doing it because the architecture is suboptimal. It is a direct address machine with no index registers and only a simple accumulator. This guarantees the requirement for self-modifying code to index vectors and arrays. Nevertheless, the author points out that in the early days such a computer would probably sell for a few thousand dollars.https://hackaday.com/2016/03/16/crawl-walk-run-planning-your-first-cpu-design/The block diagram is trivial and reducing it to flops and gates is similarly easy. In an FPGA, the bus will be a multiplexor and in real hardware the registers would probably have an Output Enable control to put their contents on the bus. Simple. But the architecture still sucks.Enter LC3 - a workable RISC design that is well documented in the related books and is the core project in computer architecture at many universities. The design is in Appendix A and Chttps://www.cs.colostate.edu/~cs270/.Spring22/resources/PattPatelAppA.pdfhttps://people.cs.georgetown.edu/~squier/Teaching/HardwareFundamentals/LC3-trunk/docs/LC3-uArch-PPappendC.pdfIt is pretty much as simple as just laying out the hardware chunks shown in the block diagram in an FPGA and using the transition diagram to write the FSA. A full working RISC machine takes a couple of days work.It would be fairly simple to reduce the block diagram to 7400 series logic (or any other family) and, in theory, all you would need is multiplexors, gates and flops. And a bit of RAM for the registers.There was a time where such machines were built from AMD 2900 series components and controlled by microcode - just like LC3 is microcoded in the book. There is a microcode worksheet in one of the appendices.http://www.donnamaie.com/AMD_Vintage/Microprogramming_handbook_reduced.pdfIBM invented the 8" floppy to load microcode into the System 360 at boot. It's a lot easier to change microcode than to rewire backplanes to add logic. Besides, it allows for 'feature creep'. It wasn't encouraged but end users could alter the microcode!http://www.cnn.com/TECH/computing/9907/08/1971.idg/The IBM 1130 computer is a couple of steps up from Blue but they are pretty small steps. It has a limited instruction set but it does have 3 index registers (in core memory, not hardware) and is easily replicated in an FPGA. My incantation runs at 50 MHz whereas the original machine with 3.6 us core would run around 300 kHz. It's a great computer and the first I ever used (circa 1970). I still use my FPGA version for various FORTRAN kinds of things.http://ibm1130.org/There was a certain satisfaction of being the only student in class to have access to the IBM "Electronic Circuit Analysis Program" (ECAP, an early LTspice).Everything necessary to replicate the system is in the Functional Characteristics Manual:http://media.ibm1130.org/E0006.pdfSo, yes, block diagrams can be converted to hardware and it gets easier with every generation.

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 03:45:23 pm
content: When I started in the chip industry (1976), feature size was quite large and photolithography was used to drive the process. The masks were written on glass from 400x artwork on what was called a 'ruby'. The red mask created by hand from original art created with colored pencils on large sheets of paper. Different color - different layer. Each layer had a different glass mask.Today the machines are entirely differenthttps://www.nikon.com/about/technology/product/semiconductor/index.htmOld technology with a bit on more modern exposure methods:https://www.youtube.com/watch?v=B0g1_rr-ApI&ab_channel=JoVE%28JournalofVisualizedExperiments%29

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 04:55:23 pm
content: It was very important to color inside the lines when doing the original art.

author: TimFox
author_rank: Super Contributor
timestamp: April 01, 2022, 05:09:45 pm
content: I remember PCB artwork with colored tapes on precision-gridded Mylar sheets photographed through an Apo-Nikkor lens.We found out the hard way that the precision of the grid on drafting vellum ("Clearprint") was not as good as the Mylar layout grid when we tried to get a large mechanical layout to agree with a large PCB.

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 05:51:11 pm
content: So you guys know this very well. Thanks for the help.Yes.. I misspelt lead! I always did I think I never noticed I even misspelt it.rstofer - So you were in the chip industry, is the smoke and mirrors of the whole situation removed?If I get my projects done, I'm going to know what its like myself. I do want to sell something, and get it mass fabbed if I can.

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 07:17:11 pm
content: Quote from: Capernicus on April 01, 2022, 05:51:11 pmI left the chip industry in 1990. What I knew then is totally irrelevant today. In any event, I was involved with Facilities (construction, maintenance and operations) and only tangentially involved with production.I've been retired for more than 18 years so I pretty much don't know anything about anything.

author: TimFox
author_rank: Super Contributor
timestamp: April 01, 2022, 07:44:14 pm
content: Did you take the "smoke and mirrors" with you when you retired?

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 07:50:13 pm
content: Quote from: rstofer on April 01, 2022, 07:17:11 pmIf I were you I wouldn't be buying computers, Id just be making them myself! Custom architectures.

author: RJSV
author_rank: Super Contributor
timestamp: April 01, 2022, 08:17:41 pm
content: I have several ideas, currently.One, has persisted over 20 years now, that's the un-coded BUS method. That had '11' signals, literally decimal 0 thru 9, plus a READ request I called 'Read-Sync'. Interesting thing was, other physical hardware, for implementing either the data write, or data read, did not care which was occuring. Both types just were switched, along the various paths, to the 'target' ram or I/O, and if it was a read then the device had the 'BUS' for a send action.I view those efforts you describe as an order of design: the BUS, the signal sequencer, and then the instruction set...so something like your ALU becomes a 'secondary' consideration...In other words not starting with the 'core' processor, but going from outside inward, starting with BUS and data transfer details...Anyway, yaawwn...I'm putting myself to sleep...lol.Currently, have been thinking about minimal processor types, where everything is a data write, even including things that READ, all via a small dedicated register set. You have, similar to '8008' early chip, you have 'Memory Pointer' and 'Memory Data' registers, strongly implied in almost every cycle.Something complex like an ALU, almost all done via memory map. The 6502 processor (Early Apple I, Commodore 64 etc) gave my license, to just memory map the whole darn world, if need be.Roughly speaking, I'm looking at a kind of 'BCD Plus', where you get to have '6' encoded commands, optional embedded into your 4 bits;If it's '1001' binary, that's a 'nine'. If it is '1100' that might represent an internal command, like 'Increment Memory Pointer', useful in loops.Another option, there, is to do those '16' decided options as uncoded, just a direct, 16 line BUS defined.That way, see, there isn't a heavy use of decoders, in the micro-code program flow.That way, for a system that's 'strange' in other ways, can be contemplated /built.What that means is; Could be for a 'mechanically' implemented 3-D printed monster, having 64 separate 8-bit sub-processors.(Then you use Arduino, up front end to manage all that novel stuff).My preferred approach, is goal of massive processor 'array' rather than the long-word concept of having 64 bits or 128 bits width. But with the elements very simple and very little hardware (per element).

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 08:44:24 pm
content: I dont like the computer architecture im shown on the internet (On Ben eaters channel) It looks like it wastes so many cycles just to switch things around and it cant even get the program/actual work done.IMO it all snowballs from getting that slow thing just to an acceptable pace.That's why I like huge ALU's and I'm kinda the opposite of what u like, I think that the processor is the thing that's not required, and if you put all the operations in hard gates you dont need to waste space on storing instructions in a ram.Yeh... the "computer" only runs one thing now and u can't plug anything into it, but it was so much easier and goes so much faster and u dont have to try so hard to design it.Why make a cpu, when u can have something original for all your hard work and labour.The thing I think the world needs is a PPU (Physics processor unit) for realistic physical animation in 3d games. Do something the world needs, not rehash things we already have. And it could just be a fat alu that spins a frame of n softbody 3d objects a cycle.

author: emece67
author_rank: Frequent Contributor
timestamp: April 01, 2022, 08:56:01 pm
content: .

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 09:12:22 pm
content: Quote from: Capernicus on April 01, 2022, 07:50:13 pmI have built a couple:First a Z80 using the T80 core from opencores that runs CP/M using a compact flash for a driveNext, a Z80 using the T80 core to run PacMan Perfect for the bar table I probably won't build.Next, a complete IBM1130 system that runs the original IBM software unchanged including the 27 pass FORTRAN compiler. There are emulations for the card reader, line printer, bouncing ball typewriter, keyboard, disk and, my favorite, the 1627 drum plotter. This was a lot of fun!Finally, the LC3 project up to the point where interrupt driven serial IO works. I have no particular application...I went to college to learn how numerical control machines worked. I was installing a bunch of these machines at an aerospace company and I wanted to understand how hundreds of HP of cutting heads was controlled by a 1" paper tape. These were the days of discrete flops and there were two per PCB. The card bays were about 3' wide and perhaps 5' high and they swung out. Five axis machine had even more card bays. The highlight of my career as an electrician. I later moved to engineering...I tended toward digital design in school and stayed as far away from analog circuits as I could. Still do! Other than analog computing which I find fascinating. None of the structures used in FPGAs are any different than what I studied back in school (say 1976). The one big change is we don't have to minimize and encode the states. The tools do the work.I view the FPGA as a dumpster full of logic and a fun place to play.As to CPUs, there is no point in building a CPU if there is no software to run on it or you don't plan to create a full OS and language translators. A theoretical architecture without existing software is no use to me. I would have to write an assembler and port a C compiler/linker just to get started writing an OS. Not interested! If I were interested, I would build a PDP/11 type device and port Unix V6. The source is available.

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 09:17:17 pm
content: Quote from: TimFox on April 01, 2022, 07:44:14 pmI rather think the smoke and mirrors concept has expanded over the last decade. It always was a smoke and mirrors industry but these days I think they're skipping part of it - probably the mirrors. It's just all smoke! Lots of it!

author: rstofer
author_rank: Super Contributor
timestamp: April 01, 2022, 09:25:38 pm
content: Quote from: Capernicus on April 01, 2022, 08:44:24 pmThat would just require a massive analog computer for the animations. You can get some pretty good emulations of ordinary differential equations with an analog computer:https://www.researchgate.net/publication/339028605_The_Computing_Boom_in_the_US_Aeronautical_Industry_1945-1965Of course, today we just digitize everything and solve the equations on the CUDA units of a graphics card. Much of machine learning is based on thousands of partial differential equations being solved in a massively parallel processor. Very cool stuff!If I were a new engineer, just starting out, I would head to NVIDIA or Google and work in their AI group(s). Sure, the math gets a bit complex but it's learnable. This AI thing is going to be huge. It will be in all the papers!

author: RJSV
author_rank: Super Contributor
timestamp: April 01, 2022, 09:39:54 pm
content: Thanks for opinion, Capernicus, I'm now going to also ponder the ways of interconnecting the various, SEPARATE running elements, for doing the big word calculations, like 128 bit. An inclusive design becomes more like 'umbrella' ...we can walk, chew gum, do massive amounts of 'little' processes, AND go to a 'united' mode. Your thread, here, I like, partially because it's a challenge...(Forgot to mention), had just been thinking, noticing 'lead pencil' on paper, a similar effect, missing the old-school personal AM /FM Radios:You turn on switch...(that's it). Now, with 'modern' smart-phone, you gotta enter all kinda crazy sheet. Type in 'Ernies Talk Show', and, if accidently type 'E..b'(or breath on screen, anywhere near...),THEN, you get...to EBAY, for like, 35 more seconds of distracted keyboard fumbling . Now, where was I ?Oh yeah, the TALK SHOW, KABC, radio....And don't touch ANYTHING, whilst that show plays, or you are in for another round, of enter-reenter-reenter. For Radio, I want...a radio!

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 01, 2022, 10:32:33 pm
content: Quote from: rstofer on April 01, 2022, 09:25:38 pmYes, thats the devaluemental opinion of PPUs, don't need em cause we have video cards already. I just think they are a waste of space, why the need for all those hardware matrix multiplies, they are as big as square roots! The physics system I have planned doesnt even do a single rotation, and works using centrifugal force. Much more realistic and less operations.Quote from: RJHayward on April 01, 2022, 09:39:54 pmIve been helped a heap whilst being here, thankyou. My "mental electrical model" is far from complete, approximate and full of bugs, I can barely get anything to work, but I'm just about there now, my confidence is alot higher now than it was in the beginning.I agree that possibly the interface on these so called smart phones is absolutely shithouse made in china rubbish. Maybe after I get the logic down Ill get to work on controls that are less of a piss off to the user. I agree i.e. How come its industry standard to only be able to press 3 keys down at once only if your lucky? (cant even do a control key combo and press a cursor key at the same time on especially bad keyboards) makes no sense to me.If I made a radio I think ppl wouldnt like it hear, cause the amp would just be a darlington pair then after that I couldnt read the schematic. =)

author: rstofer
author_rank: Super Contributor
timestamp: April 02, 2022, 03:08:39 am
content: Quote from: Capernicus on April 01, 2022, 10:32:33 pmWe have to translate and rotate an image with millions of pixels about 60 times per second. It's a really huge matrix multiplication. Then we need to 'ray trace' the result to get the lighting correct every time the player moves relative to the image. Even harder math...It's what the users demand from the graphics system that drives the industry and as long as the CUDA units are available, we might as well use them for linear algebra.I like playing with MATLAB's introduction to supervised learning (digit recognition) and the speedup with CUDA versus CPU is pretty substantial. Unfortunately, the graphics unit on the HP Envy All-In-One doesn't have a very powerful NVIDIA card so I can't justify paying for the license. Maybe later...

author: Berni
author_rank: Super Contributor
timestamp: April 02, 2022, 01:14:59 pm
content: Modern CPUs have 'huge ALUs' that you like.The last few generations of Intel desktop CPUs have AVX512 instructions and this means it can do a calculation on 512bits wide worth of data in a single instruction. So you could use this to do say 16 multiply operations on 32bit floats and it takes the same amount of time as doing a single float multiply. Or you could use this to add 64 different 8bit numbers together in a single instruction. Not all CPUs have AVX512 support but the older SSE instruction sets that work with 128 or 256 bits at a time are on pretty much all modern x86 CPUs. This whole thing mostly started with the Intel MMX instruction set where they got into pushing more SIMD math support into the x86 chips. This is mostly used to give them much enhanced DSP capability that comes in useful when working with large amounts of video and audio data (hence the name MMX being MultiMediaeXtension)The ever popular ARM chips also have similar SIMD instructions, even the little CortexM4 microcontrollers, but they don't work with this many bits, since they don't have as much transistor count budget available to implement that.PCs did have a PhysicsProcesingUnit for a brief time period. The company Ageia developed hardware acceleration for a popular physics engine called NobodeX and it did speed up physics calculations by a lot. This only lasted a few years before Nvidia bought the whole company and ported the PhysX drivers to run on there GPUs. The graphics cards already had programmable pipelines back then and lots of powerful 3D matrix math capability, so it was just a matter of porting the physics math over to what the GPU can execute. The PhysX engine can fall back to CPU mode if appropriate acceleration hardware is not available (allowing games using it to still run with worse performance) and is now ported over to even a lot of game consoles (including ones without Nvidia graphics hardware or x86 CPUs).CPUs have gotten so fast that physics is actually easy for them (especially with the modern math instructions). So a lot of games might not even use any hardware acceleration to run them. They focus on GPU accelerated physics more when there is a lot of physics to be done, such as simulating a huge number of objects or the kind of physics where things are made from lots of tiny sub objects (like fabric, fluids, smoke, particles etc..)When it comes to building DIY CPUs it doesn't really make sense to pursue powerful huge bit depth parallel math capability. Whatever you build is going to still be laughably slow when compared to the CPU in the slowest cheapest laptop on the market. Sticking to a reasonable number of bits is more than good enough and saves complexity and amount of wiring. You also need to write your own software to make use of it, so this takes more time for complex things that could make good efficient use of the math horsepower. The DIY CPUs are mostly about keeping things simple enough to easily understand, debug and build. With modern components these CPUs can run pretty fast anyway (compared to the equivalent CPUs of back in the day). A better place to spend the effort might be graphics hardware for your DIY CPU since you can make it do some impressive stuff with not that much logic, just moving lots of pixels around quickly.

author: rstofer
author_rank: Super Contributor
timestamp: April 02, 2022, 03:22:01 pm
content: Quote from: Berni on April 02, 2022, 01:14:59 pmThere is an epic thread re: a VGA controller for an FPGA implementation over in the FPGA forum:https://www.eevblog.com/forum/fpga/fpga-vga-controller-for-8-bit-computer/

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 02, 2022, 03:31:13 pm
content: Wasn't that hard? (Please don´t kill me)

author: Capernicus
author_rank: Frequent Contributor
timestamp: April 02, 2022, 03:44:29 pm
content: Nice picture of a computer.Still a 512 bit adder is faster than a 512 bit multiplier by log times. makes sense not to use mutiply at all in code.If you can, then your hardware is smaller, takes up less estate = same thing as higher clock rate + easier to build at home.Optimizing hardware is very similar to optimizing software, if you putting it in physically, shorter program takes up less estate.I swear I can beat what's out there in a 1000th of the space, just wait and see.rstofer - yes I can put it on an fpga as well, but If I do the hardware custom I can include analogue elements if I want, fpgas cant do that, and I get better control of everything if I do it from scratch.

author: Terry Bites
author_rank: Super Contributor
timestamp: April 09, 2022, 10:15:23 am
content: The LED pencil is an early form of light pen surely?