Commit Graph

195 Commits

Author SHA1 Message Date
Larry Doolittle b23faff27c Just a few more spelling fixes
Includes some user-visible messages
2015-06-17 08:09:34 -07:00
Martin Whitaker b242663cae Support negedge flip-flops in synthesis and in vvp.
Also extend the support for FF asynchronous set values to vvp and
fix the dff functor in vvp to correctly model asynchronous set/clr
behaviour.
2015-06-13 16:47:57 +01:00
Stephen Williams 725ed869ba Remove dead %load/vp0 instructions and related infrastructure
Also remove some &A<> and &PV<> symbols that use this now dead
infrastructure.
2014-11-19 09:02:21 -08:00
Stephen Williams a98f21aa65 Merge branch 'master' into vec4-stack
Conflicts:
	elab_lval.cc
	netmisc.cc
	tgt-vvp/eval_object.c
	tgt-vvp/vvp_process.c
	vvp/codes.h
	vvp/compile.cc
	vvp/opcodes.txt
	vvp/vpi_tasks.cc
	vvp/vpi_vthr_vector.cc
	vvp/vthread.cc
2014-10-21 09:12:02 -07:00
Maciej Suminski 1a4edcac48 vvp: Accepts continuous assignment for 2-state nets. 2014-10-10 16:16:46 +02:00
Stephen Williams 98799ff7fa Allow class properties to be arrayed.
This adds the runtime support for class properties that are classes
to be arrayed. Add a means to define the dimensions of a property
in the vvp format, and add functions for setting/extracting elements
of a property.
2014-09-15 17:37:30 -07:00
Stephen Williams dec4cd5071 Handle arrays of class objects.
This goes all the way down to the vvp level, where we create support
for arrays of objects, generate the new code in the -tvvp code
generator, and elaborate the arrays in the first place.
2014-08-30 10:18:57 -07:00
Stephen Williams e8b8fcba57 Support declaring queue variables all the way to vvp.
Nothing actually useful happens here, but the declarations
are functional.
2014-08-21 16:44:45 -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
Stephen Williams 0f85bf0b9a Basic DFF asynchronous set/reset synthesis support. 2014-06-15 18:22:02 -07:00
Stephen Williams f8dc430fe5 Add synthesis support for casez statements.
This generates an EQZ LPM device that carries the case-z-ness to
the code generator.

Also add to the vvp code generator support for the EQZ device so
that the synthesis results can be simulated.

Account for the wildcard devices in the sizer.
2014-06-13 18:01:41 -07:00
Stephen Williams d55e4c0552 Redesign support for system functions that return vec4
Redsign the handling of the return value, including a rework of
the %vpi_func syntax to carry the needed information.

Add a few more arithmetic operator instructions.
2014-01-04 22:06:58 +00:00
Cary R b0b6be0d23 Class properties are optional 2013-05-14 14:59:31 -07:00
Stephen Williams 1d314faf97 bool .net8 objects?
This is rather a pointless sort of thing, but it does turn from
from time to time, for example when constant literals (with no x or
z bits) are given strengths. So handle .net8/2s and .net8/2u the
same as .net8.s and .net8 objects.
2013-02-02 17:38:24 -08:00
Stephen Williams 751587e112 PV-to-concat belnding should use a strength-aware concat. 2013-02-02 10:44:16 -08:00
Stephen Williams 074055bc58 Implement static arrays of strings.
This means extending the vvp to add .array/str objects and
include instructions to access the array. Also add the parser
and code generator support.
2013-01-05 15:57:58 -08:00
Stephen Williams fbd2843cad Runtime support for arrays of atom2 types.
This handles all of the atom integer types in unpacked arrays.
2013-01-03 11:33:47 -08: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 3e7adbeda0 Stub class object variables.
Create stub class objects at the vvp level and generate the code
to invoke that stub. Implement the routines needed to implement
a test for null object references.
2012-12-10 19:13:43 -08:00
Stephen Williams a5fd5363b3 Rewire real value expressions to use a stack instead of register space.
This will hopefully improve performance slightly, but also this
intended as a model for what to do when I get around to doing the
same thing to other data types.
2012-10-22 17:20:43 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Cary R 4313fbbf1f Fix space errors in various files 2012-08-16 11:13:32 -07:00
Martin Whitaker 5aa97b379d Add missing semi-colons in parser rules.
Plus a few minor spelling/formatting fixes.
2012-08-01 15:38:36 -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
Stephen Williams dc39714d65 Support string literal strings in the vvp runtime.
This also advances support for string expressions in general.
Handle assignments to string variables in the code generator by
trying to calculate a string expression. This involves the new
string object thread details.
2012-07-22 10:52:06 -07:00
Stephen Williams d48362b861 First pass at getting strings to work.
In vvp, create the .var/str variable for representing strings, and
handle strings in the $display system task.

Add to vvp threads the concept of a stack of strings. This is going to
be how complex objects are to me handled in the future: forth-like
operation stacks. Also add the first two instructions to minimally get
strings to work.

In the parser, handle the variable declaration and make it available
to the ivl_target.h code generator. The vvp code generator can use this
information to generate the code for new vvp support.
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 6662a3f78a Better VPI reference to part of array word.
Create the &APV<> token in vvp that create a VPI handle for a
part of an array word. This works better with things like $monitor.
2012-01-10 18:22:52 -08:00
Cary R 609c038484 Add more support for signed enumerations in SV.
This patch add support for passing if the enumeration is signed or not
to the run time. This is really only needed for debug and VPI access.
2011-09-25 09:56:02 -07:00
Cary R 9fb317a4e1 A vpiBitVar can have a non-zero LSB and can be unsigned.
The general bit variable can be either signed or unsigned and can
have a non-zero LSB.
2011-09-11 11:47:39 -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 06447817d3 Add support for tracing procedural statements.
This patch adds support for tracing procedural statement execution in vvp.
This is accomplished by adding a new opcode that is inserted before the
code that represents a procedural statement. These opcodes also trigger
a message whenever time advances. By default these opcodes are not added.
To add them, pass the -pfileline=1 flag to the compiler. In the future we
may add support for turning the debug output on and off once the opcodes
have been added with a system task or from the interactive prompt.
2011-03-01 18:45:29 -08:00
Stephen Williams 16e1570737 Merge branch 'master' into work2
Conflicts:
	elab_scope.cc
	net_nex_input.cc
	t-dll-api.cc
	vvp/parse.y
2010-11-28 08:38:40 -08:00
Stephen Williams 8a91931d49 Properly handle base-type logic enumerations.
The next()/prev() methods need to know of the base type
so that the comparisons can go right.
2010-11-21 17:24:46 -08:00
Stephen Williams 0c72dfe60f Initial implementation of $ivl_method$next/prev
Create the v2009.vpi module to include SystemVerilog core
functions, and start out with some of the enum methods.

Add to vvp support for creating enum types, including some
vpi access methods.
2010-11-17 20:00:23 -08:00
Cary R a4a7b0a09d Make ivl_alloc.h the last include so it doesn't effect any system includes.
In ivl_alloc.h we redefine malloc(), realloc() and calloc() to have
standard error checking. We don't want to do this for anything that
comes from the standard headers. This specifically doesn't work if
a C++ header files does std::malloc, etc.

Also change to -W instead of -Wextra since that is more portable. I
plan to add a check from -Wextra and use it when available since it
is more descriptive.
2010-11-02 10:51:57 -07:00
Stephen Williams 3733c59e49 Merge branch 'work1' 2010-10-21 19:31:49 -07: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 cb86fb15bf Add error checking definitions for malloc(), realloc() and calloc()
This patch adds defines that translate all malloc(), realloc() and calloc()
calls into ones with error checking when ivl_alloc.h is included.
2010-10-14 17:39:23 -07:00
Stephen Williams 4643872fc6 Generate .net/2x records for IVL_VT_BOOL type nets.
The code generator writes out the proper .net/2x records for
atom2 types, and the vvp run-time parses and interprets those
records.
2010-10-10 19:39:58 -07:00
Stephen Williams 6a0cbc5fa8 VPI access to atom2 types.
Create the .var/2u and .var/2s variable records and give them
basic implementations. Make available to VPI the proper types
for the SystemVerilog types that these variables represent.
2010-10-10 10:06:27 -07:00
Cary R 314714997f Add support for variable UDP delays.
This patch adds support for a UDP with variable delays. In the process the
intrinsic support for delays was removed from the UDP functor and replaced
with a call to the .delay functor. Both a normal gate and a UDP now use the
same code to generate the delay.
2010-07-30 18:59:29 -07:00
Cary R 13fb07dc17 Add support for only two variable delays and add delay checks.
This patch adds checks that the delay count is correct for the
various gates and adds support for a missing variable decay
time. For this case the decay time is the minimum of the rise
and fall times. This is denoted by setting the decay variable
to 0 in the vvp file. vvp notes this and sets an ignore decay
time property in the base delay. This turns off the ability
to set the decay time and the minimum delay calculation will
also update the decay time.
2010-07-13 18:23:16 -07:00
Cary R 3f6aff47c9 Add run time support for calling system functions as task.
This patch adds two new opcodes and the infrastructure needed to call
system functions as tasks. The normal %vpi_call will generate an error
if a system function is called as a task. %vpi_call/w will generate a
warning and will ignore any value returned by the function. %vpi_call/i
will ignore the system function return value and will not print a
message. Adding this is a feature request and is supported in
SystemVerilog. Next I need to add flags to control this depending on
the compiler generation and possibly other flags.

I may leave the cast to void (%vpi_call/i) functionality unimplemented
for now.
2010-06-11 15:39:16 -07:00
Cary R 1993bf6f69 Remove malloc.h support and for C++ files use <c...> include files.
The functions (malloc, free, etc.) that used to be provided in
malloc.h are now provided in cstdlib for C++ files and stdlib.h for
C files. Since we require a C99 compliant compiler it makes sense
that malloc.h is no longer needed.

This patch also modifies all the C++ files to use the <c...>
version of the standard C header files (e.g. <cstdlib> vs
<stdlib.h>). Some of the files used the C++ version and others did
not. There are still a few other header changes that could be done,
but this takes care of much of it.
2010-06-01 08:56:30 -07:00
Martin Whitaker c9f0d7e28f Fix for initial value propagation (part 1).
To match the behaviour of other simulators, delayed bit-based signals
should have the value 'x' and delayed real valued signals should have
the value 0.0 until the true initial value has propagated. This patch
provides this behaviour.
2010-04-13 19:22:21 -07:00
Cary R 07bedc4e35 Add support for passing the delay selection to the VPI interface.
This patch adds support for passing the delay selection to the
VPI interface. It adds a new property to both the vpi_get and
vpi_get_str calls to return the current delay selection. It also
defines three constants for minimum, typical and maximum
delay selections.
2010-03-16 15:43:14 -07:00
Cary R e241586bcf Add support for passing the delay selection to vvp.
This patch adds support for passing the delay selection to vvp.
It adds a new header :ivl_delay_selection "<value>"; that has
the values TYPICAL, MINIMUM or MAXIMUM depending on the -T
flag to iverilog. This information is needed by $sdf_annotate
to select that appropriate value for a triplet when
"TOOL_CONTROL" is specified (default).
2010-03-16 15:43:06 -07:00
Stephen Williams 8247d3ef45 The .alias for nets is no longer useful.
In the olden days, the .alias was necessary to create a net name
that is an alias to an existing net in the netlist. But now that
the .net no longer creates a node in the netlist, ALL .net objects
are aliases of a sort, so this (mis)feature gets in the way.
2009-10-14 21:40:15 -07:00
Cary R 98c39cfa24 Add support for .part/v.s
This patch adds support for .part/v.s. A variable part select with
a signed select expression in a continuous assign.
2009-09-22 17:31:37 -07:00