Skip to main content

Simple script for verilog/systemverilog module templates generation

Project description

Templates generator: make Verilog/SystemVerilog module template by parameters and ports list

Usage

Verilog-style generation:

vloginit index_file.dat

SystemVerilog-style generation:

vloginit -sv index_file.dat

Mnemonics list

module name     : %file_name
include file    : `<name>
parameter       : $<name> # <value> # <param_type> # <width> # <array width>
localparam      : ?<name> # <value> # <param_type> # <width> # <array width>
port            : @<direction> # <name> # <width> # <port_type> # <array width>
comment list    : "/", "//"
comment RTL     : "*"

Ports description mnemonics

<width>         default `1`. Number's or parameter name - both is possible. If there is no previously defined parameter - this parameter will defined.
<port type>     default `logic`. Define required mnemonic, in case it necesary
<array width>   Number or parameter's name - both is possible. Only 1-D arrays. TODO: N-D arrays support
<direction>     = [ i   : input             ,
                    o   : output            ,
                    io  : inout
                  ]

<port_type>     = [ w/W       : wire        ,
                    l/L       : logic       ,
                    b/B       : bit         ,
                    r/R       : reg         ,
                    ws/Ws     : wire signed ,
                    ls/Ls     : logic signed,
                    bs/Bs     : bit signed  ,
                    rs/Rs     : reg signed  ,
                    i/I       : int         ,
                    user_type
                  ]

<param_type>    = [ l/L       : logic       ,
                    b/B       : bit         ,
                    r/R       : reg         ,
                    i/I       : int         ,
                    u/U       : untyped     ,
                    user_type
                  ]

Parameters/local parameters mnemonics

    <value>         default "1". Number's or parameter name - both is possible. If there is no previously defined parameter - this parameter will defined.
    <param type>    default "int". Define required mnemonic, in case it necesary
    <width>         default "1". Number's or parameter name - both is possible. If there is no previously defined parameter - this parameter will defined.
    <array width>   Number or parameter's name - both is possible. Only 1-D arrays. TODO: N-D arrays support

Comments mnemonics

comment list:
    String started with '/' or '//'. This string will be excluded from vloginit parsing

comment RTL:
    String started with '*'. This string will be translated into RTL comment line.

In case using only default values for all fields possible to leave it blank. But separation symbol '#' must be inserted

Examples

Input and results files are accessible ./examples

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

vloginit-0.0.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

vloginit-0.0.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file vloginit-0.0.1.tar.gz.

File metadata

  • Download URL: vloginit-0.0.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.10

File hashes

Hashes for vloginit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 47e0eb4e343418575ce27afb9e9fb78eb9194ebc78a6bf7b426a257c7d577c37
MD5 c858fcafc3680dded1bb708bf25e563d
BLAKE2b-256 29700a40ae220a05f750affd9cd8d4f9887f4afb4f42db0d11609c4d6183ff06

See more details on using hashes here.

File details

Details for the file vloginit-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vloginit-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.10

File hashes

Hashes for vloginit-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffad0cde6904b08c86e6625887c174501fb66d6097d79dc5bce97fd582e514fe
MD5 023c8c9aaa7be0df4b2c08a24a30555b
BLAKE2b-256 e352c18f9bb2350ba210fddc413e1e21f32eac7ac19e150df300631820e47bdd

See more details on using hashes here.

Supported by

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