Piezoresistor design and optimization tool.
PiezoD/
├── matlab/ # MATLAB implementation (primary, complete)
│ ├── PiezoD/ # Core library
│ │ ├── cantilever.m # Base class
│ │ ├── cantileverDiffusion.m
│ │ ├── cantileverEpitaxy.m
│ │ ├── cantileverImplantation.m
│ │ ├── cantileverPiezoelectric.m
│ │ ├── cantileverPoly.m
│ │ ├── ionImplantLookupTable.mat # Ion implant lookup data
│ │ └── sensorSimulation.mdl # Simulink model
│ └── sampleCode.m # Usage example
├── python/ # Python port (in progress)
│ ├── src/piezod/ # Core library
│ │ ├── cantilever.py # Base class
│ │ ├── cantilever_diffusion.py
│ │ ├── cantilever_epitaxy.py
│ │ ├── cantilever_implantation.py
│ │ ├── cantilever_piezoelectric.py
│ │ ├── cantilever_poly.py
│ │ └── data/ # Bundled data files
│ │ └── ionImplantLookupTable.h5
│ ├── tests/ # Test suite
│ ├── examples/ # Usage examples
│ └── archive/ # Legacy/experimental scripts
├── lookupTableGeneration/ # FLOOXS TCAD evaluation (archived, not viable)
│ ├── Dockerfile # FLOOXS build instructions
│ ├── docker-compose.yml # Container service definition
│ ├── templates/ # FLOOXS simulation templates
│ ├── simulations/ # Input/output directory
│ ├── legacy/ # TSUPREM-4 reference files
│ └── lookupTable.mat # Generated source data
├── Docs/ # Website (jemdoc)
│ ├── html/ # Generated HTML
│ └── cgi-bin/ # Download scripts
└── Releases/ # Version archives
- Python
- Environment:
uv - Lint:
ruff - Test:
pytest - Type checking:
ty - Build:
hatchling
- Environment:
- Matlab
- Lint:
checkcode - Test:
runtests
- Lint:
- KLayout
- pcell: use python not ruby
- Python
- Install:
uv syncfrom pyproject.toml - Lint:
uvx ruff check [path] --fix --extend-select I,B,SIM,C4,ISC,PIE && uvx ruff format [path] - Test:
uv run pytest - Type check:
uvx ty check [path]
- Install:
- Matlab
- Test: `matlab -batch "runtests('tests')"
- Never run
git checkout(destructive) - Never use unicode in code (breaks Python on Windows)
- Plan first, share plan, get explicit approval before implementing
- Never assume a good plan means you should implement it
- If unsure or stuck, ask the user
- If something fails, do not silently move on - ask for clarification
- If
uvfails due to permissions, consult user
- Run tests after changes; all tests must pass before task is complete
- Prefer tests over manual verification
- Use type hints and docstrings for all functions
- Keep files under 300 LOC; split if longer
- Fix all linter issues
- Single source of truth for defaults (e.g. config.py)
- Use enums instead of bare strings
- Never use
params.get('key', default)pattern - Never use
if config then value else defaultpattern
- Delete old interfaces; no legacy wrappers or thin compatibility layers
- No emojis in code or docs
- No excessive bold in markdown; use styling selectively
- No "last updated" dates or authorship
- Commands on single line, not split across lines
- Read project-specific docs and datasheets before making suggestions
- Use exact part numbers, not generic equivalents
- Prioritize safety over convenience; err on side of caution
- For python, include
addcopyfighandlerfor easy matplotlib copy/paste