Giter Club home page Giter Club logo

vloginit's Introduction

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

vloginit's People

Contributors

vborchsh avatar

Stargazers

 avatar

Watchers

 avatar

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.