{
    "@context": "https://schema.org",
    "@type": "NewsArticle",
    "@id": "https://badiyaa.com/elixir-hls-fpga-circuits-fm-radio/#article",
    "mainEntityOfPage": "https://badiyaa.com/elixir-hls-fpga-circuits-fm-radio/",
    "headline": "Elixir HLS turns Elixir code into circuits for reprogrammable chips, starting with a working radio",
    "description": "Elixir HLS 0.1.0 compiles functions written in the Elixir language into FPGA circuits, tested against the software, and runs a full FM radio demodulator.",
    "datePublished": "2026-11-24T02:00:00+00:00",
    "dateModified": "2026-11-23T15:43:50+00:00",
    "author": {
        "@type": "Organization",
        "name": "Badiyaa Editorial Desk",
        "url": "https://badiyaa.com/author/editorial-desk/"
    },
    "publisher": {
        "@type": "NewsMediaOrganization",
        "@id": "https://badiyaa.com/#organization",
        "name": "Badiyaa",
        "url": "https://badiyaa.com/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://badiyaa.com/wp-content/uploads/2026/10/badiyaa-logo-color-600x60-1.png",
            "width": 600,
            "height": 60
        },
        "email": "badiyaavideo@gmail.com",
        "publishingPrinciples": "https://badiyaa.com/editorial-policy/",
        "correctionsPolicy": "https://badiyaa.com/corrections/",
        "actionableFeedbackPolicy": "https://badiyaa.com/contact/",
        "ownershipFundingInfo": "https://badiyaa.com/about/#ownership",
        "sameAs": [
            "https://www.facebook.com/profile.php?id=61595518283625",
            "https://www.instagram.com/badiyaa.com.ai/",
            "https://www.threads.net/@badiyaa.com.ai"
        ],
        "parentOrganization": {
            "@type": "Organization",
            "name": "Rezilient Digital",
            "url": "https://www.rezilientdigital.com/",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": "Fl No 3, Nav Shyam Sadan, Plot No 38, Pestom Sagar, Chembur",
                "addressLocality": "Mumbai",
                "addressRegion": "Maharashtra",
                "postalCode": "400089",
                "addressCountry": "IN"
            },
            "sameAs": [
                "https://www.linkedin.com/company/rezilientdigital"
            ]
        }
    },
    "isAccessibleForFree": true,
    "inLanguage": "en-US",
    "wordCount": 620,
    "image": [
        "https://badiyaa.com/wp-content/uploads/2026/11/redpitaya-stemlab-fpga-v1-1-topview.jpg"
    ],
    "articleSection": "Tech",
    "keywords": "Elixir HLS, Elixir, FPGA, High-level synthesis",
    "articleBody": "A new open-source project lets programmers write one function in Elixir and get two things back: ordinary code that runs on a processor, and a hardware circuit that runs on a reprogrammable chip. Elixir HLS, released as version 0.1.0, turns functions written in the Elixir language into circuits for FPGAs, and its first real demo is a working FM radio whose entire demodulator runs in hardware. The trick, as the Elixir HLS repository on GitHub explains, is that every circuit is tested against the software version of the same function, and it is only used if the two give identical answers. The Elixir code, in other words, doubles as the circuit's specification. Why chip design usually looks nothing like this An FPGA, or field-programmable gate array, is a chip whose logic can be rewired after it leaves the factory. Wikipedia's FPGA entry traces the first commercially viable one to Xilinx's XC2064 in 1985, a part with just 64 configurable logic blocks. Designs for these chips are normally written in hardware description languages such as Verilog or VHDL. That work happens at what engineers call register-transfer level, deciding which value lands in which storage register on which tick of the clock. High-level synthesis, or HLS, hands that job to a tool. The idea is decades old: Wikipedia's history of high-level synthesis dates the first commercial behavioral synthesis tool to Synopsys in 1994, and notes that today most such tools accept subsets of C, C++, SystemC or MATLAB. Elixir, a language best known for web servers and highly concurrent systems, is an unusual entry on that list. How it works in practice A programmer marks a function with defhls and gives every value a fixed bit width, such as u32 for an unsigned 32-bit number. Narrower widths make smaller, faster circuits, and the CPU version trims its numbers to the same widths so both sides agree. Running the project's compile command turns each marked function into a SystemVerilog circuit and simulates it; the build stops at the first circuit that does not match. The README's sample function compares the low and high halves of a 32-bit input. Fed the number 123, it returns 369 on the CPU, because the low half, 123, beats a high half of zero and gets tripled. The same function placed in the FPGA returns identical results. Version 0.1.0 handles integer math, state, lookup tables, memories and fixed-length loops, plus streams of data that can flow from buttons, sensors, audio or USB straight through circuits without touching the CPU. One example counts button presses and shows the count's lowest bit on an LED. Its first target board is the Sipeed Tang Primer 25K, running the AtomVM virtual machine. What it cannot do yet The project's own list of gaps is long for an early release: no division, no floating-point numbers, no recursion, no anonymous functions and no strings or maps. To build circuits, users need Elixir 1.18 or later, version 1.160.0 of CIRCT, a circuit compiler framework from the LLVM project, plus Python 3 and the Icarus Verilog simulator. The code is published under the Apache-2.0 license, with the README also available in Japanese. Badiyaa has followed other attempts to rethink hardware design, including Architect Labs' claim that AI agents designed its Frostbite CPU, and hobby builds like Jeff Geerling's Raspberry Pi time server. The repository had 39 stars and a single commit when Badiyaa checked it on Monday, so for now the FM radio is the project's main proof that a function can make the jump from software to silicon. Sourceselixir-hls: high-level synthesis from Elixir, elixir-hls project, GitHub, 2026High-level synthesis, Wikipedia, 2026Field-programmable gate array, Wikipedia, 2026 Image: Geek3, CC BY-SA 4.0 via Wikimedia Commons This article was produced with AI assistance and reviewed by our Editorial Desk. How we work.",
    "markdown": "https://badiyaa.com/elixir-hls-fpga-circuits-fm-radio.md"
}