Commit Graph

230 Commits

Author SHA1 Message Date
Cary R d6b6b76015 Update header files to use a more standard name to prevent rereading
This is from github report #16. There are likely a few more issues
that need to be addressed though this takes care of the major ones.
2014-07-23 13:42:56 -07:00
Stephen Williams d5fb0f4344 Handle some tricky conditions assignments to parts.
When for example assigning to foo[<x>] within a contitional, and
doing synthesis, we need to create a NetSubstitute device to manage
the l-value bit selects.
2014-07-14 16:46:58 -07:00
Larry Doolittle 35a8485a44 Fix some weird lint found by clang
Small stuff, no behavior change expected.
2014-06-09 10:44:48 -07:00
Stephen Williams fa8d35ae9c Support nested l-value objects
This allows for syntax like a.b.c where a is a class with member
b, which is a class with member c, and so on. The handling is mostly
for the support of compound objects like classes.
2013-11-22 19:54:42 -08:00
Stephen Williams 37ac1ed474 Clean up dead code in ivl_lval_t handling. 2013-11-22 12:02:03 -08:00
Stephen Williams 68d83383ff Elaborate nested l-values.
This gets nested l-values to (but just short of) the ivl_target API.
Now the elaborator can process nested l-values, but I haven't figured
out how to present that at the ivl_target.h API.
2013-11-16 16:27:05 -08:00
Stephen Williams 3945b9df45 Elaborate darray new element initializer to ivl_target API 2013-10-19 15:34:15 -07:00
Stephen Williams 2030e06988 Parse/elaborate some array-patterns down to the ivl_target API. 2013-10-19 15:34:14 -07:00
Cary R d8f945be23 Add support for SV do/while 2013-09-16 20:02:09 -07:00
Stephen Williams 01b81e0dbc Implement the ivl_target ivl_scope_child functions.
These are a more convenient way of iterating through child scopes.
2013-08-01 17:28:03 -07:00
Cary R d08e0270e4 Add support for getting parameter MSB, LSB and sign from the ivl interface 2013-07-04 11:29:25 -07:00
Stephen Williams 8e559e4e91 Support shallow copy as far as the ivl_target API. 2013-04-27 19:54:13 -07:00
Stephen Williams b122ec2a1a parameter table in ivl_scope_s uses vector instead of C arrays. 2013-04-08 18:20:39 -07:00
Stephen Williams fb23493a98 Class methods down to the code generator
Emit the elaborated class methods. Also generate root scopes to
represent the classes in order to hold the methods. These scopes
can also in the future be used to implement static properties.
2013-03-24 15:12:35 -07:00
Stephen Williams 860419a346 Draft run-time support for SystemVerilog class objects.
This provides the ivl_target.h interface for class definitions
and expressions, the vvp code generator support for class objects
and properties, and the vvp run time support. Trivial class objects
now seem to work.
2012-12-10 19:20:02 -08:00
Stephen Williams 70dff035a2 ivl_target API for class types with properties. 2012-12-10 19:20:02 -08:00
Stephen Williams 318a4033b8 Flesh out class type elaboration
Add properties to the classes, and elaborate expressions that
have class properties. Describe class object property references
all the way down to the stub target.
2012-12-10 19:20:02 -08:00
Stephen Williams b6eb86d696 Blend new_darray and new_class expression nodes. 2012-12-10 19:13:43 -08:00
Stephen Williams 7a2ad01f2e Class new expressions, down to the ivl_target.h API. 2012-12-10 19:13:43 -08:00
Stephen Williams 77d24cd095 Elaborate class_new and (null) expressions
This gets the types right for class_new and null expressions, and
elaborate them down to the ivl_target.h API.
2012-12-10 19:13:43 -08:00
Stephen Williams a2d980540d Get some type information to the "new" expression for darrays. 2012-10-14 17:16:47 -07:00
Stephen Williams 4e76912331 ivl_target access to type information. 2012-10-14 17:16:47 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Stephen Williams 14f229de30 Parse support for dynamic arrays.
This includes limited support for dynamic arrays down to the code
generator, and some stubs in the vvp code generator and vvp run time.
2012-07-22 10:52:06 -07:00
Andrew Stevens 9b3d20239a Extend VPI and build to for SIMetrix cosimulation
Added: basic vpiPort VPI Objects for vpiModulkes
    vpiDirection, vpiPortIndex,   vpiName, vpiSize attributes

   Since ports do not exist as net-like entities (nets either side
   module instance boundaries are in effect connect directly in
   the language front-ends internal representation) the port information
   is effectively just meta-data passed through t-dll  interface and
   output as a additional annotation of module scopes in vvp.

Added: vpiLocalParam attribute for vpiParameter VPI objects

Added: support build for 32-bit target on 64-bit host (--with-m32
   option to configure.in and minor tweaks to Makefiles and systemc-vpi).
2012-06-07 08:00:02 -07:00
Stephen Williams 342646264e Merge branch 'pei1' 2012-05-25 16:32:12 -07:00
Stephen Williams 6e8aef8262 Get unpacked arrays working. 2012-05-25 15:58:29 -07:00
Stephen Williams 78b0b49a4e Support struct members that are packed arrays. 2012-05-22 17:31:25 -07:00
Stephen Williams 3e4f8b625f Get packed signals working through to simulation in some situations.
When dynamic indexing of early dimensions is not needed, we can get
pretty far with getting packed arrays to work.
2012-02-10 17:17:59 -08:00
Stephen Williams 3dabb2970d Get compressed assignment opcodes through to the ivl_target API. 2011-11-27 16:46:02 -08:00
Martin Whitaker 5fc1a9c9e0 Fix for pr3368642.v.
The vvp target code generator may not elide a BUFZ if the output of
the BUFZ is connected to a net that is the subject of a procedural
force statement.
2011-08-07 11:15:16 -07:00
Cary R eb0df40a73 Add a routine to say if a logical came from a CA and some other fixes.
This patch adds code that allows the targets to determine if a logical
gate came from a continuous assignment. This helps some of the targets
generate code that more closely matches the input.

It also reworks/simplifies the synthesis of && and || since the
compiler has already converted the two operands to single bit form
and fixes a mismatched delete from a previous patch.
2011-03-23 11:39:38 -07:00
Larry Doolittle e9fda22ad9 Spelling fixes
Mostly then/than confusion.  All comments or README files,
except for one user-visible change in a tgt-vlog95 error message.
2011-03-14 16:28:36 -07:00
Cary R 1e3af45335 Pass some module port information and fix a few bugs.
This patch adds some preliminary module port information to the ivl
interface. This may change as I investigate exactly what is needed.
It also fixes a few minor bugs (a missed local variable and spacing)
2011-03-08 19:15:28 -08:00
Cary R a6220fe562 Add support for passing variable indexed part select type information
This patch modifies the compiler and the ivl interface to pass the
type of indexed part select that is being represented (up/down) in
a procedural L-value or R-value. This is needed by any back end that
wants to correctly denormalize the (zero based) base expression.
2011-02-28 19:15:48 -08:00
Cary R 53abd7a5b2 Add support for getting the original port names of a UDP definition.
This patch adds support to the compiler/ivl interface for getting the
original UDP definition port names. ivl_udp_port() was added to get
this information.
2011-02-28 18:38:15 -08:00
Cary R 629ee5b899 Fix a number of file/line issues in the compiler.
This patch fixes a bunch of objects to have the correct file/line
information. It also adds support for getting file/line information
for events (named events have a definition line).
2011-02-10 19:10:21 -08:00
Cary R 427aef8cc4 Add more file/line and scope information to the ivl interface, etc.
This patch adds/fixes the following:

  Adds file/line information to a UDP definition.

  Prints an error message if a UDP is passed signals wider than 1 bit.
  A UDP should supports a range, but the compiler currently does not.

  Add scope information for constants.

  Fix the Icarus extension UDP table entry element 'h' to use h.

  The ivl_udp_init() value is a char not unsigned.

  Add FILE_NAME() for a bunch more of the ivl interface objects.
2011-02-10 19:04:08 -08:00
Cary R f01b25b60c Add support for ivl_const_{file,lineno}
This patch adds support for ivl_const_file() and ivl_const_lineno()
to the target interface.
2011-01-31 12:10:03 -08:00
Cary R 69ec4cfc6d Add support for ivl_logic_{file,lineno}
The logic devices were missing the file/line number interface. This patch
adds the routines and propagates the information as needed.
2011-01-18 17:17:18 -08:00
Stephen Williams de215f1f8d Describe enum type to code generators
This gets the enumeration type through to the ivl_target API so
that code generators can do something with it. Generate stub
output with tgt-stub, and generate the proper vvp run time to
make simple enumerations work from end to end.
2010-11-20 15:09:32 -08:00
Stephen Williams 9c634e1640 Add a net node for casting to IVL_VT_BOOL values.
BOOL values have a specific cast from LOGIC, this node takes care
of it. Also arrange for the elaboration to insert them in the right
planes and for the code generator to generate them.
2010-10-16 10:53:20 -07:00
Cary R 03f6283203 Add support for calling system functions as a task (SystemVerilog)
This patch adds the ability to call a system function as a task for
the SystemVerilog generation (-g2009). The return value is really
calculated, but it is ignored.
2010-08-13 20:05:23 -07:00
Cary R 86653ddff9 Remove some cppcheck warnings.
This patch modifies the code to remove some more cppcheck warnings.
2010-07-30 18:50:52 -07:00
Cary R 2bf3f5d1d3 Push tranif delays to the code generator.
This patch pushes delays for tranif gates to the code generator.
We still need to add checks for the number of delays, etc. For
now an error message is printed when a tranif gate is given a
non-zero delay.
2010-07-13 16:04:05 -07:00
Stephen Williams 33e52c50c0 Handle special case bit selects if unsized 0/-1.
Unsized constant 0 and -1 are pretty special, and part selects
of these values can be handled very specially.
2010-03-05 19:36:54 -08:00
Stephen Williams 7311047f80 Optimize code generator scope access / tweak ivl_net_const performance
Child scopes need to be accessed quickly, so use O(LogN) maps for
the children instead of O(N) lists.

Also, ivl_net_const_s objects exist in huge abundance for some kinds
of designs, so put some effort into reducing their memory footprint.
2009-12-10 13:24:27 -08:00
Cary R 636758f66d Add support for `celldefine, vpiCellInstance
This patch adds real functionality for `celldefine and pushes this
property to the run time which can access this with vpiCellInstance.
This is technically only available for a module, but all scopes
have the property and only modules should return true when the
'endmodule' is between a `celldefine and `endcelldefine directive.
2009-05-23 14:13:47 -07:00
Cary R 158e9fd2be Keep the left and right array range value order information.
Previously Icarus normalized the results so array [7:0] would
be the same as array [0:7]. This works just fine for
simulation, but the VPI calls can select the left or right
value and this was incorrect for the [7:0] case since it was
being normalized to [0:7]. This patch swaps the two values in
the a.out file and from this creates the previous first/last
values and a new flag that can be used to get the correct
left and right values for the VPI interface.
2009-02-24 07:33:42 -08:00
Cary R 5ae86bd6b4 Add support for 64 bit delays in procedural non-blocking assignments.
This patch adds support for 64 bit non-blocking delays in procedural
code. We fixed the procedural delay operator (blocking delays) earlier.
This patch mostly mimics what was done there. The continuous assignment
delay operator still needs to be fixed.
2009-02-17 10:32:11 -08:00