You are browsing as a guest. Sign up (or log in) to start making projects!

DDSim

  • 2 Devlogs
  • 18 Total hours

A drift-diffusion semiconductor device simulator written from scratch. It solves the Van Roosbroeck system, Poisson plus the electron and hole continuity equations, self consistently, and produces device I-V and C-V characteristics from geometry and doping alone.

Open comments for this post

8h 36m 35s logged

Devlog #2

Two things this stretch, and both started as “that’s odd” rather than “that’s broken.”

First, the solver was crawling. Every step up in voltage cost more than the last, and past a point it just gave up. I traced it back to the starting guess, which was asking what makes glass electrically neutral. That question has no answer, because glass has no charges to balance in the first place. The solver was grinding away at something stupid before it ever got to the real problem. I gave it a proper starting answer instead, and the slowdown disappeared entirely.

Second, I stopped trusting my tests and went to check them. I broke my own code ten different ways on purpose, one at a time, and watched to see which breakages the suite would catch. 9/10 failed, which is what I wanted. 1 slipped through clean, and that is the interesting one, because a test that cannot fail is not a test.

Chasing the one that got away turned up a real bug hiding underneath it. Setting the voltage on the bottom contact was silently doing nothing at all. The code ran, reported success, and ignored the value. One line to fix, and it would have been very hard to find any other way, since nothing about the output looked wrong.

Heads up! Light AI usage to debug the tests and break code to find errors

0
0
38
Open comments for this post

9h 26m 46s logged

DDSim Devlog

I’m building a chip simulator from scratch. Today I got it to simulate a MOS capacitor, a silicon slab with a thin glass layer and a metal plate on top. It’s the heart of every transistor ever made.

What I built:

I stacked two grids together: a fine one near the silicon surface where all the action is, and a coarse one for the glass where nothing happens. Then I wrote one function that builds the whole sandwich.

I wrote every test before the code. This kind of maths loves to give you wrong answers that look perfectly reasonable, so I only trust it when it matches something I can work out on paper.

I’m happy that the “flatband” voltage came out exact to 15 decimal places. The threshold voltage matched the textbook to 0.13 millivolts, 50 times better than I needed.

I also identified a few problems; the solver was getting slower and slower at high voltage, then giving up. The starting guess was asking “what makes glass electrically neutral?”, a meaningless question, since glass has no charges. I gave it a proper answer instead and the slowdown vanished completely.

Then I deliberately broke my own code ten ways to check the tests would catch it. Nine got caught. One didn’t. Chasing that turned up a real bug: the bottom-contact voltage setting was silently doing nothing. One line to fix.

Current Position: 1339 tests passing, everything clean, C-V curve working across all three regimes.

0
0
39

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…