<?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>Stephen&#039;s Weblog &#187; Uncategorized</title>
	<atom:link href="http://blog.akkit.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.akkit.org</link>
	<description>Everything is hackable</description>
	<lastBuildDate>Tue, 31 Jan 2012 07:35:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Format Change (2)</title>
		<link>http://blog.akkit.org/2011/01/29/format-change-2/</link>
		<comments>http://blog.akkit.org/2011/01/29/format-change-2/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 20:57:53 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=355</guid>
		<description><![CDATA[Well, when I initially pushed myself into writing on a schedule, I thought having to write about something periodically would be an interesting challenge; I&#8217;ve learned a few things since then, one of which is that when I don&#8217;t have anything specific to talk about, I don&#8217;t really have anything to say either; So I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Well, when I initially pushed myself into writing on a schedule, I thought having to write about something periodically would be an interesting challenge; I&#8217;ve learned a few things since then, one of which is that when I don&#8217;t have anything specific to talk about, I don&#8217;t really have anything to say either; So I&#8217;m changing the format of this blog once again to just post about project completion &amp; milestones when they happen, rather than on a fixed schedule. Looking back the updates I&#8217;ve made are interesting from the perspective of seeing how things were going over time, but I think it will be more interesting if I&#8217;m just writing about the stuff that excites me :)</p>
<p>With that said, there&#8217;s nothing to  show for this week besides minor progress on a few fronts; so here&#8217;s a picture of my desk as it stands pretty recently:</p>
<p><a title="IMG_0620.JPG by sgstair, on Flickr" href="http://www.flickr.com/photos/sgstair/5395257484/"><img src="http://farm6.static.flickr.com/5258/5395257484_762fabdc15.jpg" alt="IMG_0620.JPG" width="500" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2011/01/29/format-change-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2011 is upon us</title>
		<link>http://blog.akkit.org/2011/01/04/2011-is-upon-us/</link>
		<comments>http://blog.akkit.org/2011/01/04/2011-is-upon-us/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 18:19:55 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=347</guid>
		<description><![CDATA[Projects have been moving more slowly than I anticipated, and I don&#8217;t really have time to write much, so I&#8217;ll defer this update; Will post about what I&#8217;ve been doing in (just under) 2 weeks. Happy new year, all.]]></description>
			<content:encoded><![CDATA[<p>Projects have been moving more slowly than I anticipated, and I don&#8217;t really have time to write much, so I&#8217;ll defer this update; Will post about what I&#8217;ve been doing in (just under) 2 weeks.</p>
<p>Happy new year, all.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2011/01/04/2011-is-upon-us/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minor updates</title>
		<link>http://blog.akkit.org/2010/12/05/minor-updates/</link>
		<comments>http://blog.akkit.org/2010/12/05/minor-updates/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 08:01:50 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=332</guid>
		<description><![CDATA[Nothing really big to show off, but a few things are moving along: First, I&#8217;ve started a Flickr page! Pictures I take (typically of stuff I&#8217;m working on or taking apart) will be auto-uploaded to http://www.flickr.com/photos/sgstair/ I don&#8217;t always update the descriptions but any questions posted in the comments will be answered :) Second, there [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing really big to show off, but a few things are moving along:</p>
<p>First, I&#8217;ve started a Flickr page! Pictures I take (typically of stuff I&#8217;m working on or taking apart) will be auto-uploaded to <a href="http://www.flickr.com/photos/sgstair/">http://www.flickr.com/photos/sgstair/</a></p>
<p>I don&#8217;t always update the descriptions but any questions posted in the comments will be answered :)</p>
<p>Second, there has been some progress on bitbox; After some early failures, I now have the bitbox_test board working! I misread the datasheet for the LPC134x chips initially &#8211; The USB bootloader requires an external crystal; I&#8217;m not quite sure why I thought otherwise. For the bitbox I am attempting to do USB without a crystal even though the internal RC OSC might be slightly out of spec. Maybe I&#8217;ll need to revise it.</p>
<p><a href="http://www.flickr.com/photos/sgstair/5233158039/"><img class="alignnone size-medium wp-image-333" title="IMG_0607" src="http://blog.akkit.org/wp-content/uploads/2010/12/IMG_0607-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Next I&#8217;ll be writing some initial firmware for this board and then all things bitbox should start to move along.</p>
<p>I also ordered some laser cut acrylic for the test fixture, and should get that back in a bit over a week &#8211; this test fixture has been interesting to design &#8211; it&#8217;s a little overengineered in hindsight, I&#8217;ve since designed another fixture (for another project) that&#8217;s far simpler. Below is my laser cutting pattern with a few designs:</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/12/laser1_wip8.png"><img class="alignnone size-medium wp-image-334" title="laser1_wip8" src="http://blog.akkit.org/wp-content/uploads/2010/12/laser1_wip8-300x300.png" alt="" width="300" height="300" /></a></p>
<p>I&#8217;m using <a href="http://www.ponoko.com/">Ponoko</a> to have this produced &#8211; will have to talk more about it next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/12/05/minor-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Skipped a week)</title>
		<link>http://blog.akkit.org/2010/10/19/skipped-a-week/</link>
		<comments>http://blog.akkit.org/2010/10/19/skipped-a-week/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 16:46:49 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=310</guid>
		<description><![CDATA[Still nothing to speak of, but a few things are in the pipeline for next time :)]]></description>
			<content:encoded><![CDATA[<p>Still nothing to speak of, but a few things are in the pipeline for next time :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/10/19/skipped-a-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Low Tide Mark</title>
		<link>http://blog.akkit.org/2010/10/03/low-tide-mark/</link>
		<comments>http://blog.akkit.org/2010/10/03/low-tide-mark/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 20:56:00 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=307</guid>
		<description><![CDATA[Still nothing major to report on. Several of my projects are still making progress, though incremental at best; I may just need to rethink the set of things I&#8217;m working on in order to move more quickly again. Or just somehow become less lazy ;) Well, I&#8217;ll say more later.]]></description>
			<content:encoded><![CDATA[<p>Still nothing major to report on.</p>
<p>Several of my projects are still making progress, though incremental at best; I may just need to rethink the set of things I&#8217;m working on in order to move more quickly again. Or just somehow become less lazy ;)</p>
<p>Well, I&#8217;ll say more later.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/10/03/low-tide-mark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Randomness</title>
		<link>http://blog.akkit.org/2010/09/19/randomness/</link>
		<comments>http://blog.akkit.org/2010/09/19/randomness/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 23:27:01 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=302</guid>
		<description><![CDATA[I&#8217;m still off doing a number of other random things, and haven&#8217;t done anything interesting enough to post about it yet. Limited progress on the PCI Express firmware&#8230; Should get back to that. Have learned a lot about high speed serial, and a lot of related fields. I have obtained some cheap wired 3d shutter [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still off doing a number of other random things, and haven&#8217;t done anything interesting enough to post about it yet.</p>
<ul>
<li>Limited progress on the PCI Express firmware&#8230; Should get back to that. Have learned a lot about high speed serial, and a lot of related fields.</li>
<li>I have obtained some cheap wired 3d shutter glasses and a 120Hz projector&#8230; this may be interesting.</li>
<li>Also been reading books, <a title="Gödel, Escher, Bach: An Eternal Golden Braid" href="http://www.amazon.com/gp/product/0465026567?ie=UTF8&amp;tag=stepswebl-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0465026567&quot;&gt;Gödel, Escher, Bach: An Eternal Golden Braid&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=stepswebl-20&amp;l=as2&amp;o=1&amp;a=0465026567">this one</a> has been really interesting.</li>
<li>And, dealing with some failing hardware :\ one of my RAID cards died recently.</li>
<li>Been dabbling in high speed video, but nothing interesting here yet&#8230;</li>
<li>Have a few PCB projects staring at me waiting for me to complete them :)</li>
<li>&#8230;And a growing collection of other projects doing the same.</li>
</ul>
<p>Well, maybe next time I&#8217;ll have more to say, wish me luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/09/19/randomness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Early PCI Express development</title>
		<link>http://blog.akkit.org/2010/09/05/early-pci-express-development/</link>
		<comments>http://blog.akkit.org/2010/09/05/early-pci-express-development/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 21:21:49 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=296</guid>
		<description><![CDATA[Disappointment! I&#8217;m deep in work and not writing up anything yet again&#8230; Come to think of it, I have completed the firmware for my little PCI card, which is now actually a useful port 80h monitor, but that&#8217;s just an incremental update to its previous firmware. This weekend I&#8217;m working on trying to build PCI [...]]]></description>
			<content:encoded><![CDATA[<p>Disappointment! I&#8217;m deep in work and not writing up anything yet again&#8230;</p>
<p>Come to think of it, I have completed the firmware for my little PCI card, which is now actually a useful port 80h monitor, but that&#8217;s just an incremental update to its previous firmware.</p>
<p>This weekend I&#8217;m working on trying to build PCI Express firmware for a FPGA card; This is a lot of new stuff to me and I&#8217;m not sure I&#8217;ll make it this weekend, but it should be fun!</p>
<p>Below is a picture of the system I&#8217;ve set up to test with:</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/09/pcie_dev.jpg"><img class="alignnone size-medium wp-image-295" title="pcie_dev" src="http://blog.akkit.org/wp-content/uploads/2010/09/pcie_dev-300x260.jpg" alt="PCI Express development setup" width="300" height="260" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/09/05/early-pci-express-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oops.</title>
		<link>http://blog.akkit.org/2010/08/10/oops/</link>
		<comments>http://blog.akkit.org/2010/08/10/oops/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 01:32:41 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=284</guid>
		<description><![CDATA[Ah right, I was planning to post last weekend; I haven&#8217;t actually done anything too interesting though :) just messing around with some stuff while I&#8217;m away on vacation; Mostly doing less than usual though &#8211; that&#8217;s ok every now and then.]]></description>
			<content:encoded><![CDATA[<p>Ah right, I was planning to post last weekend;</p>
<p>I haven&#8217;t actually done anything too interesting though :) just messing around with some stuff while I&#8217;m away on vacation; Mostly doing less than usual though &#8211; that&#8217;s ok every now and then.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/08/10/oops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Format Change</title>
		<link>http://blog.akkit.org/2010/07/17/format-change/</link>
		<comments>http://blog.akkit.org/2010/07/17/format-change/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 05:29:53 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=270</guid>
		<description><![CDATA[I&#8217;ve been writing weekly now for a while &#8211; I&#8217;ve decided, though, that it&#8217;s unsustainable. Writing these posts has been a great motivator for getting some of my projects done, but they also don&#8217;t leave me a lot of time to do so. So, I&#8217;m shifting the format and will write blog posts every other [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been writing weekly now for a while &#8211; I&#8217;ve decided, though, that it&#8217;s unsustainable. Writing these posts has been a great motivator for getting some of my projects done, but they also don&#8217;t leave me a lot of time to do so.</p>
<p>So, I&#8217;m shifting the format and will write blog posts every other week &#8211; I&#8217;ll continue next week.</p>
<p>Thanks for reading! I hope some of this material has been useful to you, and please do let me know if you&#8217;d like to see something specific, or if anything isn&#8217;t clear.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/07/17/format-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCI Card Revisited</title>
		<link>http://blog.akkit.org/2010/07/04/pci-card-revisited/</link>
		<comments>http://blog.akkit.org/2010/07/04/pci-card-revisited/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 07:00:02 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hardware Hacking]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=239</guid>
		<description><![CDATA[Remember the PCI card from a few weeks ago? Not too long after that, I did send out an order to manufacture some boards &#8211; and this last week they finally arrived! I&#8217;ve assembled a few, tested them, run into a few problems, solved them, and finally got a pretty basic PCI Port-80h debug card [...]]]></description>
			<content:encoded><![CDATA[<p>Remember the <a title="Project: PCI Card" href="http://blog.akkit.org/2010/06/13/project-pci-card/">PCI card</a> from a few weeks ago?</p>
<p>Not too long after that, I did send out an order to manufacture some boards &#8211; and this last week they finally arrived! I&#8217;ve assembled a few, tested them, run into a few problems, solved them, and finally got a pretty basic PCI Port-80h debug card working.</p>
<p>In this post I&#8217;ll walk through these things, and talk some more about the PCI interface.</p>
<p><span id="more-239"></span></p>
<p>So; Early this week I received a package from <a title="MyroPCB" href="http://www.myropcb.com/">MyroPCB</a> &#8211; A cheap outsourced PCB manufacturer; I&#8217;m rather happy with the quality of these boards &#8211; it&#8217;s a reasonably simple design to produce these days I suppose, but it is still pretty neat.</p>
<div id="attachment_242" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_scan.jpg"><img class="size-medium wp-image-242  " title="pcipost_scan" src="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_scan-300x221.jpg" alt="Scan of the PCI_POST circuit board" width="300" height="221" /></a><p class="wp-caption-text">(A Scan of some of the boards I received)</p></div>
<p>It takes some time to assemble this PCB, due to all the parts; The most annoying parts have been ones with pads strongly attached to the ground fill; Those pads have thermals seperating them from the fill, so they are not completely embedded in copper, but they&#8217;re still too well connected, and very troublesome to solder as all the heat is sucked away by the large mass of copper. Also the capacitors take some time to solder just by virtue of there being a large number of them. (And also that a large number of them have one pad attached too well to the ground fill)</p>
<div id="attachment_243" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_populated.jpg"><img class="size-medium wp-image-243 " title="pcipost_populated" src="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_populated-300x225.jpg" alt="The PCI_POST board populated with components" width="300" height="225" /></a><p class="wp-caption-text">(After some soldering)</p></div>
<p>At this point I didn&#8217;t do much else with this project until today;</p>
<p>Unfortunately, I had made a serious miscalculation &#8211; Note that the PCI edge connector on this card is 3.3V only&#8230; Now, I had built this card not long after seeing a PCI 3.3V only slot in a server system; so I made the assumption this would work great for me. In fact the PCI 3.0 specification (released in 1994!) no longer even includes the 5V PCI card slot</p>
<p>So that means it&#8217;s gone, right?</p>
<p>Well, No.</p>
<p>And, in fact my assumption proved to be wrong in the most incredible sense; There are literally no desktop-class motherboards on the market with 3.3V PCI slots! I spent an hour or two looking through motherboards on <a title="Newegg" href="http://www.newegg.com/">Newegg</a>, and the cheapest motherboard I could find with 3.3V PCI slots was $200. (And, only had 3.3V PCI slots by virtue of them being part of 3.3V PCI-X slots)</p>
<p>All was not lost though, first, this board was also built to be general purpose  - so it will have other uses. Also, as it turns out, it isn&#8217;t impossible to use it in modern 5V PCI slots.</p>
<p>Apparently,  system board manufacturers don&#8217;t want to sacrifice compatibility &#8211; so while modern PCI busses are all driven with 3.3V signals, they are still using the 5V connectors and maintaining 5V compatibility &#8211; This is really annoying for my project, because my FPGA isn&#8217;t 5V tolerant like their bus controllers are, but I can work on a 3.3V bus just fine. So, to actually be able to test, I have cut out the second key slot in the PCI connector and broken the VCCIO traces that would otherwise connect 5V to my 3.3V rail in the 5V slot. The PCI connector has a bundle of different voltage rails &#8211; but in a 3.3V-only card, like I made, the I/O voltage levels are intended to be connected to the 3.3V rail &#8211; so I did connect them &#8211; Unfortunately, being compatible with a 5V slot means those I/O voltage levels are 5V. It&#8217;s not ideal to just disconnect them, as they are supposed to have bypass capacitors in order to reduce noise, but I didn&#8217;t have many options with this, so I have just disconnected my card from the I/O voltages completely.</p>
<div id="attachment_244" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_scratched.jpg"><img class="size-medium wp-image-244  " title="pcipost_scratched" src="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_scratched-300x97.jpg" alt="PCI_POST card with cut out slot and scratched out I/O voltage traces" width="300" height="97" /></a><p class="wp-caption-text">(Chopped traces and a new slot)</p></div>
<p>With this modification, my card is quite happy to work in the motherboards I have around &#8211; The caveat is, since my FPGA isn&#8217;t 5V tolerant, if I put it in with a 5V device (which does typically drive the bus up to 5V), it will likely damage my device. However, for what I&#8217;d like to do, I can live with this, and I can redesign the board if I ever actually need 5V tolerance.</p>
<p>After resolving how to test my board as a PCI device, I set out to write a first simple test firmware, to verify that the core functionality worked- This just drives the display and sets the LED values based on the switches present on the system.</p>
<div id="attachment_245" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_test.jpg"><img class="size-medium wp-image-245 " title="pcipost_test" src="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_test-300x225.jpg" alt="pci_post test program" width="300" height="225" /></a><p class="wp-caption-text">(Test program)</p></div>
<p>It was at this point that I noticed the green &#8220;programming done&#8221; LED had accidentally been populated with a red LED on this board &#8211; oops. I will have to go back and fix that later.</p>
<p>A few short steps further, and I converted the test program to firmware for watching the port 80h I/O Writes on the PCI bus &#8211; I had an old motherboard around from a system upgrade some time ago, connected it up, and it does appear to be working! After powering up the system, the display cycled through a number of values exactly the way it should; In the image below you can see the last 2 values it observed written to port 80h.</p>
<div id="attachment_246" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_victory.jpg"><img class="size-medium wp-image-246 " title="pcipost_victory" src="http://blog.akkit.org/wp-content/uploads/2010/07/pcipost_victory-300x225.jpg" alt="pci_post operating as a POST code display card" width="300" height="225" /></a><p class="wp-caption-text">(Victory!)</p></div>
<p>So,A few short notes about PCI devices &#8211; First, this isn&#8217;t actually a full PCI device; It does not interfere with the bus any more than is necessary to make electrical contact- it is only listening to the bus in order to see this information (as such it&#8217;s out of spec). It is actually possible to make a full PCI device with this card, and that&#8217;s on my list of  things to do eventually as well.</p>
<p>The PCI bus though, is essentially a collection of signals &#8211; there are 32 address/data lines, and a number of control signals; At its core though are the PCI Clock signal, a FRAME signal (each transaction on the bus is a frame), the 32 address/data lines, 4 lines which are used as both a control word, and as 4 individual byte enables (to enable byte granularity in the 32bit value) &#8211; Beyond these are some handshaking signals (IRDY/TRDY), sanity checking (Parity), error reporting (PERR/SERR), transaction abort (STOP), System reset (RST), and location-based device identification (IDSEL/DEVSEL)</p>
<p>In order to listen for a specific port write on the bus though, you only really need the CLK, FRAME, data lines, and the 4-bit control word / byte enable &#8211; All PCI signals are sampled on a rising clock edge, the controller starts a frame by asserting FRAME on a clock edge. When it does this, it also sets the 4-bit control word to the transaction type, and for some types of transactions also sets the address lines to the related address.</p>
<p>What my card is doing, is waiting for reset to finish; then every frame that starts, it checks if it is an I/O write with address = 0&#215;00000080; If so, it listens on the next cycle, and if byte enable 0 is set, it will accept the data in the bottom 8 bits of the data lines as a new port 80h write &#8211; In any case, it waits for the frame to finish, and then continues waiting for another frame to start.</p>
<p>Sounds simple? It really is.</p>
<p>Making a real PCI device though will be a lot more challenging, and I&#8217;ll be sure to document that when I get around to it :)</p>
<p>Small update: I should probably also mention the significance of Port 80h &#8211; System BIOS manufacturers have standardized on using port 80h as a debug port of sorts, they write a byte to that port to indicate which section of the BIOS code is running; As such, there are a number of cheaply available &#8220;PC Diagnostic&#8221; boards, which do essentially what I&#8217;m doing here, just listen for Port 80h accesses and display the values. The capability to see this code is helpful when diagnosing a difficult motherboard problem, to be sure&#8230; but it&#8217;s also helpful when writing and debugging low-level code when little else on the system is running, as you can add writes to 80h that give you information about what stage of execution your program is in.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/07/04/pci-card-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

