This patch adds code that when it find a select of a constant it looks
for a parameter in the enclosing scope and the module scope that has
the same line, file and value information. If it find one that is
used to rebuild the expression. A more exhaustive search is need to
make this 100% clean.
It also uses the named scope when emitting statement inside a named
begin or fork instead of the enclosing scope.
This patch moves the logic and lpm code to a new file. It refactors
the strength emitting routine and adds support for emitting the
standard tran style of gates.
This patch adds the ability to translate the code produced by the
compiler for a wait statement back into a wait statement. It also
reworks the strength emitting code to only emit a single strength
for the pull gates and fixes a bug in the strength emitting code.
Currently the vvp target emits multiple single bit %mov instructions
to perform sign extension. This patch adds a new %pad instruction
that allows sign extension to be performed with just one instruction.
A NOOP at the end of an existing statement can be represented as ";\n"
(a simple line termination). In general a NOOP represents an empty
begin/end pair.
This patch add the following functionality to the vlog95 generator.
Add support for most CAs. Selects still don't work correctly.
Emitting a named event as an expression.
Enhance the ability to find a signal in a nexus.
Add code to emit a nexus driven by a constant.
Rework the delay/strength code for logic gates/CAs
Refactor some of the number code.
Refactor the variable emitting code to support named blocks.
Translate the compiler code back to <var> = <event> <value>
In the standard a pull device can be given both a 1 and 0 strength.
Only the appropriate one is actually used. This patch adds support
for giving both pull strength to a pull device.
This patch adds support for emitting an array as an expression. This is
used as a system task/function argument.
It partially reworks the real display code to print an appropriate
expression for NaN, inf and -inf. To get other real numbers to always
display correctly we need to build a custom printing routine that adjusts
what is displayed based on the actual bits in the double.
Add the ability to print a real variable delay. They are not scaled by
the compiler.
Since a delayx delay may be variable we must always enclose this type of
delay with parenthesis.
Fix the L-value concatenation to be in the correct order.
Handle the special case that an if with a single if as the true statement
does not loose any associated else clause to the enclosed if. Basically
add a begin/end pair as needed to make things work out correctly.
This patch fixes the following problem in the compiler:
An integer task argument should be marked as an integer port.
An implicit register can be converted to either a reg or an integer.
An old style task port should default to <no type> unless reg or some
other type is provided. ANSI style is always defined. For example:
input ri;
output ro;
inout rio;
real ri, ro, rio;
should define all three task ports to be of type real.
This patch updates the make clean target and modifies the vpath search to
match what is done in the main ivl Makefile since this one has the same
issues it does. It also adds a cppcheck target and removes the redundant
libmisc build target since the vpath already handles this.
This patch adds the ability for the user to change the spacing increment
from the command line using the -pspacing=<num> flag. The is restricted to
be a value between and including 1 and 16.
This patch fixes the ivl build to find files in libmisc using vpath instead
of a separate target. The existing constructs caused build problems after
running a make clean. It also adds an empty checking target to vhdlpp.
This patch adds preliminary support for finding the correct name for
a nexus at a given scope level. It also does the following.
Report that real modulus is not supported.
Fix a bug in the generation of concat expressions.
Add missing generation of unary ! operator.
Add ability to generate > integer delays.
Refactor some of the support code.
Make some of the error messages more descriptive.
Ignore the ALLOC and FREE statements (only used with automatic tasks).
If the left power operator expression is a numeric constant that has a
value 2^n n>0 then we can use a left shift to calculate the result. This
patch adds code to do this. All other power expressions are flagged as a
compilation error.
This patch adds significantly more functionality to the vlog95 back end.
The following are the major additions:
Display unsigned numbers without undefined bits in hex.
Add support for both L-Value and R-value bit and part selects.
Added support for out of scope references.
Added support for emitting logic gates (range not finished, name is invalid).
Added support for emitting initial/always blocks.
Add support for event inter statement delays.
Convert a blocking inter statement delay assign back to the original form.
Added support for rescaling variable delays.
Added support for the disable statement.
Added support for an event trigger statement (event name is missing).
Added support for calling a user task (calling arguments are missing).
Added support for an event based delay statement (@) (event name is missing)
Not all of these are working as expected since there is not currently a
routine to find a nexus name as a function of scope (needed for event names,
logic gate ports, etc.). Since the Icarus compiler generates structural code
the arguments to modules, module instantiations and calling user tasks are
also still missing.
Include the compiler infrastructure to vhdlpp for collecting the
file and line information and attaching it to entities and ports.
Make the parser store the file name during parse.
Create a libmisc library where I can put source files that are
used by multiple programs within the source tree.
Add enough rules to parse a simple VHDL program:
Parse library and use clauses,
Parse entity declarations, and
Parse architecture bodies.
Add some parser infrastructure:
Handle syntax errors with useful error messages,
Include file name and line numbers in parse errors,
Add some parser debug aids.
The original message talks about an unresolved net which may be
something different/more encompassing. This patch explicitly adds
uwire to the message to make it clear to the user that a uwire
could cause this message.
This patch doesn't completely fix the problem, but with it the problem
is at least manageable. The issues was that when the lexor_keyword.gperf
file is updated and you are building outside the source directory the
Makefile would create a local lexor_keyword.cc as expected. The problem
is that it always looked in the source directory for the file. This
patch adds a special vpath rule that says to look in the build directory
first and then in the source directory for lexor_keyword.cc.
This works as expected except for the first time the lexor_keyword.cc
file is generated locally. During the make invocation it compares the
source lexor_keyword.cc file to the gperf file and notices it is out of
date. It then generates a new file in the build directory, but the make
rule is still using the source file which didn't change so it doesn't
rebuild as needed. To get the new file to compile you need to run make
a second time to get the rule to execute using the local version of the
file. This extra make invocation is only needed when the local file is
first created since after that the rule always uses the local file.
I plan to look at resolving the remaining issue, but there is much
subtlety in this since you effectively need to break/rebuild the make
dependency tree to get this to build correctly in a single run.
This patch adds support for using a scope in an expression and calling
a user function. It also fixes an issue in the module name mangling
and calling a system task/function with multiple arguments.
This patch adds support for the various case statements and adds
preliminary support for instantiating modules. The module instantiation,
just like the module definition, is still missing ports. Adding this
will require modification to the compiler to get the port order correct.
Because of defparams and passed parameters any module that has a
parameter must be generated uniquely for each instance since they may not
all be the same. Modules without parameters are only generated once.
For diagnostics and to know what is really going on in the compiler
we need to keep any NULL that is in a verinum string or when
displayed as/converted to a string.
When padding a verinum string if the padding is in multiples of eight
then keep the string property.
This patch fixes a small bug found with the vlog95 back end. A root scope
should define is_cell instead of leaving it undefined. Normally I would
expect a root scope to not be a cell, but I don't think the standard
prohibits this from happening, so copy the value from the definition.
This patch adds the ability to print a delay expression (it is rescaled
to the module timescale) and adds support the following statement types:
nonblocking assignment with a delay (event control is still missing)
condition (if/else)
forever
repeat
while (Icarus translated for loops to while loops)
fork
procedural continuous assign
deassign
force
release
This patch adds support to the vlog95 convert for the ternary operator,
the concat/repeat operator and calling a system function. It also adds
the `celldefine information when appropriate.
This patch adds more support to the Verilog 1995 converter. There is
still a lot that is missing and there is still some implemented
functionality that is not 100%.
It was documented that ivl_scope_port(s)() could be used with tasks,
but the code did not support this. This patch adds that functionality
as documented. It also removes the documentation for ivl_lval_mem()
since that function no longer exists.