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.2.tar.gz (66.1 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.2-py3-none-any.whl (69.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hdltree-0.1.2.tar.gz
  • Upload date:
  • Size: 66.1 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.2.tar.gz
Algorithm Hash digest
SHA256 6b9d7df7d86bb72ec6ec68963d1bd0a052d3d78ea737ac88d486671e0dc22164
MD5 63e52f9f844dffca8dd65c2241db03c5
BLAKE2b-256 e49c2f11d267b7d775c96c6626872bfb1cb55c051939936d1ca3d5ed1af85e36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hdltree-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 69.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f45bd53b15214bf00c1a964f40aea51e8ed5faf35294f9c470738aa0de3395ce
MD5 4e437f18451c4de1528bcf6a7cd87687
BLAKE2b-256 b6ce4612c4d5b83a14c0305b40dc7c4ca37f9f560d17f1ee6cefdef7480c8547

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