Project Info
Inspiration
Designing hardware is hard. Even a simple digital circuit can take time: writing Verilog, creating a testbench, running synthesis, checking simulation, reading waveforms, fixing errors, and repeating the process. As undergraduate electrical engineering students, we saw how much time gets spent on setup and iteration before we can focus on the actual circuit idea. Software developers have tools like Cursor to move from idea to working code faster. We wanted a similar experience for hardware: an assistant for Verilog, synthesis, simulation, and waveform-based debugging. That is why we built Saffron - an AI-powered hardware design assistant that helps users describe a circuit, generate Verilog, verify it with real EDA tools, and visualize the result through schematics and waveforms. Our goal is to make early-stage hardware prototyping faster, clearer, and easier to learn from.
What it does
Saffron is an AI-powered hardware design assistant for early-stage digital circuit prototyping. Users describe a circuit in natural language, and Saffron generates Verilog for that design. The generated code is then checked using real EDA tools instead of being treated as correct by default. If the design fails, Saffron shows the error result and can use that feedback to retry and improve the Verilog. If the design succeeds, it produces a circuit schematic and runs simulation so users can see how the circuit behaves over time. Saffron also gives users a place to inspect and edit the generated Verilog, then rerun the workflow. This makes it useful not only for generating circuits, but also for learning, experimenting, and quickly testing design changes. In one flow, Saffron helps users move from idea to Verilog, verification, schematic visualization, simulation, and waveform output.
How we built it
We built Saffron as a full-stack AI + EDA workflow that connects natural-language circuit design with real hardware verification tools. On the backend, we used Python and FastAPI to create the main API. When a user describes a circuit, the backend sends the request to Claude, which generates structured Verilog code and an explanation. The generated Verilog is then passed through a verification pipeline instead of being trusted blindly. For synthesis, we use Yosys to check whether the Verilog is valid and synthesizable. If synthesis succeeds, Yosys produces a gate-level netlist. That netlist is then rendered into a visual circuit schematic using netlistsvg and Graphviz. For simulation, we built an automatic testbench generator. It inspects the circuit inputs and outputs, creates test cases, and runs the design using Icarus Verilog. The simulator produces a VCD waveform file, which we parse and convert into waveform data that can be shown in the frontend. We also built an auto-repair loop. If Yosys or Icarus Verilog finds an error, Saffron captures the tool log, sends the error back to the AI with the broken Verilog, and asks it to fix the design. This loop helps turn AI output into actually working hardware code. On the frontend, we used Next.js, React, TypeScript, and Tailwind CSS. The interface includes a chat-style circuit prompt, a Verilog editor, schematic visualization, and waveform display. Users can generate a design, inspect the code, manually edit it, and rerun synthesis or simulation.
Challenges we ran into
One challenge was connecting many different tools into one smooth workflow. AI generation, backend logic, EDA tools, frontend display, and user editing all had to work together correctly. Another challenge was working with unfamiliar hardware toolchains under limited time. We had to learn quickly, test often, and fix issues as they appeared. The hardest part was making Saffron feel useful instead of just impressive. We wanted the tool to help users understand and iterate on circuits, not only generate code.
Accomplishments we're proud of
We are proud that we built Saffron in just one day while learning new EDA tools and hardware workflows along the way. The biggest accomplishment was turning many separate pieces into one usable experience. Instead of stopping at AI-generated code, Saffron gives users a way to create, check, edit, and visually understand their circuit designs. Even without OpenROAD integration yet, Saffron already helps users move faster in the early stages of hardware prototyping and build confidence in their designs.
What we learned
Building Saffron showed us that AI is most powerful when it is connected to real tools, not used alone. We learned how much engineering happens between an idea and a working circuit: code generation, validation, simulation, visualization, and iteration all have to work together. We also learned that a team does not need the same background to build something complex. Hardware knowledge, software skills, planning, and shared momentum all mattered equally.
What's next
Saffron already works as a rapid prototyping tool for early-stage digital design. Next, we want to expand it into a more complete hardware design platform. The next major step is integrating floor planning, layout generation, and routing, with AI helping automate and optimize each stage. Instead of only generating and verifying Verilog, Saffron could evaluate design metrics, improve layouts, and guide users toward more efficient hardware implementations. We also want to fine-tune the AI on hardware design workflows so it becomes better at understanding circuits, fixing errors, and making stronger design decisions. Long term, Saffron has the potential to redefine how students, engineers, and researchers build hardware by making chip design faster, more accessible, and more intelligent.
Saffron
AI hardware design assistant. Describe a circuit in natural language → get synthesizable Verilog, a real gate-level schematic (Yosys + netlistsvg), and (coming) a simulated waveform. The output is verified by real EDA tooling, not just generated by an LLM.
Prerequisites
brew install yosys icarus-verilog graphviz node # EDA toolchain + Node
npm install -g netlistsvg # yosys JSON → SVG schematic
Optional — static timing analysis (OpenSTA via Docker). Timing is best-effort:
without it you still get the schematic, waveform, and formal results, and the Timing
tab degrades to a yosys area/cell estimate. To enable real max-frequency/critical-path
analysis, install Docker and pull the image (the Nangate45 library is already vendored
in backend/fixtures/liberty/):
docker pull --platform linux/amd64 openroad/opensta # amd64 runs under emulation on Apple Silicon
docker run --rm --platform linux/amd64 openroad/opensta -version # sanity check
Backend (FastAPI, Python 3.12 via uv)
cd backend
cp .env.example .env # then add your GEMINI_API_KEY
uv sync
uv run uvicorn app.main:app --reload --port 8000
GEMINI_API_KEY(required for generation) and optionalGEMINI_MODEL(defaultgemini-2.5-flash) live inbackend/.env.- Tests (use the real toolchain, no key needed):
uv run pytest
Frontend (Next.js + Tailwind)
cd frontend
npm install
npm run dev # http://localhost:3000
Architecture
Built for loose coupling (SOLID): every external tool sits behind a small interface,
wired in one composition root (backend/app/api/deps.py).
llm/provider.py—LLMProvider←GeminiProvider(swap models in one line)pipeline/synthesize.py—Synthesizer(yosys) +SchematicRenderer(netlistsvg)pipeline/sandbox.py— sandboxed subprocess runner +VerilogGuard(rejects$system/$fopen/… before any tool runs)pipeline/orchestrator.py— generate → synthesize → auto-repair (feeds tool errors back to the LLM, retries up to 3×) → returns code + schematic togetherpipeline/testbench.py+simulate.py+simulation.py— auto-generate a testbench from the netlist ports (combinational sweep, or clocked stimulus for sequential modules — chosen automatically), simulate with Icarus, convert VCD → WaveDrom. Narrow signals render per-bit; wide datapaths as value segments.pipeline/formal.py+verification.py—FormalVerifier(yosys SAT). Proves LLM-emitted intent assertions for all inputs (combinational) — refutations render as a counterexample waveform — plus intent-independent invariants (no combinational loops, no accidental latches) on every design.pipeline/timing.py+timing_pipeline.py—TimingAnalyzer(OpenStaTiming‑ Analyzer). Maps to the Nangate45 cell library with yosys, then times the critical path with OpenSTA (in Docker) → max frequency / critical path / area. Degrades to a yosys area estimate when Docker is absent.
Every analysis stage is best-effort and additive: a formal/timing/sim failure surfaces in its own tab and never blocks the schematic. The repair loop targets synthesis only.
Status
- Toolchain spike, synthesis pipeline, schematic in browser
- LLM generation + auto-repair loop
- Simulation → waveform — combinational and sequential (clock/reset/enable)
- Formal verification (yosys SAT) — intent proofs + invariants + counterexamples
- Static timing analysis (OpenSTA) — max frequency, critical path, area
Analysis
View
Metric
- 17
- 13
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
7 of 7 appear in the indexed code.
AI coding agents
- Claude CodeConfig · Commits
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
182 KB
Source files
52
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Shreyas-Yadav/saffron
72 files · 1.8 MB · @ 7f5de12
Structure
Interface
31 files · 43%Screens, components and styles rendered to the user.
API & routing
3 files · 4%Request entry points: routes, handlers and controllers.
Application logic
3 files · 4%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python69%
- TypeScript26%
- Markdown3%
- CSS2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 12- next
- react
- react-dom
- +9 more
backend/pyproject.toml
pypi · 7- anthropic[vertex]
- fastapi
- google-genai
- pydantic
- python-dotenv
- pyvcd
- uvicorn
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.