kevinpt / symbolator Goto Github PK
View Code? Open in Web Editor NEWHDL symbol generator
Home Page: https://kevinpt.github.io/symbolator
License: MIT License
HDL symbol generator
Home Page: https://kevinpt.github.io/symbolator
License: MIT License
Hello,
Im having problems with file path. It doesnt run:
symbolator -i /home/Repo/file.vhd
Only runs:
symbolator -i file.vhd
Thank you.
Symbolator is not working with Sphinx 4.x.
>>> import symbolator_sphinx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/symbolator_sphinx/__init__.py", line 1, in <module>
from .symbolator_sphinx import *
File "/usr/local/lib/python3.8/site-packages/symbolator_sphinx/symbolator_sphinx.py", line 33, in <module>
from sphinx.util.osutil import ensuredir, ENOENT, EPIPE, EINVAL
ImportError: cannot import name 'ENOENT' from 'sphinx.util.osutil' (/usr/local/lib/python3.8/site-packages/sphinx/util/osutil.py)
It should be possible to fix this error.
The line in: https://github.com/kevinpt/symbolator/blob/master/symbolator_sphinx/symbolator_sphinx.py#L33
must be changed to: from errno import ENOENT, EPIPE, EINVAL
missinglinkelectronics/sphinxcontrib-svg2pdfconverter@252a0b0
Is symbolator properly supported for verilog? I got the following error when I ran it on a .v file. I have tried out multiple output formats etc. but no joy.
./symbolator.py alu.v
Scanning library: .
Creating symbol for alu.v "alu"
-> __alu.svg
Traceback (most recent call last):
File "./symbolator.py", line 596, in <module>
main()
File "./symbolator.py", line 591, in main
sym.draw(0,0, nc)
File "./symbolator.py", line 272, in draw
sym_width = max(s.min_width(c, style.font) for sym in self.symbols for s in sym.sections)
File "./symbolator.py", line 272, in <genexpr>
sym_width = max(s.min_width(c, style.font) for sym in self.symbols for s in sym.sections)
File "./symbolator.py", line 158, in min_width
lmax = max(tw.text_width(c, font_params) for tw in self.left_pins)
File "./symbolator.py", line 158, in <genexpr>
lmax = max(tw.text_width(c, font_params) for tw in self.left_pins)
File "./symbolator.py", line 105, in text_width
x0, y0, x1, y1, baseline = c.surf.text_bbox(self.text, font_params)
File "/mnt/g/symbolator_files/symbolator/nucanvas/svg_backend.py", line 211, in text_bbox
return CairoSurface.cairo_text_bbox(text, font_params, spacing, self.scale)
File "/mnt/g/symbolator_files/symbolator/nucanvas/cairo_backend.py", line 122, in cairo_text_bbox
layout = pangocairo.create_layout(ctx)
KeyError: 'could not find foreign type Context'
sumanth@LAPTOP-MFGQBV4B:/mnt/g/symbolator_files/symbolator$ ```
Hello @kevinpt, this tool is great!
My project does not use components in packages, but instead only entity files. Would it be interesting for symbolator to support that? I can probably make the updates myself (to symbolator and hdlparse), but I thought I'd ask if you think it is a good idea before starting.
Best regards,
Lukas
I have spent days trying to figure out how to get this thing working. I have python 2 and python 3 installed on windows.
I've also downloaded the latest GTK libraries. All I get when I run Symbolator from the command line is
no module named: 'cairo'
when I do pip install pycairo
all I get is cairo.h : No such file or directory found
although I can clearly find a cairo.h on using the search in the file manager (already tried adding cairo.h filepath to system path). I eventually gave up on windows and tried installing it on Ubuntu using WSL and although I was able to take care of the 'cairo' dependency somehow I'm still getting a no module named: 'pango'
I'm unable to find a pango in Pypi or anywhere else.
This is extremely frustrating. Please help me.
I have encountered three situations that symbolator generates an unexpected symbol.
Hi,
eager to try this tool but I can't get it to install. First of all it doesn't automatically install pycairo and pango dependencies? (hdlparse is installed fine though)
Then, if I install them, install symbolator and run the tool, I get the following error :
File "/home/${USER}/.local/lib/python3.7/site-packages/nucanvas/cairo_backend.py", line 13, in <module>
import pango
ModuleNotFoundError: No module named 'pango'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./symbolator", line 11, in <module>
load_entry_point('symbolator==1.0.2', 'console_scripts', 'symbolator')()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/${USER}/.local/lib/python3.7/site-packages/symbolator.py", line 10, in <module>
from nucanvas.cairo_backend import CairoSurface
File "/home/${USER}/.local/lib/python3.7/site-packages/nucanvas/cairo_backend.py", line 17, in <module>
from gi.repository import Pango as pango
ModuleNotFoundError: No module named 'gi'
Further research brings me to the issue that I am missing "gi" package. When installing this package, pygobject
I run into some other issues ...
Note that I am installing everything on python3 through pip install --user
, not sure this has something to do with the issue, although I never had an issue so far ...
Hi Kevinpt,
I installed symbolator on a Debian VM (latest version) with the "pip" command. Everything has been installed but I could not generate the SVG file.. This is surely the dependecy.
Could you be more precise on which library or packages, I should have installed on my OS?
Regards
It looks like hdlparse learned how to be case insensitive for VHDL code in 2018 (https://github.com/kevinpt/hdlparse/commits/master/hdlparse/vhdl_parser.py), but this version hasn't yet made it out to PyPI (https://pypi.org/project/hdlparse/).
Can you please push a 1.0.5 or equivalent release of hdlparse out to PyPI?
Hello Kevin,
as GitHub hosts so many awesome lists (Python, Ruby, ...), I thought, we should create a list for VHDL too.
I created awesome-vhdl.
Please create a pull request and get synbolator listed. You can also suggest to create or rename categories. When the number of listed VHDL projects increases, I'll create a PR for the awesome list itself (list of lists).
Looking forward to vote on your PR
Patrick
I am getting the following error when trying to install on ubuntu 22.04.
Install using pip (python2.7) works fine instead.
pip3 install --upgrade symbolator
Defaulting to user installation because normal site-packages is not writeable
Collecting symbolator
Using cached symbolator-1.0.2.tar.gz (30 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in symbolator setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
this line in file symbolator_sphinx.py cause an import error when trying to make a sphinx document site using symbolator plugin:
from sphinx.locale import _, __
everithing works fine if change to:
from sphinx.locale import _
Hi,
I want to generate a symbol from a simple VHDL file, but symbolator don't recognize the file or something else.
I use
symbolator 1.0.2
hdlpasrse 1.0.4
Hello, do you think one day symbolator could be used to parse one or more VHDL files to generate a schematic of the instanced components/wires?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.