{"id":21,"date":"2026-03-27T00:11:34","date_gmt":"2026-03-27T00:11:34","guid":{"rendered":"https:\/\/llama.gs\/blog\/?p=21"},"modified":"2026-03-27T00:11:34","modified_gmt":"2026-03-27T00:11:34","slug":"the-synthesis-problem-why-im-building-a-new-logic-toolchain","status":"publish","type":"post","link":"https:\/\/llama.gs\/blog\/index.php\/2026\/03\/27\/the-synthesis-problem-why-im-building-a-new-logic-toolchain\/","title":{"rendered":"The Synthesis Problem: Why I&#8217;m Building a New Logic Toolchain"},"content":{"rendered":"\n<p>Modern chip design leaves performance on the table. A lot of it. Meanwhile, billionaire CEOs with the technical depth of a drunk high-schooler who wants to be new age when he grows up keep calling a glorified autocomplete &#8220;AGI.&#8221; Nobody&#8217;s asking if the circuit itself is well-designed \u2014 just whether the output sounds smart.<\/p>\n\n\n\n<p>The tools we use to go from a logical specification to a physical circuit are decades old in their core ideas. They work \u2014 billions of transistors ship every year \u2014 but they settle for &#8220;good enough&#8221; at almost every stage of the pipeline. Synthesis heuristics that don&#8217;t explore the real optimization space. Representation formats that can&#8217;t talk to each other. A wall between the people who study formal logic and the people who tape out silicon.<\/p>\n\n\n\n<p>I want to build better circuits. Not a better CPU, not a better GPU \u2014 better circuits, generally. Classical, reversible, quantum. The kind of improvement that comes from rethinking the synthesis process itself, not from adding more transistors.<\/p>\n\n\n\n<p>That&#8217;s what this project is about.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What I Actually Built<\/h2>\n\n\n\n<p>Over the past several years, I&#8217;ve been assembling an open source toolchain that connects formal logic to real hardware. Each piece exists because I hit a wall with existing tools.<\/p>\n\n\n\n<p><strong>llogic<\/strong> is the foundation \u2014 a library of logic representations. Boolean formulas, CNF, DNF, OBDDs, QBF, combinational circuits, reversible circuits, quantum circuits. They all live under one roof because they share more structure than the textbooks let on. A circuit is a formula is a constraint problem. If your tools understand that, you can move between representations and optimize across them.<\/p>\n\n\n\n<p><strong>lcfgen<\/strong> generates circuit families \u2014 parameterized circuit structures that let you explore design spaces systematically instead of hand-wiring one instance at a time.<\/p>\n\n\n\n<p><strong>llogic2verilog<\/strong> translates circuits from llogic&#8217;s internal representation into synthesizable Verilog. This is the bridge from formal logic to hardware toolchains.<\/p>\n\n\n\n<p><strong>lverilog<\/strong> is a Verilog parser that produces a clean AST, because I needed one that I could actually inspect and transform programmatically without fighting a legacy codebase.<\/p>\n\n\n\n<p><strong>llogic_basys3<\/strong> is the proof that this isn&#8217;t academic exercise. It targets the Digilent Basys3 board \u2014 a Xilinx Artix-7 FPGA \u2014 and runs brute-force integer factorization by testing 16\u00d716 bit multiplication at 50 MHz. A MicroBlaze soft processor drives the circuit over AXI, exposed as a UART interface. You feed it a number, it searches for factors \u2014 on a $150 hobby board, clocking through candidates at 50 million per second.<\/p>\n\n\n\n<p>Theory in. Hardware out. No marketing budget required, no claims of sentience.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Matters<\/h2>\n\n\n\n<p>The connection between Boolean satisfiability, quantified Boolean formulas, and circuit structure is well-studied in theory. My published work on QBF-based circuit synthesis showed that you can use the structure of quantified formulas to derive circuits with provable properties. But the research community largely stops at the paper. The tooling to go from that theory to running hardware didn&#8217;t exist.<\/p>\n\n\n\n<p>It does now.<\/p>\n\n\n\n<p>And the scope is broader than classical digital logic. The same formal framework that represents a combinational circuit can represent a reversible circuit or a quantum circuit. The same optimization that simplifies a Boolean formula can simplify a quantum algorithm&#8217;s gate structure. There&#8217;s a deep connection to Bayesian inference here too \u2014 probabilistic reasoning over circuit structure \u2014 that I&#8217;ll write about separately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where This Goes<\/h2>\n\n\n\n<p>I&#8217;m not building a toolchain for the sake of building a toolchain. I care about two things: scalability and energy efficiency. Better synthesis means smaller circuits. Smaller circuits mean less power, less area, more throughput. At scale, this is the difference between a computation that&#8217;s feasible and one that isn&#8217;t.<\/p>\n\n\n\n<p>The implications reach beyond hardware design. Optimized circuit structures have direct applications in machine learning acceleration \u2014 which is to say, making the very large circuits that people mistake for intelligence actually run efficiently. The same goes for cryptanalysis and scientific computing \u2014 anywhere you&#8217;re bottlenecked by the gap between what you want to compute and what the hardware can deliver. I&#8217;ll write about those connections in future posts.<\/p>\n\n\n\n<p>The FPGA demo is the first milestone \u2014 a hobby board factoring integers to prove the pipeline works end-to-end. The next steps involve pushing the optimization boundaries, extending to quantum targets, and making the case \u2014 with working hardware \u2014 that this approach produces better circuits.<\/p>\n\n\n\n<p>If you&#8217;re a researcher working on synthesis, a hardware engineer frustrated with your tools, or a program manager looking for the next leap in design methodology: let&#8217;s talk.<\/p>\n\n\n\n<p>The code is open source. The results are reproducible. The ambition is to build circuits more powerful than anything that exists today.<\/p>\n\n\n\n<p><strong>Repositories:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/gitlab.llama.gs\/logic\/llogic\">llogic<\/a> \u2014 Logic representations<\/li>\n<li><a href=\"https:\/\/gitlab.llama.gs\/logic\/lcfgen\">lcfgen<\/a> \u2014 Circuit family generator<\/li>\n<li><a href=\"https:\/\/gitlab.llama.gs\/logic\/llogic2verilog\">llogic2verilog<\/a> \u2014 Circuit to Verilog<\/li>\n<li><a href=\"https:\/\/gitlab.llama.gs\/logic\/lverilog\">lverilog<\/a> \u2014 Verilog parser<\/li>\n<li><a href=\"https:\/\/gitlab.llama.gs\/logic\/llogic_basys3\">llogic_basys3<\/a> \u2014 FPGA demo<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Modern chip design leaves performance on the table. A lot of it. Meanwhile, billionaire CEOs with the technical depth of a drunk high-schooler who wants to be new age when he grows up keep calling a glorified autocomplete &#8220;AGI.&#8221; Nobody&#8217;s asking if the circuit itself is well-designed \u2014 just whether the output sounds smart. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18],"tags":[12,14,9,16,8,10,11,15,13],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-projects","category-research","tag-circuit-design","tag-formal-methods","tag-fpga","tag-hardware","tag-logic-synthesis","tag-open-source","tag-qbf","tag-quantum-circuits","tag-verilog"],"_links":{"self":[{"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":1,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/llama.gs\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}