Skip to content

feat(frontend): introduce transistor-first standard cells and switch-level CMOS simulation - #20

Merged
Mani212005 merged 3 commits into
mainfrom
fm/digisim-transistor-first
Sep 24, 2026
Merged

Mani212005 merged 3 commits into
mainfrom
fm/digisim-transistor-first

Conversation

@Mani212005

Copy link
Copy Markdown
Owner

Intent

I have realized what cadence has gotten right, right? So basically the gates that we were making, there are smaller, there are units that make the gate as well.

So we need gate, we need to be able to, we need to get rid of the gates, the north gate, the and gate and the south and the and gate, north gate, nor gate. And we need to work on smaller components than them.

And then when we put them together, like CMOS and a lot of NAND gates together, components that make the NAND gate together, we can make it a component, name it NAND gate and use it in our personal library. Save it in our personal library and use it anywhere. I want you to understand cadence thoroughly. Dig very deep into it, understand what it does and all those things.

Figure out how we can train and model on it. I want to train a model for my agent.

So if we could do that, that will be great, a model that works for pure electronics. That will be great. We could fine tune a model like a one to billion parameter model. We could make do something with it.

I want to write a research paper on it. An RL environment also we discussed. Something should be a very, very good and well documented project is what I feel.

So if you could start working on it, that will be great.

Context: "north gate" and "south" are speech-to-text for NOT/NAND/NOR gates. DigiSim already has NMOS/PMOS nodes, a subcircuit hierarchy (logic/hierarchy/CellRegistry.ts), a personal component library panel, and a Gymnasium RL environment (ml/rl/digisim_env.py) from PR #14; plans/ holds earlier vision docs (virtuoso_ai_master_plan.md, digicopilot_silicon_architect.md).

What Changed

  • Implemented a switch-level CMOS solver (switchLevel.ts) integrated into runSimulation that resolves NMOS and PMOS transistor networks with supplies and inputs to digital logic levels (0, 1, X, Z).
  • Added pre-seeded transistor-built standard cells (NOT, NAND, NOR) and hierarchical cells (AND, OR, XOR) via standardCells.ts, and updated CustomComponentNode to distribute same-side pin handles evenly.
  • Transitioned the UI sidebar and command palette to a transistor-first workflow by directing gate usage to My Library standard cells while maintaining backward-compatible evaluation for legacy primitive nodes.

Risk Assessment

✅ Low: Transistor-first transition cleanly removes ready-made gate chips from the UI, adds switch-level CMOS logic simulation for NMOS/PMOS networks, seeds inspectable standard cells into the personal library, and preserves backward compatibility for legacy saved circuits.

Testing

Built and stood up the product stack (Flask backend on port 5001, production React build on port 3000) and drove 5 end-to-end scenarios live using Google Chrome via Chrome DevTools Protocol. Exercised the transistor-first toolbox, verified standard cell library seeding, placed MOSFET and subcircuit nodes on the interactive canvas, validated multi-pin handle geometry, and verified digital switch-level CMOS simulation. Captured 6 reviewer-visible visual artifacts in the evidence directory.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
transistor_first_sidebar_and_palette ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario1_sidebar_digital_io.png and scenario1_command_palette.png
seeded_standard_cells_library ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario2_my_library_panel.png
live_switch_level_cmos_transistor_placement ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario3_placed_components.png
standard_cell_pin_layout_and_wiring ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario4_custom_component_pins.png
adversarial_contention_and_floating_switch_resolution ✅ pass live frontend/src/logic/simulation/switchLevel.test.ts and ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario5_final_overview.png

Scenario 1: Transistor-First Sidebar & Digital I/O Toolbox
Scenario 1: Transistor-First Command Palette Guidance
Scenario 2: Seeded Transistor Standard Cells in My Library
Scenario 3: Canvas MOSFET & Transistor Cell Placement with Live Toggle
Scenario 4: Standard Cell Spread Pin Layout on Canvas
Scenario 5: Full Canvas Simulation Overview

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
transistor_first_sidebar_and_palette ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario1_sidebar_digital_io.png and scenario1_command_palette.png
seeded_standard_cells_library ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario2_my_library_panel.png
live_switch_level_cmos_transistor_placement ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario3_placed_components.png
standard_cell_pin_layout_and_wiring ✅ pass live ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario4_custom_component_pins.png
adversarial_contention_and_floating_switch_resolution ✅ pass live frontend/src/logic/simulation/switchLevel.test.ts and ~/.no-mistakes/evidence/01M3A84XX3P6KQ4Z0D8Z5RMT6N/scenario5_final_overview.png
  • cd frontend && npm test -- --watchAll=false (32 test suites, 201 unit tests passing)
  • Live headless Chrome CDP session against running Flask backend (port 5001) and static frontend build (port 3000)
  • Sidebar inspection: verified 'Silicon Primitives' menu, 'Digital I/O' tab with Input/Output chips, absence of raw gate primitives, and 'Gates live in My Library' guidance
  • Command Palette (⌘K) inspection: verified 'Gates live in My Library (transistor cells)' entry and absence of raw gate primitives
  • Personal Library inspection: verified 6 seeded standard cells (NOT, NAND, NOR, AND, OR, XOR) with inspectable CMOS transistor subcircuits
  • Canvas component placement: placed NMOS, PMOS, and standard cells on the canvas, toggled Input switch states, and observed real-time simulation updates
  • Pin spreading verification: verified CustomComponentNode handles on NAND cell are spread at distinct top offsets (33.33% and 66.67% on LEFT edge) rather than overlapping
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for digisim ready!

Name Link
🔨 Latest commit bef0024
🔍 Latest deploy log https://app.netlify.com/projects/digisim/deploys/6ab5649006ddef0008d04326
😎 Deploy Preview https://deploy-preview-20--digisim.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
digisim Ready Ready Preview Sep 24, 2026 5:57pm UTC

@Mani212005
Mani212005 merged commit f8680cf into main Sep 24, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — bef0024e Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant