Skip to main content

Pure Python HDL parser, plus symbol generator and sphinx domain

Project description

Symbolator logo

Symbolator

Symbolator is a component diagramming tool for VHDL and Verilog. It will parse HDL source files, extract components or modules and render them as an image.

This is a fork of kevinpt/symbolator.

library ieee;
use ieee.std_logic_1164.all;

package demo is
  component demo_device is
    generic (
      SIZE : positive;
      RESET_ACTIVE_LEVEL : std_ulogic := '1'
    );
    port (
      --# {{clocks|}}
      Clock : in std_ulogic;
      Reset : in std_ulogic;

      --# {{control|Named section}}
      Enable : in std_ulogic;
      Data_in : in std_ulogic_vector(SIZE-1 downto 0);
      Data_out : out std_ulogic_vector(SIZE-1 downto 0)
    );
  end component;
end package;
$ symbolator -i demo_device.vhdl
  Scanning library: .
  Creating symbol for demo_device.vhdl "demo_device"
        -> demo_device-demo_device.svg

Produces the following:

Demo device diagram

Symbolator can render to PNG bitmap images or SVG, PDF, PS, and EPS vector images. SVG is the default.

Getting symbolator

There are some ways to run symbolator that dont require installing local dependencies:

You can run a prebuilt docker container with symbolator using the following command:

docker run --rm -it -v $(pwd):/src madmanfred/symbolator

Another way to run symbolizer is through the nix package manager with the command:

nix run github:zebreus/symbolator

There also is a AppImage available on GitHub releases.

Installing symbolator from source

Symbolator is a Python application. You must have Python installed first to use it. Most modern Linux distributions and OS/X have it available by default. There are a number of options available for Windows. If you don't already have a favorite, I recommend getting one of the "full-stack" Python distros that are geared toward scientific computing such as Anaconda or Python(x,y).

If your OS has a package manager, it may be preferable to install Python setuptools through that tool before attempting to install Symbolator. Otherwise, the installation script will install these packages directly without registering them with the OS package manager.

Symbolator requires Python 3.x, Pycairo, and Pango.

The Pango library is used compute the dimensions of a text layout. There is no standard package to get the Pango Python bindings installed. It is a part of the Gtk+ library which is accessed either through the PyGtk or PyGObject APIs, both of which are supported by Symbolator. You should make sure that one of these libraries is available before installing Symbolator. A Windows installer is available. For Linux distributions you should install the relevant libraries with your package manager.

To build symbolator from source you need a setuptools with a version >= 61.0.0 and pip >= 23.0.0.

When these requirements are met you can install symbolator from github using:

pip install --upgrade git+https://github.com/zebreus/symbolator.git

If you manually downloaded a source package or created a clone with Git you can install Symbolator with the following command run from the base Symbolator directory:

pip install .

After a successful install the Symbolator command line application will be available. On Linux they should be immediately accessible from your current search path. On Windows you will need to make sure that the <Python root>\Scripts directory is in your %PATH% environment variable.

You may need to update to recent versions of setuptools (at least 61) and pip (at least 23) to install symbolator. You can upgrade them to the latest versions using the following command:

pip install --upgrade pip setuptools

On Linux systems you may need to install with root privileges using the sudo command.

Licensing

Symbolator is licensed for free commercial and non-commercial use under the terms of the MIT license. The Symbolator Sphinx extension is derived from the Graphviz extension and is BSD licensed.

Download

You can access the Symbolator Git repository from Github. You can install direct from PyPI with the "pip" command if you have it available.

Contributing

Thank you for considering contributing to this project!

To contribute, please follow these steps:

  1. Fork the repository and create your branch from main.
  2. Make the necessary changes and additions.
  3. Ensure that you are happy with your changes.
  4. Submit a pull request, describing the changes you've made and providing any relevant information.

I will review your pull request as soon as possible.

Documentation

The full documentation is available online at the main Symbolator site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdltree-0.1.0.tar.gz (66.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hdltree-0.1.0-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

Details for the file hdltree-0.1.0.tar.gz.

File metadata

  • Download URL: hdltree-0.1.0.tar.gz
  • Upload date:
  • Size: 66.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hdltree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 748d763638f637e955569c70dc3bb1846b0697153661b3f8d2944fcd2a7a6d78
MD5 d809b16314765d3d1acbb7be810373d8
BLAKE2b-256 266ce5ad5c29fe1ba4179c877f5494bf48b9b15023ec7d44bc5400f13dd7bdbf

See more details on using hashes here.

File details

Details for the file hdltree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hdltree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hdltree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 156763c220e2c355ee71ce170f35e34f400a5ffd5bb6a7d81f527d8e6d5beb96
MD5 e2220c9dc3d7e892dbe0c84ccef3df62
BLAKE2b-256 5543de0f177c50b9051860741ddbbe0e1372a001ffbbd69949e3b28fbd5ae723

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page