{"id":50851957,"url":"https://github.com/quantrpeter/gallang","last_synced_at":"2026-06-14T14:04:15.869Z","repository":{"id":358643849,"uuid":"1241465916","full_name":"quantrpeter/gallang","owner":"quantrpeter","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T11:18:23.000Z","size":2099,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T14:04:14.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantrpeter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T12:30:23.000Z","updated_at":"2026-05-23T11:18:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quantrpeter/gallang","commit_stats":null,"previous_names":["quantrpeter/gallang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quantrpeter/gallang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantrpeter%2Fgallang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantrpeter%2Fgallang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantrpeter%2Fgallang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantrpeter%2Fgallang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantrpeter","download_url":"https://codeload.github.com/quantrpeter/gallang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantrpeter%2Fgallang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34324004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-14T14:04:15.160Z","updated_at":"2026-06-14T14:04:15.863Z","avatar_url":"https://github.com/quantrpeter.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GALLANG\n\n![GALLANG banner](image/2026-05-17T12_25_40.png)\n\n\u003e **Logic in design, Power in code.**  \n\u003e A domain-specific language for programming GAL22V10 / ATF22V10C programmable logic devices — created by the **Hong Kong Programming Society (HKPS)**.\n\nGALLANG compiles `.gal` source files directly to JEDEC `.jed` files ready to burn with `minipro`. No intermediate tools (galasm, WinCUPL, etc.) are required.\n\n---\n\n## Table of Contents\n\n- [GALLANG](#gallang)\n  - [Table of Contents](#table-of-contents)\n  - [Target Device](#target-device)\n  - [Requirements](#requirements)\n  - [Build](#build)\n  - [Usage](#usage)\n  - [Language Reference](#language-reference)\n    - [File Structure](#file-structure)\n    - [Pins Section](#pins-section)\n    - [Logic Section](#logic-section)\n    - [Operators](#operators)\n    - [Intermediate Signals](#intermediate-signals)\n    - [Registered Outputs](#registered-outputs)\n  - [Examples](#examples)\n    - [AND / OR Combinatorial Logic](#and--or-combinatorial-logic)\n    - [D Flip-Flop (Registered Output)](#d-flip-flop-registered-output)\n    - [Mixed: Intermediate + Combinatorial](#mixed-intermediate--combinatorial)\n  - [Product Term Limits](#product-term-limits)\n  - [GAL22V10 Pin Map](#gal22v10-pin-map)\n  - [Programming the Device](#programming-the-device)\n  - [Project Architecture](#project-architecture)\n    - [Compilation Pipeline](#compilation-pipeline)\n    - [JEDEC Fuse Map (GAL22V10)](#jedec-fuse-map-gal22v10)\n      - [AND Array (fuses 0 – 5807)](#and-array-fuses-0--5807)\n      - [Configuration Bits (fuses 5808 – 5827)](#configuration-bits-fuses-5808--5827)\n      - [UES (fuses 5828 – 5891)](#ues-fuses-5828--5891)\n      - [Worked Example — Simple AND Gate](#worked-example--simple-and-gate)\n\n---\n\n## Target Device\n\n| Device | Package | I/O | Fuses | Notes |\n|--------|---------|-----|-------|-------|\n| GAL22V10 | DIP-24 | 10 configurable OLMCs | 5892 | Lattice original |\n| ATF22V10C | DIP-24 | 10 configurable OLMCs | 5892 | Atmel/Microchip clone, 100% pin-compatible |\n\nBoth devices are 5 V EEPROM-based programmable logic, erased and reprogrammed in-circuit with a device programmer such as `minipro` + TL866.\n\n---\n\n## Requirements\n\n| Tool | Version | Purpose |\n|------|---------|---------|\n| Java JDK | 11 or later | Compile \u0026 run gallang |\n| Apache Maven | 3.6+ | Build the fat jar |\n| minipro | any | Burn `.jed` to the device |\n\n---\n\n## Build\n\n```bash\ngit clone \u003crepo\u003e\ncd gallang\nmvn package\n```\n\nThis produces `target/gallang.jar` — a self-contained fat jar with all dependencies bundled.\n\n---\n\n## Usage\n\n```bash\njava -jar target/gallang.jar \u003cinput.gal\u003e [output.jed]\n```\n\n| Argument | Description |\n|----------|-------------|\n| `input.gal` | Source file written in the gallang language |\n| `output.jed` | Optional. Defaults to `\u003cinput\u003e.jed` next to the source file |\n\n**Example:**\n\n```bash\njava -jar target/gallang.jar example/example.gal\n# → writes example/example.jed\n```\n\n**Burn to device:**\n\n```bash\nminipro -p ATF22V10C -w example/example.jed\n```\n\n---\n\n## Language Reference\n\n### File Structure\n\nA `.gal` file has exactly two sections, in order:\n\n```\npins\n  \u003cpin assignments\u003e\n\nlogic\n  \u003cboolean equations\u003e\n```\n\nComments use `//` and run to end-of-line.\n\n---\n\n### Pins Section\n\nMaps physical pin numbers to signal names.\n\n```\npins\n1=clk\n2=A  3=B  4=C     // multiple assignments per line are fine\n23=out  22=carry\n```\n\n**Fixed pins** (cannot be reassigned):\n\n| Pin | Function |\n|-----|----------|\n| 1   | CLK — dedicated clock input for registered outputs |\n| 12  | GND |\n| 24  | VCC |\n\n**Input-only pins:** 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13  \n**Output (OLMC) pins:** 14, 15, 16, 17, 18, 19, 20, 21, 22, 23\n\n---\n\n### Logic Section\n\nDefines the Boolean function for each output pin.\n\n```\nlogic\nout = A * B + C    // combinatorial: out = (A AND B) OR C\n```\n\nEach output signal must appear in the `pins` section and be mapped to an output pin (14–23). All other signals in equations are either inputs from the `pins` section, or **intermediate** signals that are automatically inlined.\n\n---\n\n### Operators\n\n| Operator | Symbol | Precedence | Description |\n|----------|--------|------------|-------------|\n| OR | `+` | lowest | Logical OR |\n| AND | `*` | middle | Logical AND |\n| NOT | `/` | highest | Logical NOT (prefix) |\n| Grouping | `( )` | — | Override precedence |\n\n**Operator examples:**\n\n```\n// AND has higher precedence than OR:\nout = A + B * C         // A OR (B AND C)\n\n// Use parentheses to override:\nout = (A + B) * C       // (A OR B) AND C\n\n// NOT is prefix, applied to the next atom or group:\nout = /A * B            // (NOT A) AND B\nout = /(A + B)          // NOT (A OR B)  → De Morgan: /A * /B\n```\n\n---\n\n### Intermediate Signals\n\nAny signal used in an equation but **not** listed in the `pins` section is treated as an intermediate (local) signal and is **automatically inlined** into the equations that use it.\n\n```\npins\n2=A  3=B  4=C\n23=out\n\nlogic\nsum = A * /B + /A * B   // intermediate: XOR\nout = sum * C           // inlined → (A*/B + /A*B) * C\n```\n\nChains of intermediates are resolved iteratively. Circular definitions are not permitted.\n\n---\n\n### Registered Outputs\n\nAdd `.r` (or `.R`) to the left-hand side to make an output **registered** (clocked D flip-flop, triggered on the rising edge of CLK / pin 1).\n\n```\nlogic\nQ.r = D          // Q is the flip-flop output; D is its next-state input\n```\n\nThe equation defines the **D input** of the flip-flop. The device's CLK pin (pin 1) must be connected to a clock signal.\n\nFeedback: registered outputs can be read back in other equations (using the signal's name directly):\n\n```\nQ.r = /Q          // toggle flip-flop: Q inverts on every clock edge\n```\n\n---\n\n## Examples\n\n### AND / OR Combinatorial Logic\n\n```gal\n// example/andtest.gal\npins\n2=A  3=B\n23=Y  22=Z\n\nlogic\nY = A * B    // AND gate\nZ = A + B    // OR gate\n```\n\n```bash\njava -jar target/gallang.jar example/andtest.gal\n```\n\n---\n\n### D Flip-Flop (Registered Output)\n\n```gal\n// example/dfftest.gal\npins\n1=clock\n2=D\n23=Q\n\nlogic\nQ.r = D      // rising-edge D flip-flop\n```\n\n```bash\njava -jar target/gallang.jar example/dfftest.gal\n```\n\n---\n\n### Mixed: Intermediate + Combinatorial\n\n```gal\n// example/example.gal\npins\n1=clock\n4=a  5=b  10=c\n23=out\n\nlogic\nz   = a + b*c    // intermediate: a OR (b AND c) — inlined automatically\nout = z          // combinatorial output\n```\n\n---\n\n## Product Term Limits\n\nEach output OLMC has a fixed number of AND-plane rows (product terms). The total per-output limit is:\n\n| Output Pin | Max Product Terms |\n|------------|-------------------|\n| 23         | 8                 |\n| 22         | 10                |\n| 21         | 12                |\n| 20         | 14                |\n| 19         | 16                |\n| 18         | 16                |\n| 17         | 14                |\n| 16         | 12                |\n| 15         | 10                |\n| 14         | 8                 |\n\nThe compiler will report an error if a Boolean expression expands to more product terms than the OLMC supports. Place functions with many OR terms on pins 18 or 19.\n\n---\n\n## GAL22V10 Pin Map\n\n```\n        ┌────── DIP-24 ──────┐\n  CLK   │  1              24 │  VCC\n   I1   │  2              23 │  O1 / I11 (OLMC)\n   I2   │  3              22 │  O2 / I10 (OLMC)\n   I3   │  4              21 │  O3 / I9  (OLMC)\n   I4   │  5              20 │  O4 / I8  (OLMC)\n   I5   │  6              19 │  O5 / I7  (OLMC)\n   I6   │  7              18 │  O6 / I6  (OLMC)\n   I7   │  8              17 │  O7 / I5  (OLMC)\n   I8   │  9              16 │  O8 / I4  (OLMC)\n   I9   │ 10              15 │  O9 / I3  (OLMC)\n  I10   │ 11              14 │  O10/ I2  (OLMC)\n  GND   │ 12              13 │  I11\n        └────────────────────┘\n```\n\n- **OLMC pins (14–23):** configurable as combinatorial output, registered output, or input (feedback)\n- **CLK (pin 1):** used automatically when `.r` equations are present\n- **Pin 13:** additional dedicated input\n\n---\n\n## Programming the Device\n\nWith a TL866II+ or compatible programmer and `minipro` installed:\n\n```bash\n# Erase (optional, EEPROM auto-erases on write)\nminipro -p ATF22V10C -E\n\n# Program\nminipro -p ATF22V10C -w output.jed\n\n# Verify\nminipro -p ATF22V10C -m output.jed\n```\n\n---\n\n## Project Architecture\n\n```\ngallang/\n├── pom.xml                                  Maven build (Java 11, ANTLR 4.13.1)\n├── example/                                 Sample .gal files and generated .jed\n└── src/main/\n    ├── antlr4/com/gallang/\n    │   └── GalLang.g4                       ANTLR4 grammar\n    └── java/com/gallang/\n        ├── Main.java                        Entry point\n        ├── ast/\n        │   ├── Program.java                 Top-level AST node\n        │   ├── Equation.java                Single Boolean equation\n        │   └── expr/\n        │       ├── Expr.java                Abstract expression\n        │       ├── VarExpr.java             Signal reference\n        │       ├── AndExpr.java             A * B\n        │       ├── OrExpr.java              A + B\n        │       └── NotExpr.java             /A\n        └── compiler/\n            ├── AstBuilder.java              ANTLR visitor → AST\n            ├── LogicCompiler.java           Inline intermediates, validate pins\n            ├── SopConverter.java            Expr tree → Sum-of-Products\n            ├── Literal.java                 Single literal in a product term\n            ├── JedecGenerator.java          SOP → JEDEC fuse map (direct, no galasm)\n            └── PldEmitter.java              (legacy) GALasm .pld text emitter\n```\n\n### Compilation Pipeline\n\n```\n.gal source\n    │\n    ▼ ANTLR4 lexer + parser (GalLang.g4)\nParse Tree\n    │\n    ▼ AstBuilder (visitor)\nAST  (Program → Equation → Expr tree)\n    │\n    ▼ LogicCompiler\n      • Inline intermediate signals\n      • Validate pin assignments\nCompiledProgram  (pin → SOP-ready Expr)\n    │\n    ▼ SopConverter\n      • De Morgan normalization\n      • Expand to List\u003cList\u003cLiteral\u003e\u003e\nSum-of-Products\n    │\n    ▼ JedecGenerator\n      • AND-array row encoding (132 rows × 44 cols)\n      • OLMC config bits (SYN, AC0, AC1, XOR)\n      • JEDEC checksums (fuse + file)\n.jed  ──► minipro ──► GAL22V10 / ATF22V10C\n```\n\n### JEDEC Fuse Map (GAL22V10)\n\nThe 5892-fuse array is structured as follows:\n\n| Region | Fuses | Description |\n|--------|-------|-------------|\n| AND array | 0 – 5807 | 132 rows × 44 columns product terms |\n| Config | 5808 – 5827 | SYN, AC0, AC1[9:0], XOR[8:1] |\n| UES | 5828 – 5891 | User Electronic Signature (64-bit label) |\n\n#### AND Array (fuses 0 – 5807)\n\n![AND array fuse map](image/and_array_fusemap.svg)\n\nThe AND plane is a 132 × 44 matrix.  \n**Fuse address formula:** `fuse = row × 44 + column`\n\n**Row assignments:**\n\n| Row(s) | Description | Pin |\n|--------|-------------|-----|\n| 0 | AR — global asynchronous-reset product term | — |\n| 1 | OE — global output-enable (all-ones → always enabled) | — |\n| 2 – 9 | OLMC9: 8 product terms | 23 |\n| 10 | OLMC9: SP (synchronous preset) row | 23 |\n| 11 – 20 | OLMC8: 10 product terms | 22 |\n| 21 | OLMC8: SP row | 22 |\n| 22 – 33 | OLMC7: 12 product terms | 21 |\n| 34 | OLMC7: SP row | 21 |\n| 35 – 48 | OLMC6: 14 product terms | 20 |\n| 49 | OLMC6: SP row | 20 |\n| 50 – 65 | OLMC5: 16 product terms | 19 |\n| 66 | OLMC5: SP row | 19 |\n| 67 – 82 | OLMC4: 16 product terms | 18 |\n| 83 | OLMC4: SP row | 18 |\n| 84 – 97 | OLMC3: 14 product terms | 17 |\n| 98 | OLMC3: SP row | 17 |\n| 99 – 110 | OLMC2: 12 product terms | 16 |\n| 111 | OLMC2: SP row | 16 |\n| 112 – 121 | OLMC1: 10 product terms | 15 |\n| 122 | OLMC1: SP row | 15 |\n| 123 – 130 | OLMC0: 8 product terms | 14 |\n| 131 | OLMC0: SP row | 14 |\n\n\u003e **Product-term rows** hold AND conditions. A fuse value of **0** means the signal is _connected_ to the AND gate; **1** means _disconnected_. An all-ones row is a disabled (don't-care) term. The JEDEC `*F0` default sets every fuse to 0 (all connected → X·/X = 0 per row = logic 0), so the compiler only needs to write the active rows.\n\u003e\n\u003e **SP rows** (synchronous-preset) are normally all-ones for every active combinatorial OLMC except the one on the lowest pin number used, which stays all-zeros.\n\n**Column assignments (44 columns per row):**\n\nEach signal is represented by a _true_ column (even) immediately followed by its _complement_ column (odd). A fuse of **0** connects that literal to the AND gate.\n\n| Columns | Signal | Physical pin |\n|---------|--------|-------------|\n| 0, 1 | CLK (true / complement) | 1 |\n| 2, 3 | O1 feedback (true / complement) | 23 |\n| 4, 5 | I1 (true / complement) | 2 |\n| 6, 7 | O2 feedback (true / complement) | 22 |\n| 8, 9 | I2 (true / complement) | 3 |\n| 10, 11 | O3 feedback (true / complement) | 21 |\n| 12, 13 | I3 (true / complement) | 4 |\n| 14, 15 | O4 feedback (true / complement) | 20 |\n| 16, 17 | I4 (true / complement) | 5 |\n| 18, 19 | O5 feedback (true / complement) | 19 |\n| 20, 21 | I5 (true / complement) | 6 |\n| 22, 23 | O6 feedback (true / complement) | 18 |\n| 24, 25 | I6 (true / complement) | 7 |\n| 26, 27 | O7 feedback (true / complement) | 17 |\n| 28, 29 | I7 (true / complement) | 8 |\n| 30, 31 | O8 feedback (true / complement) | 16 |\n| 32, 33 | I8 (true / complement) | 9 |\n| 34, 35 | O9 feedback (true / complement) | 15 |\n| 36, 37 | I9 (true / complement) | 10 |\n| 38, 39 | O10 feedback (true / complement) | 14 |\n| 40, 41 | I10 (true / complement) | 11 |\n| 42, 43 | I11 (true / complement) | 13 |\n\n\u003e Output-feedback columns (2, 6, 10 …) carry the OLMC's registered or combinatorial output back into the AND plane, allowing the device to implement state machines or logic that depends on its own outputs.\n\n**Column address formula for a given pin:**\n\n```\npin  1  (CLK)           → true col = 0\npin  2–11  (inputs I1–I10) → true col = 4 × (pin − 1)\npin  13  (input I11)    → true col = 42\npin  14–23  (OLMC feedback) → true col = 94 − 4 × pin\ncomplement col           = true col + 1\n```\n\n**Worked example** — fuse for the true literal of pin 2 (I1) in the first product-term row of OLMC9 (pin 23):\n- Row = 2 (first PT row of OLMC9)\n- Column = 4 × (2 − 1) = 4\n- Fuse = 2 × 44 + 4 = **92**\n\n#### Configuration Bits (fuses 5808 – 5827)\n\n20 bits immediately after the AND array control the OLMC mode for each output:\n\n| Fuse | Bit name | Value | Meaning |\n|------|----------|-------|---------|\n| 5808 | SYN | 1 (always) | Synchronous mode — must always be 1 for GAL22V10 |\n| 5809 | AC0 | 1 if any combinatorial output, else 0 | Global combinatorial-enable flag |\n| 5810 | AC1[9] | 1 = combinatorial, 0 = registered | OLMC9 — pin 23 |\n| 5811 | AC1[8] | 1 = combinatorial, 0 = registered | OLMC8 — pin 22 |\n| 5812 | AC1[7] | 1 = combinatorial, 0 = registered | OLMC7 — pin 21 |\n| 5813 | AC1[6] | 1 = combinatorial, 0 = registered | OLMC6 — pin 20 |\n| 5814 | AC1[5] | 1 = combinatorial, 0 = registered | OLMC5 — pin 19 |\n| 5815 | AC1[4] | 1 = combinatorial, 0 = registered | OLMC4 — pin 18 |\n| 5816 | AC1[3] | 1 = combinatorial, 0 = registered | OLMC3 — pin 17 |\n| 5817 | AC1[2] | 1 = combinatorial, 0 = registered | OLMC2 — pin 16 |\n| 5818 | AC1[1] | 1 = combinatorial, 0 = registered | OLMC1 — pin 15 |\n| 5819 | AC1[0] | 1 = combinatorial, 0 = registered | OLMC0 — pin 14 |\n| 5820 | XOR[8] | 0 = active-high (gallang always 0) | Output polarity — pin 23 |\n| 5821 | XOR[7] | 0 = active-high | Output polarity — pin 22 |\n| 5822 | XOR[6] | 0 = active-high | Output polarity — pin 21 |\n| 5823 | XOR[5] | 0 = active-high | Output polarity — pin 20 |\n| 5824 | XOR[4] | 0 = active-high | Output polarity — pin 19 |\n| 5825 | XOR[3] | 0 = active-high | Output polarity — pin 18 |\n| 5826 | XOR[2] | 0 = active-high | Output polarity — pin 17 |\n| 5827 | XOR[1] | 0 = active-high | Output polarity — pin 16 |\n\n\u003e **AC1 contiguous-block extension rule:** When the used combinatorial outputs form a contiguous block starting at pin 23 (OLMC indices 0 … N), the assembler also sets AC1=1 for OLMC indices up to `2N−1`. For example, 4 outputs at pins 20–23 (indices 0–3, N=3) causes indices 4 and 5 (pins 19 and 18) to be set as well. gallang replicates this behaviour for bit-exact compatibility.\n\n#### UES (fuses 5828 – 5891)\n\n64-bit User Electronic Signature — a free-form label burned into the device. gallang leaves these fuses at 0 (not written to the JEDEC file).\n\nRow 0 is the global async-reset PT; row 1 is the global output-enable PT. The 10 OLMCs (pins 23 down to 14) follow, each with their own product-term rows and a synchronous-preset row.\n\n#### Worked Example — Simple AND Gate\n\nCircuit: **Z = A \u0026 B** — output on pin 23 (OLMC9), input A on pin 2, input B on pin 3.\n\n**Step 1 — find the column addresses**\n\nThe column formula for input pins 2–11 is `col = 4 × (pin − 1)` (true), `col + 1` (complement).\n\n| Signal | Column | Fuse convention |\n|--------|--------|-----------------|\n| A — pin 2, true | 4 | 0 = connected |\n| A — pin 2, complement | 5 | 1 = disconnected |\n| B — pin 3, true | 8 | 0 = connected |\n| B — pin 3, complement | 9 | 1 = disconnected |\n| all other 40 columns | — | 1 = disconnected |\n\n**Step 2 — find the row and fuse addresses**\n\nOLMC9 (pin 23) owns rows 2–9 (8 product terms) and SP row 10.\n\n| Row | Purpose | Fuse state |\n|-----|---------|------------|\n| 2 | **Z = A \u0026 B** | all 1s, **except fuse 92 (A true) = 0 and fuse 96 (B true) = 0** |\n| 3 – 9 | unused PTs | all 44 fuses = 0 (A \u0026 /A \u0026 … → always 0; contributes nothing to OR) |\n| 10 | SP (sync preset) | all 44 fuses = 0 (disabled) |\n\n```\nfuse = row × 44 + column\nfuse 92 = 2 × 44 + 4    ← A (pin 2 true)\nfuse 96 = 2 × 44 + 8    ← B (pin 3 true)\n```\n\n**Step 3 — configuration fuses**\n\n| Fuse | Name | Value | Reason |\n|------|------|-------|--------|\n| 5808 | SYN | 1 | combinatorial mode |\n| 5809 | AC0 | 1 | at least one combinatorial output |\n| 5810 – 5818 | AC1[9..1] | 0 | OLMCs 1–8 unused |\n| **5819** | **AC1[0]** | **1** | OLMC9 / pin 23 is combinatorial |\n| 5820 – 5827 | XOR[8..1] | 0 | no polarity inversion |\n\n**Complete set of 0-valued fuses for this circuit:** 92, 96, and 5819 — every other fuse in the 5828-fuse range is 1.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantrpeter%2Fgallang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantrpeter%2Fgallang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantrpeter%2Fgallang/lists"}