Skip to content

integrate new features and bug fixes. #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
67bc1fc
add support for interfaces in AUTOINTERFACE
jonathan-enf Mar 28, 2025
fa6c40e
add v3 style
jonathan-enf Mar 30, 2025
76ab060
add tests
jonathan-enf Mar 30, 2025
9337994
update preproc.manifest.expected
jonathan-enf Mar 30, 2025
789a0e8
add v3 style to autointerface
jonathan-enf Mar 30, 2025
d96a417
update
jonathan-enf Mar 30, 2025
6d99317
Merge branch 'master' into master
jonmayer Mar 30, 2025
718811f
Merge branch 'jonmayer:master' into master
jonathan-enf Mar 31, 2025
601abd4
update v3 formatting to be identical to verible default formatting.
jonathan-enf Apr 1, 2025
1fb4d66
fix corner case in v3 rendering of parameters
jonathan-enf Apr 1, 2025
8dff94c
v3 style: revert to printf, improve testing
jonathan-enf Apr 1, 2025
64c1f26
add autoif_generate_fr.vpp testcase
jonathan-enf Apr 10, 2025
96b9852
add autonet_filtered test case, add filters to autonet
jonathan-enf Apr 10, 2025
6cce533
add indent feature
jonathan-enf Apr 10, 2025
f347f50
add indent feature
jonathan-enf Apr 10, 2025
40a096c
update autoif_indented.vpp test
jonathan-enf Apr 10, 2025
8c1076e
added genvar support
jonathan-enf Apr 11, 2025
3416c13
update documentation
jonathan-enf Apr 11, 2025
1d5d173
rename genvar directive to array_dims
jonathan-enf Apr 11, 2025
a3d92ee
use /Q and /E operators to escape interpolated string in regex
jonathan-enf Apr 12, 2025
bf19807
sort tieoffs and unused signals
jonathan-enf Apr 22, 2025
d50c9be
support the case where list_of_hookup_arrs is empty
jonathan-enf May 1, 2025
dcb5bfb
tweak
jonathan-enf May 6, 2025
96b8d6e
deleted preproc.manifest.expected
jonathan-enf May 9, 2025
95ef5c1
add filter functionality to AUTOINTERFACE
jonathan-enf May 14, 2025
ec044c6
add min_type_width configurable for v3 style formatting.
jonathan-enf May 29, 2025
e02bf6a
fix formatting of interfaces in AUTOINTERFACE
jonathan-enf May 29, 2025
f8ac083
Added --sort flag to AUTOINTERFACE, updated docs.
jonathan-enf May 30, 2025
011a234
add debugging comment
jonathan-enf May 30, 2025
be323e7
remove debugging comment
jonathan-enf May 30, 2025
09b456d
avoid double-counting assignments if AUTOINTERFACE, AUTONET, AUTONC a…
jonathan-enf Jun 11, 2025
d396fc4
prioritize AUTOINTERFACE over AUTONC
jonathan-enf Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preproc.manifest
74 changes: 65 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@ versions of this tool, and new code should avoid using them.
If possible, consider configuring your editor to "fold" all code
between the PPSTART and PPSTOP comments out of your visual field.

In VIM, the simplest way to fold generated code out of your way
is with the following commands, suitable for adding to your
`.vimrc` file:

set foldmarker=PPSTART,PPSTOP
set foldmethod=marker

Or, a more complicated way:
In VIM, you could add the following to your .vimrc file:

autocmd BufWinEnter,Syntax *.v,*.sv syn region ppoutput
\ start="\/\*PPSTART\*" end="\*PPSTOP\*" fold contains=TOP keepend
Expand Down Expand Up @@ -108,8 +101,10 @@ Quick links:

* [AUTOINC](#Macro_AUTOINC)
* [AUTOINTERFACE](#Macro_AUTOINTERFACE)
* [AUTONC](#Macro_AUTONC)
* [AUTONET](#Macro_AUTONET)
* [AUTOTOSTRING](#Macro_AUTOTOSTRING)
* [CONFIG](#Macro_CONFIG)
* [EXEC](#Macro_EXEC)
* [FIXEDPOINT](#Macro_FIXEDPOINT)
* [FOREACH](#Macro_FOREACH)
Expand Down Expand Up @@ -224,6 +219,21 @@ The above example might expand to something like this:

endmodule

Additional options:

* `--style=<style>` can be used to override the default styling. ie. `--style=v3`

* `--sort` can be used to force the interface lines to be sorted alphanumerically.

### AUTONC {#Macro_AUTONC}

AUTONC can be used to declare specific nets as no-connects.

The body of this macro is a list of signal names or regular expressions to
indicate which nets to flag as no-connects. Signals that match and
would otherwise be undriven or unloaded are tied off.


### AUTONET {#Macro_AUTONET}

Usage:
Expand Down Expand Up @@ -257,6 +267,9 @@ drivers, multiple drivers, or zero load. Note that verilogpp does not
fully parse verilog, so AUTONET's warnings are only accurate in designs
that only contain expansions of INST macros.

If the "--skipif" option is supplied, all signals marked as interfaces
will be omitted from the net declarations.

If the "--cb" option is supplied, verilogpp will create appropriate clocking
blocks. verilogpp's ideas of appropriate clocking blocks are:

Expand Down Expand Up @@ -355,6 +368,30 @@ Expands to this output file:
/*PPSTOP*/


### CONFIG {#Macro_CONFIG}

The CONFIG macro can be used to set verilogpp configuration settings
within a source file. The contents of the CONFIG macro are a list
of key=value attributes, one per line.

Currently, only one attribute is supported:

* "SUBPATH=<path>"

This attribute can be supplied multiple times, to specific multiple subpaths.
This subpath specifies an additional path component to be searched for files
referred to by INST and FORINST macros. The search is performed by iterating
through each INCDIR path, and then looking for the file in each SUBPATH
beneath each INCDIR path.

Example:

/**CONFIG
SUBPATH=generated/ip/directory
SUBPATH=another/very/long/path/we/dont/want/to/type/over/and/over/again
**/


### EXEC {#Macro_EXEC}


Expand Down Expand Up @@ -690,13 +727,14 @@ of localparam declarations.

### INST {#Macro_INST}

/**INST <path> <instance>
/**INST <path> <instance> [<options>]
<specifications> **/

Where:

* "path" is the path to the module to be instantiated.
* "instance" is the instance name to use for the instantiation.
* "options" is an optional list of flags.
* "specifications" is a list of zero or more lines used to map port names
onto signal names. This can take a couple of different forms.

Expand All @@ -712,6 +750,17 @@ Transformation of port names onto signal names occurs by applying a
set of transformation rules onto the port name to produce the signal
name that port should connect to.

Some modules internally define local parameters which then leak
out of the module into the module interface. These local localparams
can be handled by manually computing the correct value for each
parameter, and then overriding the symbolic name of the parameter
in the port width. This can be specified like this:

localparam <param-name> <param-value>

Think of "localparam" as being the same as "parameter", except that a
parameter isn't added to the "#(...)" clause of a module instantiation.

The simplest transformation simply maps a port to a signal, like this:

.portname(signalname)
Expand All @@ -727,6 +776,13 @@ ports of INST-instantiated submodules. Additionally, the AUTOINTERFACE macro
can be used to propagate unbound ports from INST-instantiated submodules to the
module interface.

Options:

* --pretty Turns on "pretty print" style (equivalent to --style=pretty).
* --style Sets the output style ("default", "v2", "pretty", "v3")
* --compact Use compact naming for ports whose names match the connecting
signal (ie. ".clk" instead of ".clk(clk)").

See also: the AUTONET, AUTOINTERFACE, and FORINST macros.

Example:
Expand Down
Loading