All notable changes to this project will be documented in this file.
- Fix a crash that could happen when the parser encountered invalid syntax for a hierarchical identifier.
- Support the syntax
`WIDTH'hF0, i.e. where the size specifier of a sized integer literal is the result of a macro expansion. Many parsers seem to support this syntax even though the standard appears to define this as not legal Verilog since macros are not allowed to break number tokens.
-
Require Nim v1.4.0.
-
The returned tuple for the
find_declaration()procedure now includes any expression node if the declaration involves an assignment. Otherwise, this field is set tonil. -
Ranged expressions with
:is now an infix node. -
Refactored the module graph type (
graph.nim) and its interface.Parsing a Verilog source file now involves attempting to look up the declarations of all modules instantiated within.
-
Refactored the iterators
walk_ports()andwalk_parameters()to simplify logic in user applications.
- Add module caching. The user has to manage the module cache and location
database and initialize each new module graph with these objects. See
graph.nim:new_graph(). - Add interface
find_all_drivers()to simplify extracting driver nodes from the AST. - Add interface
find_all_ports()andfind_all_parameters(). - Add a set for the node types involved in expressions.
- Add the option to specify the start of the search for the various
find_first()functions. - Add operators
[]and[]=to AST nodes. This is shorthand to access the sequence of sons for nonprimitive nodes, i.e.n[i]is equivalent ton.sons[i]. - Define the
len()proc for nonprimitive AST nodes. The operation is equivalent tolen(n.sons). - For completeness, performing a declaration lookup with a module instance name leads back to the instantiation itself.
- Add
is_external_identifier()to the AST API. - Add
find_external_identifier(),find_module_port_declaration()andfind_module_parameter_declaration()to the module graph API. - Add the iterator
walk_port_references(). - Module declaration nodes now include the leading comment token.
- An include path ending with '**' implies a recursive include.
-
Disable colored output when stdout does not lead to a terminal.
-
Fix
find_all_parameters()always including the parameters declared in the module body. Like ports, these only get included if the parameter port list is omitted. -
Fix an issue where the lexer would throw an exception when parsing a decimal constant larger than 64 bits.
-
Hierarchical identifiers like
foo.bar[1].baz[3:0]are now supported. Previously, only ranged identifiers was allowed and the scoping syntax with.didn't work. -
Fix an issue where operators were not being lexed correctly.
The issue occurred when a an infix operator was immediately followed by a prefix operator, i.e. not separated by whitespace. Before this fix an expression like
a|~bwould be lexed asa,|~andbinstead ofa,|,~andblike it should. -
Fix
find_declaration()not yielding the declaration when the target identifier is a port reference.
- Remove AST nodes
NkVariableLvalueandNkArrayIdentifier. - Remove special identifier node types like
NkPortIdentifierandNkModuleIdentifierin favor of the genericNkIdentifier. - Remove
NkParameterAssignment, useNkAssignmentinstead.
- Fix an issue where the preprocessor would remove comments located immediately after the token that ends the replacement list.
- Fix localparam and parameter declarations not including the leading comment token.
- Fix stringification of concatenation nodes.
- Fix
find_identifier_physical()not working correctly when targeting macro arguments. find_references()now correctly ignores named parameter port connections.
- The interface to traverse the AST searching for the declaration of a target identifier now returns both the declaration node as well as the matching identifier node within the declaration. Previously, only one of these values was returned.
find_all_module_instantiations()now returns the top-level instantiation node instead of its identifer node.find_all_declarations()no longer performs a recursive search by default.- Remove
NkPortConnectionin favor of more specialized node types for port and parameter port connections.
- Fix stringification of task and function declarations (the type information was omitted in the output).
- This is the first release of the project.