<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Authoritative Opinion &#187; The Microprocessor Project</title>
	<atom:link href="http://authoritativeopinion.com/blog/category/hardware/the-microprocessor-project/feed/" rel="self" type="application/rss+xml" />
	<link>http://authoritativeopinion.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 19 Jul 2010 00:04:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>TMP: Master Plan</title>
		<link>http://authoritativeopinion.com/blog/2009/06/19/tmp-master-plan/</link>
		<comments>http://authoritativeopinion.com/blog/2009/06/19/tmp-master-plan/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:07:54 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://authoritativeopinion.com/blog/2009/06/19/tmp-master-plan/">greg</span></dc:creator>
				<category><![CDATA[The Microprocessor Project]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://authoritativeopinion.com/blog/?p=98</guid>
		<description><![CDATA[I spent a lot of time debating which ISA to base this on. MIPS has the advantages of being easy to explain, being a good example of RISC, and I&#8217;ve implemented large sections of it before for class. However, that last bit makes me wary, because it means that more students in a similar situation [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a lot of time debating which ISA to base this on. MIPS has the advantages of being easy to explain, being a good example of RISC, and I&#8217;ve implemented large sections of it before for class. However, that last bit makes me wary, because it means that more students in a similar situation will need to implement a MIPS-like processor. I don&#8217;t want to just give away final projects here, so anything resembling MIPS enough to allow people to literally copy large sections of the code I release is undesirable. The other option that comes to mind is something based on ARM&#8217;s ISA. ARM is well-established and is a very common platform for embedded systems, but at the same time. So I&#8217;ll use a handful of the really interesting features available in ARM&#8217;s ISA, such as conditional execution of instructions. Finally, it&#8217;s never fun to blindly implement someone else&#8217;s ISA, it&#8217;s much more interesting to create your own design, so ultimately I will draw on both MIPS and ARM, as well as my own intuition, and create something that incorporates what I think are important features from both, while at the same time lending itself well to explanation of key features.</p>
<p>The Master Plan, then, loosely resembles the following, with many stages happening in parallel:</p>
<ul>
<li>Design Instruction Set Architecture (ISA)
<ul>
<li>Should be Load-Store and adhere to basic RISC principles.</li>
<li>Should make it easy to explain and demonstrate basic design principles, while allowing for powerful features and extensibility.</li>
</ul>
</li>
<li>Create a Simulator
<ul>
<li>Written in C</li>
<li>Will require an additional, simple assembler to convert instruction mnemonics to a binary execution image</li>
<li>Initially command line based (or ncurses frontend), with the possibility of adding a GUI if it seems worthwhile</li>
</ul>
</li>
<li>Design ALU
<ul>
<li>This part, and everything leading up to the actual processor implementation connecting everything together, can happen in parallel with simulator programming</li>
</ul>
</li>
<li>Create Register File</li>
<li>Miscellaneous Processor Structures
<ul>
<li>Memory interface (initially, an ideal memory, so this will just decode/translate requests)</li>
<li>Forwarding/Hazard Detection and Handling</li>
<li>Pipeline Registers</li>
</ul>
</li>
<li>Assemble the Microprocessor
<ul>
<li>This includes pipelining</li>
</li>
<li>Support for multiply and divide instructions
<ul>
<li>Requires significant pipeline extensions and an additional parallel processing unit</li>
</ul>
</li>
<li>Support for interrupts
<ul>
<li>This is necessary for implementing any reasonable, albeit basic, operating system</li>
<li>Also necessary for I/O, which is quite reasonable for anyone using integrated FPGA development boards (which often have a lot of I/O and the necessary support circuitry already implemented)</li>
<li>Not covered/explained often in microprocessor courses, yet integral to the functionality of all modern computers (interrupts are used to make system calls in both Windows and Linux).</li>
</ul>
</li>
<li>A basic OS
<ul>
<li>Flat memory model, without memory protection (dangerous, but simple)</li>
<li>Cooperative Multithreading (because it&#8217;s easy to implement)</li>
<li>Implements basic system calls to provide common sets of functionality for user programs</li>
</ul>
</li>
</ul>
<p>With this list of central goals complete, a few additional features seem quite reasonable and would serve to be important in understanding the functionality of a much more advanced processor. Therefore, these are secondary targets, to be completed once the basic design is done:</p>
<ul>
<li>Instruction and Data Cache</li>
<li>Branch Predictor</li>
</ul>
<p>I&#8217;ve even got some genuinely crazy ideas, but I&#8217;ll keep them to myself for now (most fall into the realm of &#8220;not existent on 99% of available commercial microprocessors/microcontrollers&#8221;). If this can be established as a platform on which I can test less mainstream concepts and designs, then this will be a success for me.</p>
<p>All that said, I may have missed a few features that won&#8217;t be apparent until the time comes, but I think this is a good starting point. Next time, the ISA will be unveiled (hopefully a week), or at least the first revision of it. Design flaws will always become apparent through actually working with it (something a lot of software library designers haven&#8217;t realized, but I digress), and so things will be amended as time goes on.</p>
<div class='wp_likes' id='wp_likes_post-98'><a class='like' href="javascript:wp_likes.like(98);" title='' ><img src="http://authoritativeopinion.com/blog/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(98);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://authoritativeopinion.com/blog/2009/06/19/tmp-master-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Microprocessor Project: Overview</title>
		<link>http://authoritativeopinion.com/blog/2009/06/12/the-microprocessor-project-overview/</link>
		<comments>http://authoritativeopinion.com/blog/2009/06/12/the-microprocessor-project-overview/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 19:45:02 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://authoritativeopinion.com/blog/2009/06/12/the-microprocessor-project-overview/">greg</span></dc:creator>
				<category><![CDATA[The Microprocessor Project]]></category>

		<guid isPermaLink="false">http://authoritativeopinion.com/blog/?p=79</guid>
		<description><![CDATA[This summer, I need something to do. I&#8217;ve got a few ideas, but in particular, one desire I&#8217;ve had since I was a young teenager was to design my own computer, which I&#8217;ve now learned enough to understand means &#8220;to design my own microprocessor.&#8221; Software for it can come later, if I still like the [...]]]></description>
			<content:encoded><![CDATA[<p>This summer, I need something to do. I&#8217;ve got a few ideas, but in particular, one desire I&#8217;ve had since I was a young teenager was to design my own computer, which I&#8217;ve now learned enough to understand means &#8220;to design my own microprocessor.&#8221; Software for it can come later, if I still like the idea after designing the hardware (or, if I&#8217;m really clever, I can try to port Linux to it, and not have to write my own software at all). However, I see now that the reason I didn&#8217;t do this sooner, and my new reason for doing this project, is that there are virtually no in-depth, beginner-level resources available on the Internet (if anyone wants to try to look at <a href="http://www.opensparc.net/">OpenSPARC</a> and without any understanding of what it&#8217;s based on, deduce how to build a basic microprocessor, please, be my guest). To that end, today I begin my next big project: designing, simulating, testing, and maybe putting on an FPGA a real, functional, 32-bit microprocessor. Then, explaining it in detail, putting my results on the Internet, and releasing it under the GNU GPL, so that there exists a simple platform for people to play around with microprocessors, extending it with additional features or modules as they see fit. I don&#8217;t intend to create something remotely commercially viable, because I will, initialy, purposely not include features found even in the early 90s on Intel chips, in order to simplify the design process, and help explain the basic concepts. If I like what I&#8217;ve done, when the time comes, maybe I&#8217;ll add more realistic features, such as multiple pipelines (superscalar) and out-of-order execution, or I&#8217;ll design support for more esoteric features (like <a href="http://en.wikipedia.org/wiki/Barrel_processor">barrel processing</a>), to see how readily (if at all) they are implemented and to provide some context about where microprocessors can go from the basic 5-stage pipeline.</p>
<p>The real goal here is educational in nature. Microprocessors are incredibly complicated devices, and so most online descriptions are terse at best. Despite that, I think people should be able to learn, for free, exactly how a microprocessor works. However, I can&#8217;t explain how an x86 chip works, for a number of reasons. First, I don&#8217;t actually know. I have a pretty good understanding of the elements from which it is built, but I&#8217;ve spent almost no time studying the ISA or reading papers on how Intel has actually implemented things. Second, I&#8217;d hate to speculate and be totally wrong, and then have people read it and think that was how it works. In contrast, I do understand the principles upon which RISC microprocessors (like MIPS and ARM) are based, so I can readily make up an instruction set that it is similar to MIPS, implement it, and then talk at great length about how it works. Hopefully, then, a younger version of me can find this online, look through it, and then be able to answer all those questions I had until college about how computers actually do things. If software and programming can be well documented and available for free to learn from, then hardware should be too.</p>
<p>If you would like to contribute descriptions, Verilog, or simulation code (which will mostly be written in C), please let me know by posting in the comments.</p>
<p>Coming soon: The Master Plan. I&#8217;ll lay out precisely what the objectives are and give an overview of how the project will progress as a whole.</p>
<div class='wp_likes' id='wp_likes_post-79'><a class='like' href="javascript:wp_likes.like(79);" title='' ><img src="http://authoritativeopinion.com/blog/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(79);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://authoritativeopinion.com/blog/2009/06/12/the-microprocessor-project-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
