Commit Graph

13 Commits

Author SHA1 Message Date
Cary R 2d6622e543 vlog95: for a 32-bit width we can generate a signed undefined value 2014-12-08 21:09:36 -08:00
Cary R f0a0ab100f vlog95: trim binary constants to save space and emit size of undef. consts.
This should not change the functionality, but to save space trim any
unneeded bits from a binary constant. Also for the case of emitting
a signed undefined value when the allow signed flag is not set add
the width to the constant.
2014-12-08 13:08:30 -08:00
Cary R 96d793ed6b vlog95: switch to C99 real number classification routines 2014-09-05 15:18:13 -07:00
Larry Doolittle 642acb4082 Clean up some more sign-compare issues
The only known problems left are in files imported from gtkwave,
if not for them you could turn on -Wsign-compare.

Assumes c99 for c code, so the scope of for-loop indexes can be made sane.
2014-06-17 12:57:26 -07:00
Cary R adff837399 Remove some new cppcheck warnings in tgt-vlog95 2012-09-03 11:58:43 -07:00
Cary R d5b5fbd274 vlog95: Don't emit the \n, \t, \" or \\ values as octal constants.
1364-1995 Verilog allows the \n, \t, \" or \\ string escape sequences
so use them when emitting a string.
2012-01-06 19:34:28 -08:00
Cary R dab982f39b vlog95: Major rework of nexus emitting code, etc.
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.
2012-01-02 11:29:42 -08:00
Cary R 8b8e181fe2 vlog95: Print structural string constants and a few other fixes
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.
2011-04-20 17:50:41 -07:00
Cary R 12df29af55 Fix space issues.
Thsi patch removes space before end of line, etc.
2011-04-20 17:26:52 -07:00
Cary R 087f4794af vlog95: Print double values correctly and clean up string emitting.
This patch adds code to make sure a double (Verilog real) constant
is printed correctly. It also adds code to trim any leading escaped
NULLs from an expression string.
2011-03-23 11:56:45 -07:00
Cary R ceaa79e95d vlog95: Add support for most unconnected ports and more signed support.
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.
2011-03-23 11:38:05 -07:00
Cary R e375b26f78 vlog95: Add support for escaped ids and most module ports
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.
2011-03-14 16:53:59 -07:00
Cary R 8744c4279d vlog95: Add CA support, other enhancements, refactoring and bug fixes.
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>
2011-01-31 14:41:58 -08:00