<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>planet.debian.org on Active Low</title>
    <link>https://activelow.net/tags/pdo/</link>
    <description>Recent content in planet.debian.org on Active Low</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 19 Dec 2020 23:06:43 +0100</lastBuildDate>
    <atom:link href="https://activelow.net/tags/pdo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>PDP-8/e Replicated — A Different Implementation</title>
      <link>https://activelow.net/post/pdp8e-cake-implementation/</link>
      <pubDate>Sat, 19 Dec 2020 23:06:43 +0100</pubDate>
      <guid>https://activelow.net/post/pdp8e-cake-implementation/</guid>
      <description>&lt;p&gt;It has been &lt;em&gt;almost&lt;/em&gt; a year since I got a different implementation of my&#xA;&lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-introduction&#34;&gt;PDP-8/e replica project&lt;/a&gt; for my birthday.&lt;/p&gt;&#xA;&lt;p&gt;Yes, it was a cake, and I have neglected to share it with the world so far. To&#xA;be fair, there was a time this year where everything was a cake, at least on&#xA;Twitter, and adding another one would have just been pouring gasoline on the&#xA;fire.&lt;/p&gt;&#xA;&lt;p&gt;But here it is, first a side by side comparison of the implementations:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-cake-implementation/side-by-side.jpeg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Some detail to admire:&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-cake-implementation/cake1.jpeg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-cake-implementation/cake2.jpeg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Afterwards I got to see some of the planning that went into it:&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-cake-implementation/plan.jpeg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;I can&amp;rsquo;t say that the other implementation was as functional as mine, but it was&#xA;definitely tastier.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Other Vintage Computer Replication Projects</title>
      <link>https://activelow.net/post/pdp8e-other-replication-projects/</link>
      <pubDate>Mon, 23 Dec 2019 23:24:26 +0100</pubDate>
      <guid>https://activelow.net/post/pdp8e-other-replication-projects/</guid>
      <description>&lt;p&gt;A few weeks back, I was showing my&#xA;&lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-introduction&#34;&gt;PDP-8/e&lt;/a&gt; project at the &lt;a href=&#34;http://vcfe.ch/&#34;&gt;Vintage Computer&#xA;Festival in Zurich&lt;/a&gt;. While I was doing my project, I haven&amp;rsquo;t&#xA;really checked if there were other projects like this. At least for the PDP-8 I&#xA;knew there wasn&amp;rsquo;t, the only FPGA core I could find was a new implementation of&#xA;the architecture that is binary compatible but doesn&amp;rsquo;t attempt to replicate the&#xA;structure and instruction cycles of any specific PDP-8.&lt;/p&gt;&#xA;&lt;p&gt;At this VCFe I found there were two other projects that also aim at recreating&#xA;computers in FPGAs from original schematics. One is a &lt;a href=&#34;https://github.com/aap/pdp6&#34;&gt;DEC&#xA;PDP-6&lt;/a&gt;, the other is an &lt;a href=&#34;https://www.ljw.me.uk/ibm360/vhdl/&#34;&gt;IBM System/360 Model&#xA;30&lt;/a&gt;. The IBM one is also interesting in that&#xA;it appears to create a live image of the front panel state on its VGA output. At&#xA;the VCFe however, it was connected to an original front panel, making it much&#xA;more impressive.&lt;/p&gt;&#xA;&lt;p&gt;From talking to the people involved in these projects I gathered that they have&#xA;some challenges with the lack of a central clock that drives synchronous logic,&#xA;a design method that is central to modern logic and the kind of hardware that&#xA;can most efficiently be implemented in FPGAs. Apparently there are many places&#xA;where logic delays were integral to both the PDP&amp;rsquo;s and IBM&amp;rsquo;s logic, and those&#xA;are not simple to implement especially when the delay is not well documented in&#xA;the schematics.&lt;/p&gt;&#xA;&lt;p&gt;The PDP-8/e I am recreating also has logic running off of generated logic&#xA;signals that are used as clock signals for flip-flops all over the place.&#xA;However, all this is backed by a well defined timing phase and timing pulse&#xA;generator backed by a 20 MHz oscillator. I found converting the schematics to&#xA;synchronous logic rather straightforward as &lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-clocks-and-logic&#34;&gt;I have elaborated on&#xA;here&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>GHDL Back in Debian</title>
      <link>https://activelow.net/post/ghdl-back-in-debian/</link>
      <pubDate>Mon, 06 Aug 2018 22:48:12 +0200</pubDate>
      <guid>https://activelow.net/post/ghdl-back-in-debian/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://activelow.net/post/reviving-ghdl-in-debian&#34;&gt;As I have noted,&lt;/a&gt; I have been working on&#xA;packaging the VHDL simulator &lt;a href=&#34;https://github.com/ghdl/ghdl&#34;&gt;&lt;em&gt;GHDL&lt;/em&gt;&lt;/a&gt; for Debian&#xA;after it has dropped out of the archive for a few years. This work has been on&#xA;slow burner for a while and last week I used some time at &lt;a href=&#34;https://debconf18.debconf.org&#34;&gt;DebConf&#xA;18&lt;/a&gt; to finally push this to completion and upload&#xA;it. ftpmasters were also working fast, so yesterday the package got accepted and&#xA;is now available from Debian &lt;em&gt;unstable.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The package you get supports up to VHDL-93, which is entirely down to VHDL&#xA;library issues. The libraries published by IEEE along with the VHDL standard are&#xA;not free enough to be suitable for Debian main. Instead, the package uses the&#xA;&lt;em&gt;openieee&lt;/em&gt; libraries developed as part of &lt;em&gt;GHDL&lt;/em&gt;, which are GPL&amp;rsquo;ed from-scratch&#xA;implementations of the libraries required by the VHDL standard. Currently these&#xA;only implement VHDL-89 and VHDL-93, hence the limitation.&lt;/p&gt;&#xA;&lt;p&gt;I intend to package the IEEE libraries in a separate package that will go into&#xA;&lt;em&gt;non-free.&lt;/em&gt; The new license under which the libraries are distributed is&#xA;frustratingly close to free except in the case of modifications, where only&#xA;specific changes are allowed. No foreseeable problems for the &lt;em&gt;non-free&lt;/em&gt; section&#xA;though. This package should integrate itself into the &lt;em&gt;GHDL&lt;/em&gt; package&#xA;installations, so installing it will make the &lt;em&gt;GHDL&lt;/em&gt; packages support VHDL-2008&#xA;— at least as far as &lt;em&gt;GHDL&lt;/em&gt; itself supports VHDL-2008.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>PDP-8/e Replicated — Clocks And Logic</title>
      <link>https://activelow.net/post/pdp8e-replicated-clocks-and-logic/</link>
      <pubDate>Wed, 09 May 2018 14:58:42 +0200</pubDate>
      <guid>https://activelow.net/post/pdp8e-replicated-clocks-and-logic/</guid>
      <description>&lt;p&gt;This is, at long last, part 3 of the overview of my &lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-introduction&#34;&gt;PDP-8/e replica&#xA;project&lt;/a&gt; and offers some details of the&#xA;low-level implementation.&lt;/p&gt;&#xA;&lt;p&gt;I have mentioned that I build my PDP-8/e replica from the original schematics.&#xA;The great thing about the PDP-8/e is that it is still built in discrete logic&#xA;rather than around a microprocessor, meaning that schematics of the actual CPU&#xA;logic are available instead of just programmer&amp;rsquo;s documentation. After all, with&#xA;so many chips on multiple boards something is bound to break down sooner or&#xA;later and technicians need schematics to diagnose and fix that&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;. In&#xA;addition, there&amp;rsquo;s a maintenance manual that very helpfully describes the&#xA;workings of every little part of the CPU with excerpts of the full schematics,&#xA;but it has some inaccuracies and occasionally outright errors in the excerpts&#xA;so the schematics are still indispensable.&lt;/p&gt;&#xA;&lt;p&gt;Originally I wanted to design my own logic and use the schematics as just&#xA;another reference. Since the front panel is a major part of the project and I&#xA;want it to visually behave as close as possible to the real thing, I would have&#xA;to duplicate the cycles exactly and generally work very close to the original&#xA;design. I decided that at that point I might as well just reimplement the&#xA;schematics.&lt;/p&gt;&#xA;&lt;p&gt;However, some things can not be reimplemented exactly in the FPGA, other things&#xA;are a bad fit and can be improved significantly with slight changes.&lt;/p&gt;&#xA;&lt;h1 id=&#34;clocks&#34;&gt;Clocks&lt;/h1&gt;&#xA;&lt;p&gt;Back in the day, the rule for digital circuits were multi-phase clocks of&#xA;varying complexity, and the PDP-8/e is no exception in that regard. A cycle has&#xA;four timing states of different lengths that each end on a timing pulse.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-clocks-and-logic/handbook-timing.png&#34;&#xA;    alt=&#34;timing diagram from the &amp;ldquo;pdp8/e &amp;amp; pdp8/m small computer handbook 1972&amp;rdquo;&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;timing diagram from the &amp;ldquo;pdp8/e &amp;amp; pdp8/m small computer handbook 1972&amp;rdquo;&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;As can be seen, the timing states are active when they are at low voltage while&#xA;the timing pulses are active high. There are plenty of quirks like this which I&#xA;describe below in the Logic section.&lt;/p&gt;&#xA;&lt;p&gt;In the PDP-8 the timing generator was implemented as a circular chain of shift&#xA;registers with parallel outputs. At power on, these registers are reset to all 1&#xA;except for 0 in the first two bits. The shift operation is driven by a 20 MHz&#xA;clock&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; and the two zeros then circulate while logic combinations of&#xA;the parallel outputs generate the timing signals (and also core memory timing,&#xA;not shown in the diagram above).&lt;/p&gt;&#xA;&lt;p&gt;What happens with these signals is that the timing states together with control&#xA;signals decoded from instructions select data outputs and paths while the&#xA;associated timing pulse combined with timing state and instruction signals&#xA;trigger D type flip-flops to save these results and present it on their outputs&#xA;until they are next triggered with different input data.&lt;/p&gt;&#xA;&lt;p&gt;Relevant for D type flip-flops is the rising edge of their clock input. The&#xA;length of the pulse does not matter as long as it is not shorter than a&#xA;required minimum. For example the accumulator register needs to be loaded at&#xA;&lt;em&gt;TP3&lt;/em&gt; during major state &lt;em&gt;E&lt;/em&gt; for a few different instructions. Thus the &lt;em&gt;AC LOAD&lt;/em&gt;&#xA;signal is generated as &lt;em&gt;TP3&lt;/em&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;E&lt;/em&gt; &lt;strong&gt;and&lt;/strong&gt; (&lt;em&gt;TAD instruction&lt;/em&gt; &lt;strong&gt;or&lt;/strong&gt; &lt;em&gt;AND&#xA;instruction&lt;/em&gt; &lt;strong&gt;or&lt;/strong&gt; …) and that signal is used as the clock input for all&#xA;twelve flip-flops that make up the accumulator register.&lt;/p&gt;&#xA;&lt;p&gt;However, having flip-flops clocked off timing pulses that are combined with&#xA;different amounts of logic create differences between sample times which in turn&#xA;make it hard to push that kind of design to high cycle frequencies. Basically&#xA;all modern digital circuits are synchronous. There, all flip-flops are clocked&#xA;directly off the same global clock and get triggered at the same time. Since of&#xA;course not all flip-flops should get new values at every cycle they have an&#xA;additional &lt;em&gt;enable&lt;/em&gt; input so that the rising clock edge will only register new&#xA;data when &lt;em&gt;enable&lt;/em&gt; is also true&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Naturally, FPGAs are tailored to this design paradigm. They have (a limited&#xA;number of) dedicated clock distribution networks set apart from the regular&#xA;signal routing resources, to provide low skew clock signals across the device.&#xA;Groups of logic elements get only a very limited set of clock inputs for all&#xA;their flip-flops. While it is certainly possible to run the same scheme as the&#xA;original in an FPGA, it would be an inefficient use of resources and very likely&#xA;make automated timing analysis difficult by requiring lots of manual&#xA;specification of clock relationships between registers.&lt;/p&gt;&#xA;&lt;p&gt;So while I do use 20 MHz as the base clock in my timing generator and generate&#xA;the same signals in my design, I also provide this 20 MHz as the common clock to&#xA;all logic. Instead of registers triggering on the timing pulse rising edges they&#xA;get the timing pulses as enables. One difference resulting from that is&#xA;registers aren&amp;rsquo;t triggered by the rising edge of a pulse anymore but will&#xA;trigger on every clock cycle where the pulse is active. The original pulses are&#xA;two clock cycles long and extend into the following time state so the correct&#xA;data they picked up on the first cycle would be overwritten by wrong data on the&#xA;second. I simply shortened the timing pulses to one clock cycle to adapt to&#xA;this.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-clocks-and-logic/simulated-timing.png&#34;&#xA;    alt=&#34;timing signals from simulaton showing long and fast cycle&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;timing signals from simulaton showing long and fast cycle&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;To reiterate, this is all in the interest of matching the original timing&#xA;exactly. Analysis by the synthesis tool shows that I could easily push the base&#xA;clock well over twice the current speed, and that&amp;rsquo;s already with it assuming&#xA;that everything has to settle within one clock cycle as I&amp;rsquo;ve not specified&#xA;multicycle paths. Meaning I could shorten the timing states to a single&#xA;cycle&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt; for an overall more than 10× acceleration on the lowest speed&#xA;grade of the low-end FPGA I&amp;rsquo;m using.&lt;/p&gt;&#xA;&lt;h1 id=&#34;logic&#34;&gt;Logic&lt;/h1&gt;&#xA;&lt;p&gt;To save on logic, many parts with &lt;em&gt;open collector&lt;/em&gt; outputs were used in the&#xA;PDP-8. Instead of driving high or low voltage to represent zeros and ones, an&#xA;open collector only drives either low voltage or leaves the line alone. Many&#xA;outputs can then be simply connected together as they can&amp;rsquo;t drive conflicting&#xA;voltages. Return to high voltage in the absence of outputs driving low is&#xA;accomplished by a resistor to positive supply somewhere on the signal line.&lt;/p&gt;&#xA;&lt;p&gt;The effect is that the connection of outputs itself forms a logic combination in&#xA;that the signal is high when none of the gates drive low and it&amp;rsquo;s low when any&#xA;number of gates drive low. Combining that with &lt;em&gt;active low&lt;/em&gt; signalling, where a&#xA;low voltage represents &lt;em&gt;active&lt;/em&gt; or &lt;em&gt;1&lt;/em&gt;, the result is a logical OR combination&#xA;of all outputs (called &lt;em&gt;wired OR&lt;/em&gt; since no logic gates are involved).&lt;/p&gt;&#xA;&lt;p&gt;The designers of the PDP-8/e made extensive use of that. The majority of signals&#xA;are active low, marked with &lt;em&gt;L&lt;/em&gt; after their name in the schematics. Some signals&#xA;don&amp;rsquo;t have multiple sources and can be active high where it&amp;rsquo;s more convenient,&#xA;those are marked with &lt;em&gt;H&lt;/em&gt;. And then there are many signals that carry no&#xA;indication at all and some that miss the indication in the maintenance manual&#xA;just to make a reimplementer&amp;rsquo;s life more interesting.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-clocks-and-logic/schematics-acload.png&#34;&#xA;    alt=&#34;excerpt from the PDP-8/e CPU schematic, generation of the accumulator load (AC LOAD L) signal can be seen on the right&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;excerpt from the PDP-8/e CPU schematic, generation of the accumulator load (AC LOAD L) signal can be seen on the right&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;As an example in this schematic, let&amp;rsquo;s look at &lt;em&gt;AC LOAD L&lt;/em&gt; which triggers&#xA;loading the accumulator register from the major registers bus. It&amp;rsquo;s a wired OR&#xA;of two NAND outputs, both in the chip labeled E15, and with pull-up resistor R12&#xA;to +5 V. One NAND combines &lt;em&gt;BUS STROBE&lt;/em&gt; and &lt;em&gt;C2&lt;/em&gt;, the other &lt;em&gt;TP3&lt;/em&gt; and an OR in&#xA;chip E7 of a bunch of instruction related signals. For comparison, here&amp;rsquo;s how I&#xA;implemented it in VHDL:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-VHDL&#34; data-lang=&#34;VHDL&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ac_load &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt; (bus_strobe &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;not&lt;/span&gt; c2) &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (TP3 &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; E &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; ir_TAD) &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (TP3 &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; E &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; ir_AND) &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (TP3 &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; E &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; ir_DCA) &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           (TP3 &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; F &lt;span style=&#34;color:#66d9ef&#34;&gt;and&lt;/span&gt; ir_OPR);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;FPGAs don&amp;rsquo;t have internal open collector logic&lt;sup id=&#34;fnref:5&#34;&gt;&lt;a href=&#34;#fn:5&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;5&lt;/a&gt;&lt;/sup&gt; and any output of a&#xA;logic gate must be the only one driving a particular line. As a result, all the&#xA;wired OR must be implemented with explicit ORs. Without the need to have active&#xA;low logic I consistently use active high everywhere, meaning that the logic in&#xA;my implementation is mostly inverted compared to the real thing. The deviation&#xA;of ANDing &lt;em&gt;TP3&lt;/em&gt; with every signal instead of just once with the result of the OR&#xA;is again due to consistency, I use the &amp;ldquo;&lt;em&gt;&amp;lt;timing&amp;gt;&lt;/em&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;&amp;lt;major state&amp;gt;&lt;/em&gt;&#xA;&lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;&amp;lt;instruction signal&amp;gt;&lt;/em&gt;&amp;rdquo; pattern a lot.&lt;/p&gt;&#xA;&lt;p&gt;One difficulty with wired OR is that it is never quite obvious from a given&#xA;section of the schematics what &lt;em&gt;all&lt;/em&gt; inputs to a given gate are. You may have a&#xA;signal &lt;em&gt;X&lt;/em&gt; being generated on one page of the schematic and a line with signal&#xA;&lt;em&gt;X&lt;/em&gt; as an input to a gate on another page, but that doesn&amp;rsquo;t mean there isn&amp;rsquo;t&#xA;something on yet another page also driving it, or that it isn&amp;rsquo;t also present on&#xA;a peripheral port&lt;sup id=&#34;fnref:6&#34;&gt;&lt;a href=&#34;#fn:6&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;6&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Some of the original logic is needed only for electrical reasons, such as&#xA;buffers which are logic gates that do not combine multiple inputs but simply&#xA;repeat their inputs (maybe inverted). Logic gate outputs can only drive so many&#xA;inputs, so if one signal is widely used it needs buffers. Inverters are commonly&#xA;used for that in the PDP-8. &lt;em&gt;BUS STROBE&lt;/em&gt; above is one example, it is the&#xA;inverted &lt;em&gt;BUS STROBE L&lt;/em&gt; found on the backplane. Another is &lt;em&gt;BTP3&lt;/em&gt; (&lt;em&gt;B&lt;/em&gt; for&#xA;buffered) which is &lt;em&gt;TP3&lt;/em&gt; twice inverted.&lt;/p&gt;&#xA;&lt;p&gt;Finally, some additional complexity is owed to the fact that the 8/e is made of&#xA;discrete logic chips and that these have multiple gates in a package, for&#xA;example the 7401 with four 2-input NAND gates with open collector outputs per&#xA;chip. In designing the 8/e, logic was sometimes not implemented&#xA;straightforwardly but as more complicated equivalents if it means unused gates&#xA;in existing chips could be used rather than adding more chips.&lt;/p&gt;&#xA;&lt;h1 id=&#34;summary&#34;&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;I have started out saying that I build an exact PDP-8/e replica from the&#xA;schematics. As I have detailed, that doesn&amp;rsquo;t involve just taking every gate and&#xA;its connections from the schematic and writing it down in VHDL. I am changing&#xA;the things that can not be directly implemented in an FPGA (like wired OR) and&#xA;leaving out things that are not needed in this environment (such as buffers).&#xA;Nevertheless, the underlying logic stays the same and as a result my&#xA;implementation has the exact same timing and behaviour even in corner cases.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately all this only applies to the CPU and closely associated units&#xA;(arithmetic and address extension). Moving out to peripheral hardware, the&#xA;interface to the CPU may be the only part that could be implemented from&#xA;original schematics. After all, where the magnetic tape drive interface in the&#xA;original was controlling the actual tape hardware the equivalent in the replica&#xA;project would be accessing emulated tape storage.&lt;/p&gt;&#xA;&lt;p&gt;This finally concludes the overview of my project. Its development hasn&amp;rsquo;t&#xA;advanced as much as I expected around this time last year since I ended up&#xA;putting the project aside for a long while. After returning to it, running the&#xA;MAINDEC test programs revealed a bunch of stuff I forgot to implement or&#xA;implemented wrong which I had to fix. The optional Extended Arithmetic Element&#xA;isn&amp;rsquo;t implemented yet, the Memory Extension &amp;amp; Time Share is now complete pending&#xA;test failures I need to debug. It is now reaching a state where I consider the&#xA;design getting ready to be published.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;There are also test programs that exercise and check every single logic gate to help pinpoint a problem. Naturally they are also extremely helpful with verifying that a replica is in fact working exactly like the real thing.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Thus 50 ns, one cycle of the 20 MHz clock, is the granularity at which these signals are created. The timing pulses, for example, are 100 ns long.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;This is simply implemented by presenting them their own output by a feedback path when enable is false so that they reload their existing value on the clock edge.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:4&#34;&gt;&#xA;&lt;p&gt;In fact I would be limited by the speed of the external SRAM I use and its 6 bit wide data connection, requiring two cycles for a 12 bit access.&amp;#160;&lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:5&#34;&gt;&#xA;&lt;p&gt;The IO pins that interface to the outside world generally have the capability to switch disconnection at run time, allowing open collector and similar signaling.&amp;#160;&lt;a href=&#34;#fnref:5&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:6&#34;&gt;&#xA;&lt;p&gt;Besides the memory and expansion bus, the 8/e CPU also has a special interface to attach the Extended Arithmetic Element.&amp;#160;&lt;a href=&#34;#fnref:6&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>Fixing a Nintendo Game Boy Screen</title>
      <link>https://activelow.net/post/fixing-gameboy-screen/</link>
      <pubDate>Sun, 14 Jan 2018 01:28:13 +0100</pubDate>
      <guid>https://activelow.net/post/fixing-gameboy-screen/</guid>
      <description>&lt;p&gt;Over the holidays my old Nintendo Game Boy (the original DMG-01 model) has&#xA;resurfaced. It works, but the display had a bunch of vertical lines near the&#xA;left and right border that stay blank. Apparently a common problem with these&#xA;older Game Boys and the solution is to apply heat to the connector foil upper&#xA;side to resolder the contacts hidden underneath. There&amp;rsquo;s lots of tutorials and&#xA;videos on the subject so I won&amp;rsquo;t go into much detail here.&lt;/p&gt;&#xA;&lt;p&gt;Just one thing: The easiest way is to use a soldering iron (the foil is pretty&#xA;heat resistant, it has to be soldered during production after all) and move it&#xA;along the top at the affected locations. Which I tried at first and it kind of&#xA;works but takes ages. Some columns reappear, others disappear, reappeared&#xA;columns disappear again… In someone&amp;rsquo;s comment I read that they needed over five&#xA;minutes until it was fully fixed!&lt;/p&gt;&#xA;&lt;p&gt;So… simply apply a small drop of solder to the tip. That&amp;rsquo;s what you do for&#xA;better heat transfer in normal soldering and of course it also works here (since&#xA;the foil connector back doesn&amp;rsquo;t take solder this doesn&amp;rsquo;t make a mess or&#xA;anything). That way, the missing columns reappeared practically instantly at the&#xA;touch of the solder iron and stayed fixed. Temperature setting was 250°C, more&#xA;than sufficient for the task.&lt;/p&gt;&#xA;&lt;p&gt;This particular Game Boy always had issues with the speaker stopping to work but&#xA;we never had it replaced, I think because the problem was intermittent. After&#xA;locating the bad solder joint on the connector and reheating it this problem was&#xA;also fixed. Basically this almost 28 year old device is now in better working&#xA;condition than it ever was.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Reviving GHDL in Debian</title>
      <link>https://activelow.net/post/reviving-ghdl-in-debian/</link>
      <pubDate>Mon, 06 Nov 2017 02:52:03 +0100</pubDate>
      <guid>https://activelow.net/post/reviving-ghdl-in-debian/</guid>
      <description>&lt;p&gt;It has been a few years since Debian last had a working&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/VHDL&#34;&gt;VHDL&lt;/a&gt; simulator in the archive. Its&#xA;competitor &lt;a href=&#34;https://en.wikipedia.org/wiki/Verilog&#34;&gt;Verilog&lt;/a&gt; has been covered by&#xA;the &lt;em&gt;iverilog&lt;/em&gt; and &lt;em&gt;verilator&lt;/em&gt; simulator packages, but&#xA;&lt;a href=&#34;https://github.com/tgingold/ghdl&#34;&gt;&lt;em&gt;GHDL&lt;/em&gt;&lt;/a&gt; was the only option for VHDL in&#xA;Debian and that has become broken, orphaned and was eventually removed. I have&#xA;just submitted an &lt;a href=&#34;https://bugs.debian.org/880942&#34;&gt;ITP&lt;/a&gt; to make my work on it&#xA;official.&lt;/p&gt;&#xA;&lt;p&gt;A lot has changed since the last Debian upload of &lt;em&gt;GHDL&lt;/em&gt;. Upstream development&#xA;is quite active and it has gained free reimplementations of the standard library&#xA;definitions (the lack of which frustrated at least two attempts at adoption of&#xA;the Debian package). It has gained additional backends, in addition to &lt;em&gt;GCC&lt;/em&gt; it&#xA;can now also use &lt;em&gt;LLVM&lt;/em&gt; and its own custom &lt;em&gt;mcode&lt;/em&gt; (x86 only) code generator.&#xA;The &lt;em&gt;mcode&lt;/em&gt; backend should provide faster compilation at the expense of lacking&#xA;sophisticated optimization, hence it might be preferable over the other two for&#xA;small projects.&lt;/p&gt;&#xA;&lt;p&gt;My intentions are to provide all three backends in separate packages which would&#xA;also offer easier backend troubleshooting—a user experiencing problems can&#xA;simply install another package to try a different backend. The problem with that&#xA;idea is that &lt;em&gt;GHDL&lt;/em&gt; is not designed for that kind of parallel installation. The&#xA;backend is chosen at build configure time and that configuration is built and&#xA;installed. Parallel installation will probably need some development but if&#xA;that would turn out to be much work I could always have the packages conflicting&#xA;initially.&lt;/p&gt;&#xA;&lt;p&gt;Given all these changes I am redoing the Debianization from ground up and maybe&#xA;take bits and pieces from the old packaging where suitable. Right now I&amp;rsquo;m&#xA;building the different backends to compare and see what files are backend&#xA;specific and what can go into a common package.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>PDP-8/e Replicated — Overview</title>
      <link>https://activelow.net/post/pdp8e-replicated-overview/</link>
      <pubDate>Tue, 11 Jul 2017 20:02:07 +0200</pubDate>
      <guid>https://activelow.net/post/pdp8e-replicated-overview/</guid>
      <description>&lt;p&gt;This is an overview of the hardware and internals of the&#xA;&lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-introduction&#34;&gt;PDP-8/e replica I&amp;rsquo;m building&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-front-panel-board&#34;&gt;The front panel board&lt;/h2&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-overview/PDP8e-frontpanel-replica.jpeg&#34;&#xA;    alt=&#34;functional replica of the PDP-8/e front panel&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;If you know the original or remember the&#xA;&lt;a href=&#34;../pdp8e-replicated-introduction/VCFe18-replica-and-real.jpeg&#34;&gt;picture from the first post&lt;/a&gt;&#xA;it is clear that this is a functional replica not aiming to be as pretty as&#xA;those of the other projects I mentioned. I have reordered the switches into two&#xA;rows to make the board more compact (which also means cheaper) without&#xA;sacrificing usability.&lt;/p&gt;&#xA;&lt;p&gt;There&amp;rsquo;s the two rows of display lights plus one &lt;em&gt;run&lt;/em&gt; light the 8/e provides.&#xA;The upper row is the address made up of 12 bits of &lt;em&gt;memory address&lt;/em&gt; and 3 bits&#xA;of &lt;em&gt;extended memory address&lt;/em&gt; or &lt;em&gt;field&lt;/em&gt;. Below are the 12 bits &lt;em&gt;indicator&lt;/em&gt; which&#xA;can show one data set out of six as selected by the user.&lt;/p&gt;&#xA;&lt;p&gt;All the switches of the original are implemented as more compact&#xA;buttons&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;. While momentary switches are easily substituted by buttons,&#xA;all buttons implementing two position switches toggle on/off with each press and&#xA;they have a LED above that shows the current state. The six position rotary&#xA;switch is implemented as a button cycling through all indicator displays&#xA;together with six LEDs which show the active selection.&lt;/p&gt;&#xA;&lt;p&gt;Markings show the meaning of the indicator and switches as on the original,&#xA;grouped in threes as the predominant numbering system for the PDPs was octal.&#xA;The upper line shows the meaning for the &lt;em&gt;state&lt;/em&gt; indicator, the middle for the&#xA;&lt;em&gt;status&lt;/em&gt; indicator and bit numbers for the rest. Note that on the PDP-8 and&#xA;opposite to modern conventions, the most significant bit was numbered 0.&lt;/p&gt;&#xA;&lt;p&gt;I designed it as a pure front panel board without any PDP-8 simulation parts.&#xA;The buttons and associated lights are controllable via SPI lines with a 3.3 V&#xA;supply. The address and indicator lights have a separate common anode&#xA;configuration with all cathodes individually available on a pin header without&#xA;any resistors in the path, leaving voltage and current regulation up to the&#xA;simulation board. This board is actually a few years old from a similar project&#xA;where I emulated the PDP-8 in software on a microcontroller and the flexible&#xA;design allowed me to reuse it unchanged.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-main-board&#34;&gt;The main board&lt;/h2&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-overview/PDP8e-replicated-main-board.jpeg&#34;&#xA;    alt=&#34;main board with CPU and peripherals of the replicated PDP-8/e&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;This is where the magic happens. You can see three big ICs on the board: On the&#xA;left is the&#xA;&lt;a href=&#34;http://www.st.com/en/microcontrollers/stm32f405-415.html&#34;&gt;STM32F405&lt;/a&gt;&#xA;microcontroller (with ARM Cortex-M4 core), the bigger one in the middle is the&#xA;Altera&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;&#xA;&lt;a href=&#34;https://www.altera.com/products/fpga/max-series/max-10/overview.html&#34;&gt;MAX 10&lt;/a&gt;&#xA;FPGA and finally to the right is the SRAM that is large enough to hold all the&#xA;main memory of the 32 KW maximum expansion of the PDP-8/e. The two smaller chips&#xA;to the right of that are just buffers that drive the front panel address LEDs,&#xA;the small chip at the top left is a RS-232 level shifter.&lt;/p&gt;&#xA;&lt;p&gt;The idea behind this is that the PDP-8 and peripherals that are simple to&#xA;directly implement, such as GPIO or a serial port, are fully on the FPGA. Other&#xA;peripherals such as paper and magnetic tape and disks, which are after all not&#xA;connected to real PDP-8 drives but disk images on a microSD, are implemented on&#xA;the microcontroller interfacing with stub devices in the FPGA. Compared to&#xA;implementing everything everything in the FPGA, the STM32F4 has the advantage&#xA;of useful built in peripherals such as two host/device capable USB ports. 5 V&#xA;tolerant I/O pins are very useful and simply not available in any FPGA.&lt;/p&gt;&#xA;&lt;p&gt;I have to admit that this board was a bit of a rush job in order to have&#xA;something at all to show at the&#xA;&lt;a href=&#34;https://vcfe.org/&#34;&gt;Vintage Computer Festival Europe 18.0&lt;/a&gt;. Given that it was my&#xA;first time designing a board with a large microcontroller and the first time&#xA;with an FPGA, it wasn&amp;rsquo;t exactly my fastest progressing project either and I got&#xA;basic functionality (front panel allows toggling in small programs and running&#xA;them) working just in time. For various reasons the project hasn&amp;rsquo;t progressed&#xA;much since, so the following is still just plans, but plans for which the&#xA;hardware was designed.&lt;/p&gt;&#xA;&lt;p&gt;Since the aim is to have a cycle accurate PDP-8/e implementation, digital I/O&#xA;was always planned. Rather than defining my own header I have included Arduino&#xA;R3 compatible headers (for 3.3 V compatible boards only) that have become a&#xA;popular even outside the Arduino world for this purpose. The digital Arduino&#xA;pins are connected directly to the FPGA and will be directly controllable by&#xA;PDP-8 software. The downside of choosing the Arduino headers is that the&#xA;original PDP-8 digital I/O interface is not a perfect match since it naturally&#xA;has 12 lines whereas the Arduino has 15. The analog inputs are not connected to&#xA;the FPGA, the documentation of the MAX10&amp;rsquo;s ADC in the EQFP package are not very&#xA;encouraging. They are connected to the STM32 instead&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Another interface connected directly to the FPGA and that would be directly&#xA;under PDP-8 control is a standard 9 pin RS-232 interface. &lt;em&gt;RX&lt;/em&gt;, &lt;em&gt;TX&lt;/em&gt;, &lt;em&gt;CTS&lt;/em&gt; and&#xA;&lt;em&gt;RTS&lt;/em&gt; are connected and level-shifted between 3.3 V and RS-232 levels by a&#xA;MAX3232.&lt;/p&gt;&#xA;&lt;p&gt;Besides the PDP-8, I also plan to implement a full video terminal on the board.&#xA;The idea is that with a power supply, keyboard and monitor this board would&#xA;form a complete system without the need of connecting another computer to act&#xA;as a terminal. To that end, there is a VGA port attached to the FPGA with&#xA;simple resistor network DACs for 9 bits color (RGB with 3 bits each). This is&#xA;another spot where I left myself room to expand, for e.g. a VT220 you really&#xA;only need one color in two brightness levels. Keyboards will be connected&#xA;either via the PS/2 connector on the right or the USB-A host port at the top&#xA;left.&lt;/p&gt;&#xA;&lt;p&gt;Last of the interface ports is the USB micro-AB port on the left, which for now&#xA;I am using only for power supply. I mainly plan to use it to provide&#xA;alternative or additional serial ports to the PDP-8 or to export the video&#xA;terminal serial port for testing purposes. Other possible uses are access to&#xA;the image files on the microSD and firmware updates.&lt;/p&gt;&#xA;&lt;p&gt;This has gotten rather long again, so I&amp;rsquo;m stopping here and leave some&#xA;implementation notes for&#xA;&lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-clocks-and-logic&#34;&gt;another post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;They are also much cheaper. Given the large number of switches, the savings are substantial. Additionaly the buttons are nicer to operate than long rows of tiny switches.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Or rather Intel now. At least Altera&amp;rsquo;s web site, documentation and software have already been thoroughly rebranded, but the chips I got were produced prior to that.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;That&amp;rsquo;s not to say that the analog conversions on the STM32 are necessarily better than those of the MAX10 when you can&amp;rsquo;t follow their guidelines, I have no comparisons. Certainly following the guidelines would have been prohibitive given how many pins&amp;rsquo; usage they restrict.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>PDP-8/e Replicated — Introduction</title>
      <link>https://activelow.net/post/pdp8e-replicated-introduction/</link>
      <pubDate>Sun, 25 Jun 2017 20:58:57 +0200</pubDate>
      <guid>https://activelow.net/post/pdp8e-replicated-introduction/</guid>
      <description>&lt;p&gt;I am creating a replica of the DEC PDP-8/e architecture in an FPGA from&#xA;schematics of the original hardware. So how did I end up with a project like&#xA;this?&lt;/p&gt;&#xA;&lt;p&gt;The story begins with me wanting to have a computer with one of those front&#xA;panels that have many, many lights where you can really see, in real time, what&#xA;the computer is doing while it is executing code. Not because I am nostalgic&#xA;for a prior experience with any of those — I was born a bit too late for that&#xA;and my first computer as a kid was a Commodore 64.&lt;/p&gt;&#xA;&lt;p&gt;Now, the front panel era ended around 40 years ago with the advent of&#xA;microprocessors and computers of that age and older that are complete and&#xA;working are hard to find and not cheap. And even if you do, there&amp;rsquo;s the issue&#xA;of weight, size (complete systems with peripherals fill at least a rack) and&#xA;power consumption.  So what to do — build myself a small one with modern&#xA;technology of course.&lt;/p&gt;&#xA;&lt;p&gt;While there&amp;rsquo;s many computer architectures of that era to choose from, the&#xA;various PDP machines by DEC are significant and well known (and documented) due&#xA;to their large numbers. The most important are probably the 12 bit PDP-8, the 16&#xA;bit PDP-11 and the 36 bit PDP-10. While the PDP-11 is enticing because of the&#xA;possibility to run UNIX I wanted to start with something simpler, so I chose the&#xA;PDP-8.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://activelow.net/post/pdp8e-replicated-introduction/VCFe18-replica-and-real.jpeg&#34;&#xA;    alt=&#34;My implementation on display next to a real PDP-8/e at VCFe 18.0&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;My implementation on display next to a real PDP-8/e at VCFe 18.0&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;the-original&#34;&gt;The Original&lt;/h2&gt;&#xA;&lt;p&gt;DEC started the PDP-8 line of &lt;del&gt;computers&lt;/del&gt; programmed data processors designed&#xA;as low cost machines in 1965. It is a quite minimalist 12 bit architecture based&#xA;on the earlier PDP-5, and by minimalist I mean &lt;em&gt;seriously&lt;/em&gt; minimal. If you are&#xA;familiar with early 8 bit microprocessors like the 6502 or 8080 you will find&#xA;them luxuriously equipped in comparison.&lt;/p&gt;&#xA;&lt;p&gt;The PDP-8 base architecture has a program counter (PC) and an accumulator&#xA;(AC)&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;. That&amp;rsquo;s it. There are no pointer or index registers&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;.&#xA;There is no stack. It has addition and AND instructions but subtractions and OR&#xA;operations have to be manually coded. The optional Extended Arithmetic Element&#xA;adds the MQ register but that&amp;rsquo;s really it for visible registers. The &lt;a href=&#34;https://en.wikipedia.org/wiki/PDP-8&#34;&gt;Wikipedia&#xA;page on the PDP-8&lt;/a&gt; has a good detailed&#xA;description.&lt;/p&gt;&#xA;&lt;p&gt;Regarding technology, the PDP-8 series has been in production long enough to get&#xA;the whole range of implementations from discrete transistor logic to&#xA;microprocessors. The 8/e which I target was right in the middle, implemented&#xA;in TTL logic where each IC contains multiple logic elements. This allowed the&#xA;CPU itself (including timing generator) to fit on three large circuit boards&#xA;plugged into a backplane. Complete systems would have at least another board for&#xA;the front panel and multiple boards for the core memory, then additional boards&#xA;for whatever options and peripherals were desired.&lt;/p&gt;&#xA;&lt;h2 id=&#34;design-choices-and-comparisons&#34;&gt;Design Choices and Comparisons&lt;/h2&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not the only one who had the idea to build something like that, of course.&#xA;Among the other modern PDP-8 implementations with a front panel, probably the&#xA;most prominent project is the &lt;a href=&#34;http://www.sparetimegizmos.com/Hardware/SBC6120-2.htm&#34;&gt;Spare Time Gizmos&#xA;SBC6120&lt;/a&gt; which is a&#xA;PDP-8 single board computer built around the Harris/Intersil HD-6120&#xA;microprocessor, which implementes the PDP-8 architecture, combined with a nice&#xA;front panel. Another is the&#xA;&lt;a href=&#34;http://obsolescence.wixsite.com/obsolescence/pidp-8&#34;&gt;PiDP-8/I&lt;/a&gt;, which is&#xA;another nice front panel (modeled after the 8/i which has even more lights)&#xA;driven by the &lt;a href=&#34;http://simh.trailing-edge.com/&#34;&gt;simh&lt;/a&gt; simulator running under&#xA;Linux on a Raspberry Pi.&lt;/p&gt;&#xA;&lt;p&gt;My goal is to get front panel lights that appear exactly like the real ones in&#xA;operation. This necessitates driving the lights at full speed as they change&#xA;with every instruction or even within instructions for some display selections.&#xA;For example, if you run a tight loop that does nothing but increment AC while&#xA;displaying that register, it would appear that all lights are lit at equal but&#xA;less than full brightness. The reason is that the loop runs at such a high speed&#xA;that even the most significant bit, which is blinking the slowest, is too fast&#xA;to see flicker. Hence they are all effectively 50% on, just at different&#xA;frequencies, and appear to be constantly light at the same brightness.&lt;/p&gt;&#xA;&lt;p&gt;This is where the other projects lack what I am looking for. The PiDP-8/I is a&#xA;multiplexed display which updates at something like 30 Hz or 60 Hz, taking&#xA;whatever value is current in the simulation software at the time.  All the&#xA;states the lights took inbetween are lost and consequently there is flickering&#xA;where there shouldn&amp;rsquo;t be. On the SBC6120 at least the address lines appear to&#xA;update at full speed as these are the actual RAM address lines. However the&#xA;used 6120 microprocessor does not have required data for the indicator display&#xA;externally available. Instead, the SBC6120 runs an interrupt at 30 Hz to trap&#xA;into its firmware/monitor program which then reads the current state and writes&#xA;it to the front panel display, which is essentially just another peripheral. A&#xA;different considerable problem with the SBC6120 is its use of the 6100&#xA;microprocessor family ICs, which are themselves long out of production and not&#xA;trivial (or cheaply) to come by.&lt;/p&gt;&#xA;&lt;p&gt;Given that the way to go is to drive all lights in step with every&#xA;cycle&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;, this can be done by a software running on a dedicated&#xA;microcontroller — which is how I started — or by implementing a real CPU with&#xA;all the needed outputs in an FPGA — which is the project I am writing about.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://activelow.net/post/pdp8e-replicated-overview&#34;&gt;In the next post&lt;/a&gt; I give an overview of the&#xA;hardware I built so far and some of the features that are yet to be&#xA;implemented.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;With an associated link bit which is a little different from a carry bit in that it is treated as a thirteenth bit, i.e. it will be flipped rather than set when a carry occurs.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Although there are 8 specially treated memory addresses that will pre-increment when used in indirect addressing.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;Basic cycles on the PDP-8/e are 1.4 µs for memory modifying cycles and fast cycles of 1.2 µs for everything else. Instructions can be one to three cycles long.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>New Blog</title>
      <link>https://activelow.net/post/new-blog/</link>
      <pubDate>Wed, 21 Jun 2017 00:09:40 +0200</pubDate>
      <guid>https://activelow.net/post/new-blog/</guid>
      <description>&lt;p&gt;So I finally got myself a blog to write about my software and hardware projects,&#xA;my work in Debian and, I guess, stuff. Readers of&#xA;&lt;a href=&#34;http://planet.debian.org&#34;&gt;planet.debian.org&lt;/a&gt;, hi! If you can see this I got&#xA;the configuration right.&lt;/p&gt;&#xA;&lt;p&gt;For the curious, I&amp;rsquo;m using a static site generator for this blog —&#xA;&lt;a href=&#34;http://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; to be specific — like all the cool kids do these&#xA;days.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
