Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Open Source Hardware

Project IceStorm Passes Another Milestone: Building a CPU 107

beckman101 writes: FPGAs — specialized, high speed chips with large arrays of configurable logic — are usually highly proprietary. Anyone who has used one is familiar with the buggy and node-locked accompanying tools that FPGA manufacturers provide. Project IceStorm aims to change that by reverse-engineering some Lattice FPGAs to produce an open-source toolchain, and today it passed a milestone. The J1 open-source CPU is building under IceStorm, and running on real hardware. The result is a fairly puny microcontroller, but possibly the world's most open one.
This discussion has been archived. No new comments can be posted.

Project IceStorm Passes Another Milestone: Building a CPU

Comments Filter:
  • by Anonymous Coward on Tuesday July 28, 2015 @02:16AM (#50195173)

    I'm pretty sure CPUs are supposed to be closed so as to keep dust out.

  • by Anonymous Coward

    It bothers me that most people don't care. They don't understand that Intel/AMD CPUs could or will have backdoors. If not now, then very soon in the future.

    • by xophos ( 517934 ) * on Tuesday July 28, 2015 @02:34AM (#50195223)

      Forget the future, they are here and they are advertised as features:
      https://en.wikipedia.org/wiki/... [wikipedia.org]

    • by Balthisar ( 649688 ) on Tuesday July 28, 2015 @02:39AM (#50195233) Homepage

      It's kind of the same issue with open source software, as far as the "most people don't care" aspect, but at an even greater disadvantage that open source software. I don't have a chip fab (at least I could compile open source software), and so even if I were capable of understanding the chip design, there's not much of a guarantee that the physical chip I purchase doesn't have some proprietary back door built into it.

      Like most people, I'm even lazy about the open source software I use. While I try to download from trusted sources, there's no guarantee that what I actually install matches the current stable version in the repo. I'm taking a leap of faith.

      In both cases (including the former where I indicated my ignorare about chip design), presumably I am counting on other experts to understand the chip or understand the source code for me, but only in the latter case could I actually assemble the product myself in order to guarantee matching the reviewed, stable code.

      • by Bert64 ( 520050 ) <bert@[ ]shdot.fi ... m ['sla' in gap]> on Tuesday July 28, 2015 @04:52AM (#50195501) Homepage

        At some point you have to trust someone, be it the distributor from whom you're getting the os, the manufacturer or reseller supplying the hardware or even the supplier of the compiler...

        The only thing you can practically do, is ensure everything you use is available from multiple opposing sources... Something that's in use by both the us and russian governments is unlikely to be backdoored as both organisations have sufficient resources to perform the due diligence checks.

        • At some point you have to trust someone, be it the distributor from whom you're getting the os, the manufacturer or reseller supplying the hardware or even the supplier of the compiler...

          Or maybe not? [projectoberon.com]

      • by KGIII ( 973947 )

        I am not much better. I do, sometimes, review the source for interesting parts. At best, absolute best, I will find a bug and then go through the code and see if I can actually determine a fix. If I find a fix I send the code to the authors for inclusion and, obviously, with no strings attached. I have been able to do that on only a trivial number of occasions, I can think of three though it may have been more for I am old and my memory is faulty.

      • by tigersha ( 151319 ) on Tuesday July 28, 2015 @06:45AM (#50195745) Homepage

        An Intel i7 Quadcore has 1.7 Billions transistors on board. A Haswell E 18 Core monster chip 5.5 billion. Even a simple ARM Cortex has 26 million transistors.

        Do you think any single person at Intel knows everything about such a chip? Even the experts of the experts? How do do you think you are going to even comprehend such a thing even if it is open source? It really makes no difference, and no open source community is going to design a modern high-performance CPU. Intel invested 10.6 billion in R&D in 2013.

        At some point you are going to have to start trusting someone. Why everything has to be open is beyond me.

        • Do you think any single person at Intel knows everything about such a chip? Even the experts of the experts? How do do you think you are going to even comprehend such a thing even if it is open source? It really makes no difference, and no open source community is going to design a modern high-performance CPU. Intel invested 10.6 billion in R&D in 2013.

          Intel is bound by the requirement to run legacy software. Even an ARM system effectively has to be able to run it. A designer of a new open system would have no such constraints. Thus, no need to invest $10.6B and 5.5 billion transistors to reach a reasonable result for a wide range of applications. Attempting to review or redesign an Intel system would of course be a folly, but also completely pointless to begin with.

        • Eh. When laying out silicon, you generally use libraries of simple parts you chain together. You make a register once, and then you replicate it each place you need a register. A TON of those transistors are cache, which is the same pattern repeating over and over again.

          I'm not saying there's anyone who's looked at every transistor, but there's probably somebody who's looked at the layout of a cache cell, a register, an ALU, standard multiplexers, etc.

        • An Intel i7 Quadcore has 1.7 Billions transistors on board.

          Transistor count is a poor indicator of complexity. Most of those transistors are used to implement cache memory, which is just the same simple cell repeated millions of times.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      Most people don't care because they aren't even interested in computers.

      If you talk about Slashdot readers then they have all read enough articles to know that open source itself doesn't provide a perfect protection against backdoors.
      You also have to read the source to see that no backdoors are put in place, and you need to build the executable to make sure that the version you are running isn't built from a version of the source with backdoors in it.
      Now, assume that a processor like this becomes as mainstr

    • Comment removed based on user account deletion
    • by janoc ( 699997 )

      Sorry, but you need to get real here.

      First, these FPGAs don't quite have enough power to run a design comparable with an Intel/AMD CPU as most people know them. So this effort is pretty much irrelevant for dealing with backdoors in mainstream hardware. Their goals are quite different, mostly to do with on the fly reconfigurable computation - something that is hard or impossible to do if you cannot generate the bitstream using your tools.

      Second, even if you had a fully open sourced design somehow, how many p

      • I disagree. Saying "people couldn't understand the hardware" is the same as people saying "open source software is irrelevant because you can't understand the software."

        Some people can. I have an electrical engineering degree and specialized in computer architecture in grad school. I could understand it. And just like anything else...it's not that hard when you know what you're looking at.

        • by janoc ( 699997 )

          Yeah, right. So it only took a decade to get serious OpenSSL bugs discovered and fixed - despite the project being open from the start. And that is most likely an order of magnitude smaller project than something like even moderately complex CPU core, written in a language that many more people are familiar with.

          Yes, if it wasn't open, the bugs probably wouldn't have been found, but that's speculation - we simply will never know. If you hope to find a "backdoor" (which could be simply so subtle as intention

          • Oh, you're absolutely right. I'm definitely not saying it would be impossible to hide a backdoor in an open core design. Absolutely could. Same thing with FOSS...just see the Underhanded C Competition.

            But today you could have (and probably do have...) explicit backdoors in silicon, besides debugging interfaces, and you'd never know. With an open core design, you'd have to hide it.

    • by Joce640k ( 829181 ) on Tuesday July 28, 2015 @04:15AM (#50195417) Homepage

      They don't understand that Intel/AMD CPUs could or will have backdoors. If not now, then very soon in the future.

      I usually decap my CPUs and inspect them before installing them. I haven't seen anything suspicious so far.

      The real problem is Windows. Having to disassemble/inspect the OS before installing wasn't too bad, it's the constant stream of patches that gets me down.

      • by KGIII ( 973947 )

        You can actually see some of the Windows source code if you want. You must sign an NDA and you have to justify your access (at least you did while I was still in the MVP program - and that was as an MVP, some of the most trusted folks) but the program to do so is called the Shared Source Initiative or at least was. Meh, a quick Google indicates it still is.

        So you can see the source, in part, if you want to. We had to tell them what we wanted to do with it (usually it involves tying an application in cleaner

        • You can actually see some of the Windows source code if you want. You must sign an NDA and you have to justify your access (at least you did while I was still in the MVP program

          The Pirate Bay allows you to skip the red tape.

          So you can see the source, in part, if you want to.

          "In part".

          The patches are the biggest worry for me. Microsoft could backdoor most of the computers in the world overnight if it wanted to. They can even target specific IP addresses if they want to because the own the patch distribution network. This is why I feel it's important to disassemble/inspect the patches before installing. There's no source code available for patches so keeping my Windows PC in tip-top condition is a big drain on my resources. Still ..

          • The Pirate Bay allows you to skip the red tape.

            Unless something new has happened in the last decade, the only source leaks I'm aware of are NT4 and Win2k. So if you were willing to do without x86-64, most of ACPI, UEFI, IPv6, and pretty much every piece of hardware on your motherboard, I guess you could use that.

            You can probably live without Metro, so there is that.

          • by KGIII ( 973947 )

            Patches are generally easier to access in my experience. I have literally used the excuse, "I am curious." I have also used, "I feel like breaking stuff." It does matter who you are and how much you have a history with the company (as to be expected). However, the source is there - it is just not open. I would not want to be the one caught leaking it either.

    • by ledow ( 319597 )

      The size and complexity of modern CPU's mean that you don't stand a chance at getting a no-backdoor assurance for anything useful.

      Down on this scale, on microprocessors and IC's, it's possible but incredibly difficult. If you were serious about no-backdoors (e.g. military), you'd not be using an off-the-shelf American product. You'd be describing the chip you want to build and validating the end-product against your design. Because that's the ONLY way to be sure.

      There is absolutely no guarantee that your

      • If you were serious about no-backdoors (e.g. military), you'd not be using an off-the-shelf American product.

        On the other hand, if you were the US military, you might as well be doing just that! [slashdot.org]

      • Also, I suspect that you're ultimately wrong. What exactly prevents us from turning something like Project Oberon into hardware? There's nothing "antiquated" about a clean design. Or are you implying that anything non-baroque is antiquated by definition? Rather than coming up with ever-more-complicated cores, give me a hypercube of power-efficient cores and a stacked memory on top of them to play with. After all, in an era of most software containing some form of encapsulation and message passing between it
      • by gtall ( 79522 )

        You are thinking of the military of the 1970s. After Reagan, there was a push for COTS everywhere. Global Foundries was sold to fat boys in the robes from the UAE. These days, the U.S. military gets its stuff just like you do. The major defense firms probably do a bit of their own programming with their own tools, but they aren't producing chips. Even Altera is being sold to Intel so they can screw up the FPGA market as badly as they did the processor market.

    • by Bengie ( 1121981 )
      It's not worth caring because there is nothing I can do. When you care about something you can't change, it just causes anxiety which hurts your health. Unless you think it's a good thing to be less healthy.
    • by LWATCDR ( 28044 )

      FPGA can also have backdoors.

    • "most people" have no interest in programming FPGAs, so they shouldn't care. "Most people who are into open source CPU design"... they should.

      You can think of this as an open source compiler for a closed source piece of hardware: FPGAs already give you the freedom to implement whatever IC you want (e.g a small open source CPU design) - the only closed part about them is the tool chain provided by the FPGA manufacturer and the more unique parts of a particular FPGA hardware beyond the logic block.

      This projec

    • Comment removed based on user account deletion
  • by Anonymous Coward

    Buggy and node-locked tools sure sounds like what I used. Hopefully an open source version can fix the shitty stability along with the shitty vendor lock and pricing.

  • by Anonymous Coward on Tuesday July 28, 2015 @02:29AM (#50195211)

    There are plenty of fully open source CPUs around.

    There is a community building CPUs from discrete logic (http://mycpu.selfhost.it/), from transistors (http://www.extremetech.com/computing/128035-how-to-build-an-8-bit-computer-from-scratch) and even from relays (http://www.nablaman.com/relay/).

    There are also Forth CPUs which are freely embeddable into a FPGA (the J1: http://www.excamera.com/sphinx/fpga-j1.html) and which can be purchased now (http://excamera.com/sphinx/gameduino/).

    • by egladil ( 1640419 ) on Tuesday July 28, 2015 @02:55AM (#50195273)
      What is special is that they are making an open toolchain to program an FPGA and that toolchain is now capable enough to program a working CPU into the FPGA.

      If you had read the entire summary you would have seen that the CPU design they were using was the J1 that you mention.
      • by gl4ss ( 559668 ) on Tuesday July 28, 2015 @03:27AM (#50195327) Homepage Journal

        yeah so why it's marketed in the blurb as an open source cpu when the interesting thing is an open source toolchain for a closed silicon fpga?

        • No idea. Open source FPGA toolchains are definitely interesting, mostly because Altera and Xilinx compete on who can produce the worst software. Having a single toolchain that could target both (which this project is still a long way away from) would be very useful. Unfortunately, high-end FPGAs vary a lot both in the core logic block structure and the number and layout of the fixed-function macroblocks that are available.
      • by alvieboy ( 61292 ) on Tuesday July 28, 2015 @08:26AM (#50196103) Homepage

        A few notes regarding your comment.

        This is not actually about an "open toolchain to program an FPGA". It's not actually about programming at all. Let me try to explain here (in a simple way) what IceStorm is, or better, what an open-source can do for the FPGA design flow.

        So, you start with a description of your design. Your design usually describes the behavour of your system, which is often done in HDL (Hardware Description Languages), like VHDL and Verilog, or even higher-level ones (SystemC, even Python). But, as with every digital design (imagine classical design with TTL 74/CMOS 40 series), you often need more than "logic" - you may need a PLL, you may need a dedicated multiplier (hey, you don't want to design this by hand with gates and flip flops, do you?), or other complex, often mixed-signal primitives.
        FPGAs are basically a set of basic blocks (think again 74/40 series), which can be interconnected almost at will. The blocks actually differ from classic chips: what you'll find in FPGAs [I'll speak about Xilinx but Lattice should be similar] are LUT (Look-Up Tables), which can provide any N-input/Y-output digital function (often 4 to 6 inputs, and one output), and Flip Flops (with enable, set, reset, so on). In addition, FPGA provide "hard IP cores", like PLLs, Multipliers, Serializers, Multiplexers, so on, so on.
        Now, to have your design to work on the FPGA, you need to synthesize it - convert the behavioural model into these building blocks (LUTs, so on). This is the first phase - and it depends on the target FPGA because the available IP hard blocks differ from manufacturer to manufacturer, from family to family, and even from small to larger, same family devices. This synthesis process will get you a "netlist" - a list of all used primitives and the interconnections needed between them.
        Next step is to place the design - pick up each of those primitives, and choose an instance on the FPGA where it will be assigned. This can be tricky, because routing inside FPGA is not 1-to-all, and timing is more affected by routing than anything else - so you'll want your critical (timing critical) paths to be placed where you can later route signals faster. This is really FPGA dependant, much more than synthesis.
        Then you have routing: after placing all primitives, you need to decide how to route all signals (this is very complex, FPGA dependant). After routing is done, you have the whole design for that FPGA done - everyting is placed, routed.
        Well, you have not.
        The next step is to generate a bitstream, based on the netlist output from Route, that can be sent to the FPGA (usually via JTAG). This is actually where less information is known - where each bit from the bitstream maps inside the FPGA switch fabric or LUT configuration or SRAM cells, others, ...
        Then comes programming: sending the bitstream to FPGA. This is usually simple, and many open tools exist (at least for Xilinx).

        Now, do these tools do?

        Yosys: Verilog synthesis
        Arachne-pr: Place & Route
        IceStorm: Last part, which is the hardest - to map the final, routed netlist into the "proprietary" bitstream.

        Hope I shed some light on the matter.
        And yes, being J1 or any another CPU (like my own ZPUino or XThunderCore) is irrelevant - what's relevant is to prove that IceStorm seems to generate correct bitstreams for this platform.

        Alvie

        • by Kishin ( 2859885 )
          Good work. Be sure to check out my comment [slashdot.org] below referencing a few things you might be interested in. You clearly know enough about this subject to assess their value. Any information is appreciated. Trying to get numerous opinions from HDL, synthesis, and bitstream mod crowds.
          • by alvieboy ( 61292 )

            Thanks, I will read those links in detail.

            I came across Cx quite some months ago, but I recall dismissing it because I found it not production ready.

            On a side note, I do happen to work closely with systems requiring DO-254 certification [wikipedia.org], mostly FPGA and ASIC. Not sure most HLD will easily fit in, but I'm always open to explore and suggest if feasible.

            EASA SWCEH-001 memo [europa.eu] is probably more detailed on requirements than DO-254. You should read it if you're interested in this area.

            Alvie

            • Very interesting that you do DO-254. My background was high assurance and I studied a lot of DO-178B stuff in the process. I didn't work in that market but it generated many high-quality components applicable to other areas. What they pulled off in terms of features amenable to assurance/certification also gave me a guess at what the next project with similar complexity would pull off. Also how I discovered SPARK and Astree. :)

              My recent focus is on clean-slate, secure hardware with two aspects being ensurin

    • by Anonymous Coward

      You still need those buggy proprietary tools in order to use them. I think you kind of missed the point here; it's not that there's anything special about that CPU, it's about the progress of the open source toolchain.

    • Show me one that doesn't require a special FAB to produce the actual chip, at which point you can't control whats actually going on in the chip itself.

      There are NO open source CPUs, only open source designs.

      It stops being open source when it needs to run on a proprietary FPGA.

  • Forth? (Score:2, Funny)

    by Anonymous Coward

    ? Program Forth in who want

    • GreenArrays hardware? ;-)
    • by KGIII ( 973947 )

      This is why it sometimes sucks to not be an expert in everything. *sighs* I have no idea if you do not speak English and used Google Translate or if that is a joke based on the programming language.

      Given the +1 status I am inclined to think it is either a joke or there is someone else who felt left out of a potential joke and decided they'd mod you up just in case it was funny.

      It is not quite Poe's Law (or coleslaw) but it is damned close. At this point I guess the only rational choice is to laugh and prete

      • It is presumably an attempt at a joke based on the fact that Forth makes use of RPN.
        https://en.wikipedia.org/wiki/... [wikipedia.org]

        I for one find Forth to be a fascinating language. The fact that it has been around for a while does not diminish it in any way.

        I first heard of it back in the 80's while learning assembler on the 6502. I noticed it again while getting to know FreeBSD (loader stage 3) and decided to finally learn it when I came across some old manuals and software for my newly acquired PET CBM 8032
  • What is to stop Lattice from simply shutting down this project for an open FPGA toolchain for their FPGAs?

    Or does Lattice not care about this particular project for some reason?

    • by tempmpi ( 233132 )

      What is to stop Lattice from simply shutting down this project for an open FPGA toolchain for their FPGAs?

      Why and how would they shutdown this project? This project is the FPGA equivalent of writing a open source assembler or compiler for new CPU. They do not publish their bitstream format, but reverse engineering is perfectly legal.

      • In my understanding, one main reason for this secrecy with FPGAs is a kind of DRM. A lot of gadgets out there use FPGAs, and they contain some proprietary design in the form of the bitstream. If this format were open, anyone could copy and modify the design, much more easily than copying actual hardware design of a chip. Thus the secrecy is in the interest of major FPGA users, not the manufacturers themselves.

        IIRC, some FPGAs even provide a kind of encryption for bitstreams, but then there's your usual D

    • What is to stop Lattice from simply shutting down this project for an open FPGA toolchain for their FPGAs?

      Reverse-engineering for the purposes of interoperability is a protected activity under the DMCA (and basically all other purposes are prohibited.)

  • This is cool stuff. Here's some other stuff I found recently for anyone interested in messing with bitstreams, creating an open-source FPGA, or doing hardware more easily. Hardware designers feedback is appreciated.

    Open Source Bitstream Generation without R.E. or license violations: http://www.isi.edu/~nsteiner/p... [isi.edu]

    Archipelago - an open-source FPGA with toolflow support: http://www.eecs.berkeley.edu/P... [berkeley.edu]

    Cx, open-source, hardware & synthesis language: http://cx-lang.org/ [cx-lang.org]

    QFlow Open-source Flow from beh

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...