Since parameters are now passed by reference use that information to print
the parameter name in a select vs trying to figure it out by searching the
scope looking for a parameter with the same file, line and value information.
Only print the $signed() may need to be removed messages for a select
expression that will actually be cast to signed.
Use the actual parameter information to warn that -pallowsigned=1 is needed
for a parameter when the LSB > MSB.
If a logical pull device is converted into a CA then it is an assignment
with strength, so just emit the appropriate constant to get the correct
functionality (e.g. 1'b1 for a pull up and 1'b0 for a pull down).
Also add missing file/line information.
If modules instantiations were always handled correctly this would not be
needed, but for now looking for the nexus driver outside the scope is
needed to make some of the tests work.
Since the vlog95 code generator needs the strength information we do
not want to hide it behind a concat-Z optimization. For now we abort
the optimization, but in the future we could add parts of this back
in (e.g. all the drivers have matching strength then replace with a
normal concat and a buf-Z if the strength are not both strong. The
original buf-Z should be removed to reduce the number of LPM devices).
The Verilog-A abs(), min() and max() functions can be converted if the
expressions do not have side effects. Also note the new, null and class
property operators from SystemVerilog are not supported.
We can not convert SystemVerilog strings or dynamic arrays to valid vlog95.
This patch adds an error message that they are not supported. There are still
issues with converting some of the dynamic array constructs (the compiler
crashes), but the message is printed before the crash.
This patch adds support for SystemVerilog packed arrays and adds sorry
messages for generate blocks as well as the new SV final and
fork/join_any/join_none statements.
Rework the nexus emitting code to correctly translate most I/O ports.
Fix a few other expression issues uncovered when port translation was
done correctly. Ignore and warn that the SV ++/-- operators and enum
types are not translatable. More updates of the nexus debug code.
This patch adds the ability to print a constant string in a
structural context. It also fixes the argument order for
structural function calls and makes a few improvements in
nexus identification.
This patch uses the new function (ivl_logic_is_cassign) to determine
if a logical was really the base of a continuous assignment. This
allows creating code that more closely matches the original.
This patch adds support for correctly handling most unconnected ports.
Most important is top level ports that are the root of the conversion.
This patch also adds support for emitting more signed constructs when
they are requested. $signed() and $unsigned() are still not supported
or recognized as an error when not emitting signed constructs.
This patch adds support for emitting escaped identifiers and adds
code to correctly emit most module port expressions/definitions.
There are some minor code optimizations/cleanup included as well.
The logic_lpm.c file uses the nexus private data pointer as an
unsigned counter. This patch makes the value unsigned long to
avoid a compilation warning on 64 bit systems.
This patch adds support for emitting fixed CA selects (zero based
variable bit and array selects also work), emitting a for statement
as a single statement and fixes for numerous little bugs. It also
adds the start of emitting module port information.
This patch adds the rest of the functionality needed to correctly
emit both L-value and R-value procedural variable indexed part
selects as a concatenation of variable bit selects.
This patch adds copyright information for the Icarus generated UDPs
(lesser GPL version 2.1). It also prints a note to let the user know
that this copyrighted code is being included in the output file. They
can then remove the primitives if needed. These are likely only
needed when the output is from synthesis. At the moment we only have
a positive edge D-FF. In the future a negative edge FF and D latches
will also be needed.
Add a preliminary gate name and range (zero based) for logic primitives.
Also assert that a logic gate in a continuous assignment has the correct
number of inputs/outputs.
This patch fixes the following bugs in the vlog95 converter:
When emitting a signal as an expression, if the signal is local then
emit the expression that is driving the local signal.
The casts need to emit the expression.
When emitting pull devices they have different default strength rules
(pull is the default).
For compatibility pull devices should only have a single output net.
Extend the code that searches for the <var> = <delay> <value> pattern
to also check for an <event>. The previous event code only looks for
the repeat event pattern.
This patch adds a flag that emits file and line information for
most lines. This can help the user understand where the various
lines came from in the original code. They are printed as
comments so the generated code still runs correctly.
When emitting a logical device as part of a continuous assignment
we need to use the actual inputs (not the output). We also do not
need to emit anything if the nexus is NULL. Also skip logical gates
that have a local output since they are part of a continuous
assignment and the inputs to a logical gate can be an expression
so emit them as a continuous assignment.
This patch adds the following to the vlog95 converter.
Add support for emitting and calling UDPs.
Generate a UDP for a synthesized DFF.
Add the ability do emit a constant assigned to a net.
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.