DEV Community

Johan Fernandes
Johan Fernandes

Posted on

👻 ASCII Ghost: A Local AI Debugging Companion for FPGA & Embedded Systems

Hacktoberfest 2026 Progress Update

If you’ve ever stared at a cryptic FPGA timing report or a garbled UART crash log at 2 AM, you know the feeling: there’s a ghost in the machine, and it’s mocking you.

For Hacktoberfest Week 4 ("Ghost in the Machine"), I decided to build a tool to help exorcise those hardware demons: ASCII Ghost.

Since time is tight, I’m sharing this progress update to document the journey, share the architecture, and lay the groundwork for future deep-dive articles.


💡 The Problem

Hardware debugging is hard. When a design fails, the logs are often verbose, cryptic, and highly specific to the toolchain. While AI can help summarize these logs, sending proprietary RTL code, timing reports, or firmware crash dumps to a cloud-based LLM is a massive security and privacy risk for engineers and companies.

👻 The Solution: ASCII Ghost

ASCII Ghost is a terminal-based, offline AI debugging companion for FPGA and embedded systems.

Instead of blindly asking an AI to "read this log," ASCII Ghost uses a two-stage pipeline:

  1. Deterministic Parsing: Python scripts extract concrete, measurable evidence from the logs (e.g., Worst Negative Slack, specific register faults, watchdog timeouts).
  2. Local AI Reasoning: A local, open-weight model (via Ollama) interprets only the extracted evidence to provide root-cause hypotheses and actionable debugging steps.

This means your sensitive hardware logs never leave your machine.


🛠️ Current Progress (MVP)

Here’s what’s up and running so far:

  • ✅ Core Architecture: Set up with Python, typer for the CLI, and rich for beautiful terminal output.
  • ✅ Local AI Integration: Successfully connected to Ollama (currently testing with lightweight models like gemma3:4b).
  • ✅ FPGA Analyzer: A deterministic parser that scans timing reports for issues like Negative Slack (WNS < 0) and unconstrained paths.
  • ✅ Evidence-Based Prompting: The AI is explicitly instructed to separate observed facts from hypotheses and never invent measurements.

Example Output (Work in Progress)

[1] EXTRACTED EVIDENCE
{'target': 'FPGA', 'issues': ['Negative slack detected: -2.450 ns', 'Timing requirements were not met'], 'warnings': ['Unconstrained path detected']}

[2] ASCII GHOST DIAGNOSIS
   .-""""-.
  /  o  o  \   "Your timing budget is haunted..."
  |   --   |
  \  ____  /
   '------'

OBSERVED: WNS of -2.450 ns and unconstrained paths.
HYPOTHESIS: A setup timing violation on a clock domain crossing or poorly constrained path.
NEXT STEPS: 
  1. Inspect the failing startpoint and endpoint in the timing report.
  2. Verify clock constraints (create_clock, set_clock_groups).
  3. Consider adding a synchronizer if this is a CDC path.
Enter fullscreen mode Exit fullscreen mode

🌍 Why Open-Source AI Matters Here

  1. Privacy First: Proprietary hardware logs stay on your local machine. No API keys, no cloud uploads.
  2. Transparency: By separating deterministic parsing from AI generation, we can audit why the AI made a suggestion. It’s grounded in extracted facts, reducing hallucinations.
  3. Flexibility: You can swap the underlying model (e.g., Llama 3, Phi-3, Gemma) based on your laptop's RAM constraints without changing the application logic.

🔮 What’s Next?

This is just the beginning! In upcoming articles, I’ll be covering:

  • 🛠️ Building the Embedded Analyzer (UART logs, firmware watchdog resets, and stack overflows).
  • 🎨 Enhancing the Terminal UI to give the "Ghost" more personality and better visual diagnostics.
  • 🧪 Writing robust pytest suites to ensure the deterministic parsers never break.
  • 📦 Packaging and publishing the tool for an easy pip install.

🤝 Get Involved!

The project is in its early stages, and I’d love your feedback.

  • GitHub Repo: https://github.com/LiquidSilicion/ascii-ghost
  • Try it out: Clone the repo, install Ollama, and run the sample FPGA logs!

Have a hardware debugging horror story? Or an idea for what the Ghost should analyze next? Let me know in the comments below! 👇


Built with ❤️ and ☕ for #Hacktoberfest 2026.

Top comments (0)