Giter Club home page Giter Club logo

Comments (7)

dvc94ch avatar dvc94ch commented on August 23, 2024

The examples in the README are parts from examples/small. To run the examples do cd examples/small and run make all

But I agree the documentation isn't very good, it's still all very unstable, and the example doesn't autoroute unless you disable this line because there isn't multilayer support yet and the packing is to dense #7

from pycircuit.

kasbah avatar kasbah commented on August 23, 2024

Hmm, looks like the module isn't properly exported.

$ make all
make build
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
python3 small.py
Traceback (most recent call last):
  File "small.py", line 6, in <module>
    from pycircuit.formats import *
ImportError: No module named 'pycircuit.formats'
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: [all] Error 2 (ignored)
make place
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
rm -f small.out.pcpl
python3 ../../placer/place.py small.pcpl
Traceback (most recent call last):
  File "../../placer/place.py", line 1, in <module>
    from z3 import *
ImportError: No module named 'z3'
Makefile:7: recipe for target 'place' failed
make[1]: *** [place] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

If I copy the source directory over

$ cp -r ../../pycircuit/ .
$ make all
make build
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
python3 small.py
Traceback (most recent call last):
  File "small.py", line 154, in <module>
    pcb.from_pcpl('small.out.pcpl')
  File "/home/kaspar/projects/pycircuit/examples/small/pycircuit/formats/pcpl.py", line 28, in from_pcpl
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'small.out.pcpl'
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: [all] Error 2 (ignored)
make place
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
rm -f small.out.pcpl
python3 ../../placer/place.py small.pcpl
Traceback (most recent call last):
  File "../../placer/place.py", line 1, in <module>
    from z3 import *
ImportError: No module named 'z3'
Makefile:7: recipe for target 'place' failed
make[1]: *** [place] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

If I install z3:

$ pip install z3
$ make all
make build
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
python3 small.py
Traceback (most recent call last):
  File "small.py", line 154, in <module>
    pcb.from_pcpl('small.out.pcpl')
  File "/home/kaspar/projects/pycircuit/examples/small/pycircuit/formats/pcpl.py", line 28, in from_pcpl
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'small.out.pcpl'
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: [all] Error 2 (ignored)
make place
make[1]: Entering directory '/home/kaspar/projects/pycircuit/examples/small'
rm -f small.out.pcpl
python3 ../../placer/place.py small.pcpl
Traceback (most recent call last):
  File "../../placer/place.py", line 77, in <module>
    result = place(input)
  File "../../placer/place.py", line 11, in place
    box = Z3Box.from_dict(node)
  File "/home/kaspar/projects/pycircuit/placer/box.py", line 84, in from_dict
    return cls(int(d['id']), d['width'], d['height'])
  File "/home/kaspar/projects/pycircuit/placer/box.py", line 92, in __init__
    self.const_rx = int(math.ceil(width / 2))
NameError: name 'math' is not defined
Makefile:7: recipe for target 'place' failed
make[1]: *** [place] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

from pycircuit.

kasbah avatar kasbah commented on August 23, 2024

I am slowly getting there. Just compiling monosat. Will send a pull-request with fixes.

It would be nice to have the examples in the README be runnable in ipython or whatever if this is installed. I think that's what people would expect. Can I change the README?

from pycircuit.

dvc94ch avatar dvc94ch commented on August 23, 2024

This is what I have in my .zshrc file:
export PYTHONPATH=$PYTHONPATH:~/repos/pykicad:~/repos/pycircuit2:~/repos/monosat/src/monosat/api/python:~/repos/build/z3/python

Can I change the README?

Yes

from pycircuit.

kasbah avatar kasbah commented on August 23, 2024

Ok, I managed to run it fully by installing the monosat python package and copying the compiled libmonosat.so into it ($PYTHONPATH would do it too). Looks like it can't solve the routing though, is that expected?

Solving in Monosat...
s UNSATISFIABLE
Makefile:11: recipe for target 'route' failed
make[1]: *** [route] Error 1
make[1]: Leaving directory '/home/kaspar/projects/pycircuit/examples/small'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

Regarding all the packaging trouble I have opened up an issue on monosat which will need to be packaged to handle the dependencies properly.

from pycircuit.

dvc94ch avatar dvc94ch commented on August 23, 2024

Yes, as I mentioned, to solve the routing multilayer support is required since the packing is too dense.

But I agree the documentation isn't very good, it's still all very unstable, and the example doesn't autoroute unless you disable this line because there isn't multilayer support yet and the packing is to dense #7

from pycircuit.

dvc94ch avatar dvc94ch commented on August 23, 2024

Also note that it's still very slow, there are some options that can be enabled and the routing time is most affected by the pcb area. I needed a 0.05mm grid for the pads on the QFN package to be represented correctly, if you reduce the grid to 0.15mm spacing it will be a lot faster.

from pycircuit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.