Processor design
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
Processor design
@Candy:
I just let it sink in that you are designing a processor.
That really is awsome. I have tried my hand in basic electronics using transistors, resistors, and all that great stuff with bread-boards, but it is VERY hard for me alot of times. That is really excited no bull-crap, I would love to be better at digital and analog electronics!
Do you use software to test you're prototype processor, or do you actually build it by hand?
I do not mean to give anyone to wrong impression here, but it doesn't matter how fast or complex the processor is. Building a processor that steps though a memory chip and executes 2 bit instructions is WAY TOUGH, considering all the phenomonen to do with the way electricity works in circuits.. bleh! What are the features of the processor?
I just let it sink in that you are designing a processor.
That really is awsome. I have tried my hand in basic electronics using transistors, resistors, and all that great stuff with bread-boards, but it is VERY hard for me alot of times. That is really excited no bull-crap, I would love to be better at digital and analog electronics!
Do you use software to test you're prototype processor, or do you actually build it by hand?
I do not mean to give anyone to wrong impression here, but it doesn't matter how fast or complex the processor is. Building a processor that steps though a memory chip and executes 2 bit instructions is WAY TOUGH, considering all the phenomonen to do with the way electricity works in circuits.. bleh! What are the features of the processor?
Re:Processor design
The lamer method of course. Making it from pure transistors is near madness, although I've considered it and made an agreement with one other person that we'd make one together. However, my precondition was that he paid for the transistors (or cmos chips), and I've lost contact with him somehow.kmcguire wrote: @Candy:
I just let it sink in that you are designing a processor.
That really is awsome. I have tried my hand in basic electronics using transistors, resistors, and all that great stuff with bread-boards, but it is VERY hard for me alot of times. That is really excited no bull-crap, I would love to be better at digital and analog electronics!
Do you use software to test you're prototype processor, or do you actually build it by hand?
I do not mean to give anyone to wrong impression here, but it doesn't matter how fast or complex the processor is. Building a processor that steps though a memory chip and executes 2 bit instructions is WAY TOUGH, considering all the phenomonen to do with the way electricity works in circuits.. bleh! What are the features of the processor?
I'm designing it to run on an FPGA chip. I'm also messing about with normal electronics again and I've ordered 70 euros of SMD components to learn SMD soldering myself. I hope to make a computer in a number of years (possibly only a few) and all the complex components that go into a computer are very small smd-ish nowadays, so I have to be able to do that. I'm also trying to figure out how complex the PCB has to be for it to work.
I'm aiming for a small chip, 16-bits with full MMU similar to the x86 one, up to the idea level. My personal note on it (sorry for incoherency):
I've got a start version of the TLB on my work computer (which has a VHDL compiler, so I can test-compile the design). Try www.opencores.org for a lot of open-source (as in, processor design is open) processors.16-bit calculations
32-bit output for mul/div(2x16)
16-bit opcodes? -> 8b immediates
16bit memory addressing with paging
512b pages, 2b page entry
us, present, rw, nx/x, 12b page? -> 12+9 = 21b address space, 2MB memory max
shared memory for instr + opcodes
256/pagetable
128k virtual space, word addressed
tlb with 16/32/64 entries, 4-way associative
cf interface for storage
mini-lcd display
1x usb ingoing
2x usb outgoing
1x tekenvlak
index in tlb is bits (8..11) - (12..15) mod (2^k + 1)
Just trying to make something fun out of it, possibly make my own pda if it will work that far. I have no idea what I would do with it though, it's just a learning thing for me at the moment. Making a very small processor with all stuff below and above it does look very good on your CV however (yes, it might get me a better job ) and it gives loads of experience doing lots of tiny things that are related.
Re:Processor design
One of my modules this year at uni is Systems Architecture, focusing mainly on processor design and parallel systems. Combining that with the Intel manuals made me want to have a go at a project very similar to yours, but I'm deliberately not starting it as I know I'll let it take too much of my time. Coursework designing the way the microcode controls the operation of a simple processor is far enough right now.
Good luck with it.
Good luck with it.
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
Re:Processor design
@Candy & Kemp
WOW
I was about to ask, "What is SMD, VHDL compiler, TLB, and FPGA?" - BUT, that link you posted is kinda awsome and I started looking around while I was writting this and I saw some of the words.. FPGA board or something.. Im going to check it out over time. I am glad you posted something about this in the forums and repied back about it. Thanks!
Your processor design goal is very high, I take it you have been working and reading on those things for a long time now! I got to catch up one day.
Microcode, That is honestly above and behind my understanding of electronics. I know what it is, and I have an idea of how it works - but beyound that anyone who can understand and engineer with those things is close to genuis!
WOW
I was about to ask, "What is SMD, VHDL compiler, TLB, and FPGA?" - BUT, that link you posted is kinda awsome and I started looking around while I was writting this and I saw some of the words.. FPGA board or something.. Im going to check it out over time. I am glad you posted something about this in the forums and repied back about it. Thanks!
Your processor design goal is very high, I take it you have been working and reading on those things for a long time now! I got to catch up one day.
Microcode, That is honestly above and behind my understanding of electronics. I know what it is, and I have an idea of how it works - but beyound that anyone who can understand and engineer with those things is close to genuis!
Re:Processor design
SMD : Surface Mounted something. The idea behind SMD versus normal components is that they don't have wires that go through the PCB (printed circuit board) and are soldered on the other side, but they're soldered right on the same side you put them on. That allows people to make them smaller, and smaller and smaller.... The smallest SMD chips have so many pins or are so small you can't solder them by hand - period. They're just too darn small. Normally, soldering is having a bit of metal on the component, a bit of metal on the board, some tin to melt and a soldering iron. In SMD, the resistors are smaller than the tip of your old soldering iron was.kmcguire wrote: @Candy & Kemp
WOW
I was about to ask, "What is SMD, VHDL compiler, TLB, and FPGA?"
VHDL: VHSIC Hardware Description Language. VHSIC = Very High Scale Integrated Circuit. It's a programming language for hardware. You tell it in a (must admit, annoying and hard) programming language what you want to get out in terms of ports and connections, including hierarchical design, and it produces that for you.
TLB : Translation Lookaside Buffer. The reason why paging doesn't slow your computer down as much as it normally would. It's a bit of hardware that caches results from your page lookup logic so that it can tell the answer directly, instead of after a while. In the PC you have to clean the TLB partially with INVLPG or fully by reloading CR3 when you change the page table so the TLB knows what you've been doing. Mine works pretty nicely now, except for out of the 64 entries I want in there, 62 take 3 logic elements, one takes 15 and one takes 512. I can't figure out why either, it's exactly the same component instantiated multiple times. Anyway...
FPGA: Field Programmable Gate Array. It's like a normal processor, but with gates that have been designed to be able to do anything. Those gates are relatively huge, but still quite small compared to anything else. You can then program each of these gates by sending a few bytes of configuration data to them and they'll start acting like the gate you specify. Now, if you chain together a few thousand of these intelligently with some memory blocks and multipliers added in between (since these two are both very common and eat up huge amounts of gates otherwise - 512 bytes of memory takes 8192 gates for just the memory) you will get your own chip design, running at a relatively low speed (compared to the 3ghz p4's etc, they'll run between 20 and 400 mhz, depending on how expensive and large your chip is). So, in effect, you get a blank chip that you can program for around $200 instead of requiring an order to the ASIC (application specific integrated circuit) factory, which costs millions just for the generic test runs.
If you set your goals low, you might make them. If you make your goals, what else can you do? Set your goals to near-unreachable heights and have unlimited motivation. That way, you never stop learning and will always have something new to do.BUT, that link you posted is kinda awsome and I started looking around while I was writting this and I saw some of the words.. FPGA board or something.. Im going to check it out over time. I am glad you posted something about this in the forums and repied back about it. Thanks!
Your processor design goal is very high, I take it you have been working and reading on those things for a long time now! I got to catch up one day.
Microcode - I think you mean the microcode that superscalar cpu's execute - is also not on my design list. I will try to make it slightly scalar (have a pipeline) but it won't have out-of-order execution until somebody sponsors me a $5000 FPGA, which you'll require to fit it on ;D.Microcode, That is honestly above and behind my understanding of electronics. I know what it is, and I have an idea of how it works - but beyound that anyone who can understand and engineer with those things is close to genuis!
Just getting a basic CPU working is my current goal, and I consider it hard enough already .
Re:Processor design
I've tried quick designs each way and to be honest, microcode makes life so much easier. It's slightly slower than a huge hard-coded logic array for decoding instructions, but you don't have a large portion of the chip to redesign everytime something changes or you realise you worked out the decoding logic wrong. In my experience, the decoding logic, even for a very basic instruction set, is horribly complex if it's hardcoded.
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:Processor design
I designed my own instruction set once, after being quite fed up with x86. Eventually I realized it was enough work just writing an OS (which is what I really wanted to do), and that creating my own instruction set, emulator, assembler, compiler, etc. would have me dead of old age before booting a "hello world" kernel.
Processor design is quite fun... Anyone interested in the subject should get a book called "Computer Architecture: A Quantitative Approach" by Hennessey and Patterson. It has lots of good info on pipelining, out-of-order execution, and complex ALU design (integer and FP multiplication, etc.).
The thing about hardware is that you can cleanly separate the design aspects from the implementation aspects. Digital logic is really fun in that sense because it's almost like programming, but forces you to think differently. At the higher level, you can start thinking about things in terms of hardware abstractions (first gates, then muxes and adders, then registers, buses and ALUs, etc.). I never got down to the implementation level -- I know diddly about FPGAs or how transistors work, and I'd likely burn myself trying to solder anything. Still, it sounds like a lot of fun.
Processor design is quite fun... Anyone interested in the subject should get a book called "Computer Architecture: A Quantitative Approach" by Hennessey and Patterson. It has lots of good info on pipelining, out-of-order execution, and complex ALU design (integer and FP multiplication, etc.).
The thing about hardware is that you can cleanly separate the design aspects from the implementation aspects. Digital logic is really fun in that sense because it's almost like programming, but forces you to think differently. At the higher level, you can start thinking about things in terms of hardware abstractions (first gates, then muxes and adders, then registers, buses and ALUs, etc.). I never got down to the implementation level -- I know diddly about FPGAs or how transistors work, and I'd likely burn myself trying to solder anything. Still, it sounds like a lot of fun.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Re:Processor design
You can build a stupid one on a small breadboard:
http://anton.pressure-team.de/breadboardproc.html
The key parts there are the 2x SN74LS181. You can build more exciting things with programmable logic arrays, or if your university has a/has a contract with a fabrication facility.
http://anton.pressure-team.de/breadboardproc.html
The key parts there are the 2x SN74LS181. You can build more exciting things with programmable logic arrays, or if your university has a/has a contract with a fabrication facility.
Re:Processor design
Hi,
u would like to check this http://chaokhun.kmitl.ac.th/~kswichit/
it has many SBC (single board computer) based on microcontroller and old microprocessors.
Bye
u would like to check this http://chaokhun.kmitl.ac.th/~kswichit/
it has many SBC (single board computer) based on microcontroller and old microprocessors.
Bye
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:Processor design
The book is out-of-date, 1996 I saw well.Colonel Kernel wrote: Anyone interested in the subject should get a book called "Computer Architecture: A Quantitative Approach" by Hennessey and Patterson.
I'm not saying it is a bad, I haven't read it.
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
Re:Processor design
Yes, all bookmarked.. More More..
@Phugoid
Perfect! Thats still hard to find the exact parts he used, I need a bigger breadboard one day too, but that just inspires me at how it can be done on a bread-board! I know there are tons of catchs with trying to duplicate his design, but I think that the link will be one of many good starting points when I get around to it one day, ROFL.
I really do love this thread!
@Phugoid
Perfect! Thats still hard to find the exact parts he used, I need a bigger breadboard one day too, but that just inspires me at how it can be done on a bread-board! I know there are tons of catchs with trying to duplicate his design, but I think that the link will be one of many good starting points when I get around to it one day, ROFL.
I really do love this thread!
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
Re:Processor design
I never knew so many people actually existed that I could talk to that knew about that kind of stuff, or that websites like opencores actually existed. You guys are extremely talented, not saying I don't have talents too, but in the end its hard work that pays off not talent and you guys are leagues ahead of me!
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
Re:Processor design
WOW, http://chaokhun.kmitl.ac.th/~kswichit/ thats got alot of interesting devices and things.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:Processor design
It's quite a theoretical book -- the type that don't go out of date very quickly (like the Dragon Book or "The Mythical Man Month"). The concepts apply just as much to today's processors as they do to the examples in the book (which include the VAX, Pentium II, and PPC 601). Here's a review.kataklinger wrote:The book is out-of-date, 1996 I saw well.
I'm not saying it is a bad, I haven't read it.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager