Comments (10)
I have started working on this as nturley/netlistsvg#6.
from pycircuit.
We don't need a python implementation. We can export json and modify netlistsvg to render it inside the viewer. We can probably add a export to svg or png feature inside the viewer. Or something along those lines. Thank you for the link!
I'm not set on any single programming language, python / node and probably at some point rust for performance critical parts - this is a playground so we can use whatever gives the quickest results, and there is something generally useful it can be moved to it's own repo later.
from pycircuit.
Yes, looking over it, outputting the subset of the Yosys netlist that Netlistsvg supports and adding some SVG "skins" for analog components could be a good way to go for a proof of concept. What do you mean by "the viewer" though?
An interactive viewer that lets you "zoom" into sub-circuits would be really cool. Worth noting from the Netlistsvg readme:
Yosysjs and klayjs are both capable of handling sub circuits and subgraphs. It might be interesting to see what kind of images I can produce from a hierarchal design.
from pycircuit.
What do you mean by "the viewer" though
There is kind of a prototype in the viewer subfolder. You can start it with node viewer/app.js net.svg pcb.svg
it's not very user friendly yet... pcb.svg doesn't have any styling built in it's in viewer/css/pcb.svg.css
, the net highlighting is currently broken...
from pycircuit.
Ah, completely missed that. Very cool! The style of the Graphviz output makes more sense now.
from pycircuit.
Started work on this, like the results so far. this depends on #4, since port directions need to be specified and checked for consistency. This also allows removing the component labels, since they are no longer needed, new Inst('R', '10K')
and SubInst(joule_thief())
.
from pycircuit.
Still pretty awful, using netlistsvg master. Correctly and consistently setting input and output information should make them look much better.
Power to signal or power to power nets should use vertical components, while signal to signal nets should use horizontal components. (analysis mostly implemented)
Port swapping and better skins should also make it look much better.
The generic component should allow connecting nets at the top and bottom too so that power flows from top to bottom and signal flows from left to right.
from pycircuit.
You should add these examples to netlistsvg and open issues for features you mentioned that haven't been opened yet.
from pycircuit.
Hi, @dvc94ch . You raise some good points.
Port swapping and better skins should also make it look much better.
Port swapping is definitely a problem. I'm still trying to figure out the rules for when to port swap. Better skins meaning more components?
Power to signal or power to power nets should use vertical components, while signal to signal nets should use horizontal components
Right now I've been using a vertical flow for the analog skin, which does a bad job with horizontal ports so I've been just trying to use as many vertical components as possible, but presumably a typical circuit has more signal nets than power/gnd nets so maybe we should switch to a horizontal flow. Now that I have the lateral edge thing figured out, I might be able to make it look good. I'll try some experiments and see how it looks.
The generic component should allow connecting nets at the top and bottom too
A simple fix would be to add some special info in the netlist for generic components, but I just tagged all the lateral ports in the skin, so maybe I should just start tagging all of the port directions in the netlist and use that to determine which ports are lateral.
Example 1:
Laterals branch fixed this problem. It just merged to master. Wires to horizontal ports were always messy until that merged.
This needs a port swap. The resistor is connected from a southward port to a lateral port so we should be able to determine the optimal direction. The fact that the southward port is VCC should be an even bigger hint about the correct resistor orientation.
Laterals branch does a better job with this one as well.
Example 2:
Laterals branch fixed this
Turn off LONGEST_PATH. I think I turned it back off on master. I still think that NETWORK_SIMPLEX is better for analog.
Example 3:
port swap, port swap, port swap.
So I think the issues for these layouts
- Port swap specific components (Especially when they are connected to VCC or GND) nturley/netlistsvg#17
- See if we can get a better layout with a horizontal flow nturley/netlistsvg#31
- Add more components in the skin (I don't think we need an issue for this because this will never be complete)
- Generics should have a way to get vertical ports nturley/netlistsvg#30
from pycircuit.
Progress so far:
Things that can still be done from the pycircuit side are the following:
- custom logic for port swapping transformer - needs to add dots to symbol to show current flow (joule_thief)
- improve finding circuit paths on signal nets (sallen key without psu example can't determine that the resistor needs port swapping)
- improve finding circuit paths for circuits without external ports (sallen key with psu connected)
from pycircuit.
Related Issues (20)
- Preserve flexible pin assignment - use z3 for pin assignment
- Integration with BOM tools
- Setup and running examples HOT 7
- Improve circuit optimizer
- A group of Insts should be mappable to a Package
- Add deedgify(polygon, radius) function
- RedPitaya integration
- Yosys integration
- Library: Add all parts from the CPL HOT 1
- Improve simulation support
- Move netlist rendering logic to netlistsvg
- Move pcb rendering into it's own project
- DRC checking
- Support zones for copper pours
- Export gerbers
- Use qeda as a component library
- setup ci
- add real world examples - teres laptop parts
- Unable to install or use any example. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycircuit.