Pure Silicon Demo Coding: No CPU, No Memory, Just 4k Gates

(a1k0n.net)

381 points | by a1k0n 22 hours ago

15 comments

  • yoan9224 1 hour ago
    This is absolutely wild. Rendering graphics with just combinational logic and no frame buffer is the kind of constraint that breeds creativity.

    The HAKMEM sine/cosine generator is such an elegant choice - it's numerically stable in fixed-point and requires only adds and bit-shifts. Perfect for hardware. I used a similar approach once for generating test patterns in an FPGA.

    The fact that you can iterate on this in simulation, then deploy to actual silicon via Tiny Tapeout for $150 is honestly mind-blowing. We're living in the future.

  • xphos 21 hours ago
    As a computer science guy who interlops in computer engineering i really want to find time to build something cool like this and tapeout. The retro architectures for rendering are simple but fun! I love the project
    • Neywiny 20 hours ago
      I recommend getting started like the author did: simulation first, then FPGA. Honestly FPGA will take you very far. I always get a kick out of being able to design my own SoC. "Hmmm I need 9 separate I2C ports... Ok, copy block, paste paste paste..." Or if you have an operation in software that's taking forever you can write an accelerator for it
      • checker659 1 hour ago
        Do you know if there are any tutorials that use bounded model checking tools from the very get go? For verilog or VHDL.
      • 8f2ab37a-ed6c 18 hours ago
        What are the best modern tools to get started with in simulation for those who have never dabbled before?
        • Neywiny 12 hours ago
          I do the vast majority of my work on xilinx and it's easiest to just use the built in simulator. It's free and supports vhdl and verilog. Most support just one. For lattice and microchip work I use what the tool provides which is usually a cut down modelsim or something
        • sehugg 5 hours ago
          Try https://8bitworkshop.com/verilog to get started with dabbling
        • sweetjuly 15 hours ago
          The other commentator mentioned Verilator (which is indispensable in larger designs) but you may also want to grab Icarus Verilog too. It's a FOSS simulator and, unlike Verilator, is 2-bit and so it handles X ("don't care") and Z ("high impedance") signals. It's ridiculously slow compared to Verilator but the greater fidelity can be valuable depending on what you're trying to do.
        • y1n0 10 hours ago
        • vanjoe 17 hours ago
          Verilator is very good. It's faster than anything else, and it is free. The downsides are it won't stimulate encrypted IP blocks. And it doesn't do mixed language sim, so vhdl is no bueno.
      • alfiedotwtf 3 hours ago
        Are there any open or at least standard FPGAs that the open source community flock to? Last time I looked into FPGAs, it was mostly closed architecture and proprietary tools
        • Neywiny 3 hours ago
          Not for anything mid to higher range, but I believe there's open source tooling for some of the older Lattice and Xilinx parts. I would say for me it's not as big a deal as on the software side, because each vendor's hardware tends to be pretty different from each other anyway.
    • oofbey 21 hours ago
      It’s amazing and wonderful to see the Internet support these tiny cliques of interest. Having everybody connected leads to homogenization of culture in some ways, but it also supports these couple dozen (?) people around the world finding each other for this amazing little competition.
      • anonymous908213 19 hours ago

           Having everybody connected leads to homogenization of culture in some ways
        
        The internet may hypothetically homogenize culture relative to a society that does not have any kind of mass communication at all, but relative to the world it was actually introduced into, the internet has completely balkanised the culture. Prior to the internet, we had television, cinema, literature, radio, and newspapers, which were all centralised and controlled enough that they created a shared monoculture in nations. A signifant portion of a country's population would watch, read, and listen to the same media. The internet bucked that trend, allowing all kinds of new subcultures to pop up and to more easily cross national boundaries.
        • adrianN 8 hours ago
          Then algorithms optimized content for addictiveness and we’re in a world where a large part of the world looks at the same set of „influencers“.
        • therein 18 hours ago
          Yeah, back in the day you would go to school the next day after a show that everyone watches released its new episode, it aired on the prime-time slot on the primary TV channel, and you'd discuss what happened in that episode, or have some references or new jokes. Created a common culture.
          • amarant 17 hours ago
            I remember those days. As the only kid in school who didn't watch Lost, those days sucked
  • RossBencina 17 hours ago
    I was curious about the long-term stability of the cited HAKMEM sin/cos generator. I found an overview here: https://news.ycombinator.com/item?id=3111501 (EDIT: I'm still not sure about stability, apparently it is stable in exact arithmetic under certain conditions.) Coincidentally it is related to the Verlet integration video I posted last week: https://news.ycombinator.com/item?id=46253592
    • a1k0n 16 hours ago
      Yeah, it is exact in this specific circumstance. But yes, it's exactly the same trick; I also enjoyed that video in my Youtube recommender feed last week!
  • intalentive 11 hours ago
    I like how the grid pulses with the kick drum. Nice touch.
  • xecaz 5 hours ago
    Wow, nice work!! Coming from demo/intro coding where you have memory and a driver for audio(x86), this is very impressing.
  • glimshe 21 hours ago
    Reminds me of college: "Hardware and Software are logically equivalent"
  • Archit3ch 18 hours ago
    I'm tempted to put together an FPAA with Tiny Tapeout, but it likely won't fit in the allocated area.
    • Joel_Mckay 2 hours ago
      Check the switching speed specification, and shared i/o bank configuration.

      The project has a narrow scope of use-cases. =3

      • Archit3ch 1 hour ago
        Switching speed: should be good enough for audio in the kHz range, even for off-chip control.

        Analog i/o pins: definitely limited, even if you purchase the highest option available (6).

    • Taniwha 15 hours ago
      TT allows you to pay more and build multi-block designs
  • datameta 9 hours ago
    Very impressive stuff. I used to frequent the JS demoscene, mostly dwitter - but this is on a whole other level.

    Oh shit, this prompted me to check and turns out TinyTapeout is back to life! https://tinytapeout.com/

  • openinfrared 21 hours ago
    Really cool!
  • idiotsecant 19 hours ago
    No x, no y, just Z is a pattern so often used by chatGPT it has started to bleed into common usage by people who maybe aren't even using an LLM.
    • layer8 17 hours ago
      Or maybe ChatGPT picked it up from common usage.
      • idiotsecant 17 hours ago
        It was used occasionally before chatGPT but it has exploded since then.
    • peddling-brink 18 hours ago
      Language is fluid. This is ok.

      There are many bad things about LLMs, but a benign shift in popular language usage isn't one of them.

      • mschuster91 17 hours ago
        > There are many bad things about LLMs, but a benign shift in popular language usage isn't one of them.

        Organic shifts in language are fine. What is not fine is Big Money (which most forms of AI are) manipulating society at large - and that's not just the AI companies' doing. Think of Tiktok leading people to say "unalive" instead of the various clear words before (e.g. kill, murder, executed, run over by car, mauled to death by animal).

      • idiotsecant 17 hours ago
        I disagree. It's a sign of what is essentially cultural contamination by an LLM. There is something vaguely gross about it, like when people start repeating advertising slogans. It's a sign that someone spent enough money that they directly rewired our brains.
        • peddling-brink 15 hours ago
          Do you get grossed out when you step on a linoleum floor? Or you ride an escalator? Or drink out of a thermos?

          Culture contaminates.

        • Marazan 17 hours ago
          > like when people start repeating advertising slogans

          but without the craft of a good advertising slogan. So worse!

    • fsckboy 17 hours ago
      when i was running for 5th grade class president a number of decades ago, my campaign sign slogan was a "no x, no y, just z" snowclone.
  • BoredPositron 19 hours ago
    Reminds me of the time we repaired old pinball machines in trade school. Good times.
  • startupsfail 20 hours ago
    Wow, I'm looking at current "Open Shuttles", a license to use 4KB of SRAM in the project is $2500. But it comes with Wishbone Bus interface!

    > 1024x32 Commercial SRAM > CF_SRAM_1024x32 > Commercial SRAM: 1024 words x > 32 bits (4KB) with Wishbone Bus interface > Area: 0.17mm² > GPIOs: 0 > License: Commercial - $2500 per project

  • Uptrenda 18 hours ago
    [flagged]
  • Dwedit 21 hours ago
    If you have registers, it's not "no memory".
    • hackernudes 21 hours ago
      If you have flip flops, it's not "no memory".

      If you have a ROM, it's not "no memory".

      Needlessly pedantic!

      I thought this was pretty cool but the first video didn't play. All this write up and I really just want to see the damn demo in action first! (Edit: reloaded the page and it worked. I still would like to see it on rela hardware!)

      • a1k0n 21 hours ago
        Ah that's what I get for self hosting. What browser?

        https://youtu.be/7xPS-0nydms

      • jayd16 20 hours ago
        I don't know. Analog signal processing is clearly less memory than a register, no? So a line exists somewhere and I think it's way before no RAM.
        • RossBencina 17 hours ago
          > Analog signal processing is clearly less memory than a register, no?

          You are going to have a hard time doing analog signal processing with memoryless elements. In the linear domain all you can do is apply gain and mix signals together. If you work with memoryless nonlinearities you can do waveshaping, which is generally only useful when applied to special signals (e.g. sine waves).

          Any time you want to do frequency-dependent behavior (filtering, oscillation) you need energy storing elements, usually capacitors, sometimes inductors. A capacitor is just like a register: it stores charge, similarly, inductors store energy in the magnetic field. Needless to say these devices are not memoryless. In fact, since the quantity that they remember is a continuous variable, they store a lot of information.

        • ErroneousBosh 19 hours ago
          > Analog signal processing is clearly less memory than a register, no?

          Bucket-brigade delay lines?

          • jayd16 19 hours ago
            I'm not saying every analog signal processor is surely memory free, simply that you can imagine one that is.

            But I'm not really familiar with what that is.

            • ErroneousBosh 19 hours ago
              They're a kind of analogue dynamic memory. I'd hesitate to call them RAM because the Access is not Random, but they are a kind of shift register and early computers used those for RAM.

              Imagine a pair of MOSFETs connected to a pair of capacitors, and a bunch of those joined together in a chain. All the gates of each one of the pair of MOSFETS are connected together, giving you a "left" and "right" clock input.

              When you put a signal in if you pulse the "left" and "right" inputs, it'll store the signal voltage in one capacitor, then pass it off to the next capacitor in turn, like old-timey firefighter handing buckets of water down a line of people.

              They used to use this for delaying audio signals before digital memory and analogue to digital conversion was cheap enough to use.

              • fsckboy 16 hours ago
                bucket brigades were also used to read large scale sensors like a CCD camera. they are more efficient in their use of die space because you need fewer data paths; they don't need to be digital either, each bucket can be analog for "grey" scale
      • fsckboy 16 hours ago
        >Needlessly pedantic!

        if you have pedantry, it's also not "no memory"

    • jonathrg 18 hours ago
      And I better not see any capacitors on there remembering any charge!
    • layer8 17 hours ago
  • fsckboy 17 hours ago
    >Pure Silicon Demo Coding: No CPU, No Memory, Just 4k Gates

    ok, but silicon is doped so it's slightly impure, and CPUs are also silicon and memory is also silicon.

    you actually meant "4K gates, no clock, no synchronization, no timing" and maybe a little "not exactly sure when the output is rea... is rea... is ready"

    • chrisjj 1 hour ago
      There is sync and there is timing. Else there'd be no meaningful image.