MCPcopy Index your code
hub / github.com/TinyTapeout/xschem-viewer

github.com/TinyTapeout/xschem-viewer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
420 symbols 852 edges 23 files 1 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

xschem-viewer

Build and Lint License

Explore and visualize XSchem schematics in your browser.

Online version

To use the online version, simply go to https://xschem-viewer.com/.

You can add the URL of your .sch file to the end of the URL to load it directly, e.g. https://xschem-viewer.com/?file=https://github.com/RTimothyEdwards/sky130_ef_ip__rc_osc_500k/blob/main/xschem/sky130_ef_ip__rc_osc_500k.sch

VS Code Extension

Barak Hoffer maintains a VS Code extension of xschem viewer. You can get it at the VS Code Marketplace.

Local Development

Prerequisites

  • Node.js (v20 or later) and NPM (usually comes with Node.js)

Instructions

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Run npm run dev to start the development server
  4. Open http://localhost:5173 in your browser

Enjoy!

Running the tests

npm test will run the tests once. npm run test:watch will run the tests in watch mode.

Rebuilding the .sch parser

When making changes to the sch file parser, you will need to rebuild the parser by running npm run build:parser. This will generate a new xschem-parser.ts file in the src directory.

License

xschem-viewer is licensed under the Apache License, Version 2.0. See LICENSE for more details.

Extension points exported contracts — how you extend this code

Event (Interface)
(no doc) [1 implementers]
src/util/Event.ts
ISchematicProps (Interface)
(no doc)
src/components/SchematicView.tsx
FilePosition (Interface)
(no doc)
src/parser/xschem-parser.ts
ILibraryDefinition (Interface)
(no doc)
src/model/LibraryLoader.ts
XSchemTransform (Interface)
(no doc)
src/render/SVGRenderer.ts
Point (Interface)
(no doc)
src/util/geometry.ts
FileRange (Interface)
(no doc)
src/parser/xschem-parser.ts
LiteralExpectation (Interface)
(no doc)
src/parser/xschem-parser.ts

Core symbols most depended-on inside this repo

peg$parse_
called by 69
src/parser/xschem-parser.ts
peg$fail
called by 62
src/parser/xschem-parser.ts
assert
called by 48
src/wacl/wacl.js
abort
called by 46
src/wacl/wacl.js
peg$literalExpectation
called by 27
src/parser/xschem-parser.ts
peg$parseCoordinate
called by 21
src/parser/xschem-parser.ts
Pointer_stringify
called by 12
src/wacl/wacl.js
allocate
called by 11
src/wacl/wacl.js

Shape

Function 376
Method 16
Interface 15
Class 12
Enum 1

Languages

TypeScript100%

Modules by API surface

src/wacl/wacl.js261 symbols
src/parser/xschem-parser.ts119 symbols
src/util/EventEmitter.ts9 symbols
src/render/SVGRenderer.ts8 symbols
src/model/LibraryLoader.ts7 symbols
src/util/geometry.ts3 symbols
src/util/Event.ts3 symbols
src/tcl/tcl.ts2 symbols
src/components/SchematicView.tsx2 symbols
src/components/Main.tsx2 symbols
src/components/Home.tsx2 symbols
src/util/github.ts1 symbols

For agents

$ claude mcp add xschem-viewer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact