Commit Graph

81 Commits

Author SHA1 Message Date
Cary R c9077bd0be For scheduled put values save the string and free it after the put.
Users expect that vpi_put_value() will keep a copy of the string
that is passed to it. This patch implements this buy copying the
string and then freeing it after the actual put_value call.
2008-11-19 20:21:03 -08:00
Martin Whitaker 04377151bc Checks for illegal use of automatically allocated variables.
This patch adds a number of compile and run-time checks for illegal
uses of variables declared in automatic tasks and functions. It
also adds a check for event expressions in automatic tasks that use
features not yet supported in VVP.
2008-11-11 20:45:19 -08:00
Cary R 2c7fe8aa2a Fixes for real VPI interface, etc.
This patch fixes some problems found when trying to dump words
from a real wire array. There are still a few more things that
look suspicious and need testing.
2008-10-30 21:41:28 -07:00
Larry Doolittle 66949122cf Non-controversial whitespace cleanup
Nothing to do with tab width!  Eliminates useless
trailing spaces and tabs, and nearly all <space><tab>
pairings.  No change to derived files (e.g., .vvp),
non-master files (e.g., lxt2_write.c) or the new tgt-vhdl
directory.

Low priority, simple entropy reduction.  Please apply
unless it deletes some steganographic content you want
to keep.
2008-09-04 21:31:30 -07:00
Cary R 5e512e6570 Finish $clog2 function.
This patch fixes problems in the initial $clog2 implementation
and adds correct functionality to the runtime.
2008-08-20 09:01:21 -07:00
Cary R e501bbdd27 Fix problems in VPI callback time and value formats.
This patch adds support for vpiScaledRealTime and vpiSuppressTime
to VPI callbacks. It also fixes a bug where the callback data
object was not being copied correctly and adds support for
vpiSuppressVal. This requires adding vpiSuppressVal to a few
other routines. It adds the ability for a callback to return
more than vpiScalarVal (all values supported by the
vpip_vec4_get_value() procedure). It also fixes a bug where
vpip_vec4_get_value() would incorrectly return vpiZ for a BIT4_X
scalar value. It also comments the potentially dangerous
vpiScalarVal calculation in the vvp_fun_signal::get_value()
procedure.
2008-08-20 08:52:09 -07:00
Stephen Williams 6521ceaf92 Union scope and parent pointers for signals.
If a signal is part of an array, then it can get its scope from its
parent, so the scope and parent pointers can go into a union.
2008-06-14 16:17:25 -07:00
Larry Doolittle eed4ff7e2d Spelling fixes
Mostly comments, but includes quite a few
user-visible error, debug, and help messages.
2008-06-13 08:51:28 -07:00
Cary R d0e154b830 Clean up dump routines and support of MemoryWord dump.
This patch cleans up the dump routines and adds file and
line number information for errors. It also adds some of
the missing MemoryWord properties so they can now be
dumped and monitored correctly.
2008-06-03 21:04:22 -07:00
Cary R 72b4256872 Return 0 when vpi_handle_by_name() is called with an unsupported object.
vpi_handle_by_name() was assuming it was always given a valid scope
object. In the context of vpi_chk_error() this is not required and
some users use/abuse the interface by calling the function with invalid
objects expecting a 0 return value. This patch adds an explicit check
for the supported types vpiScope and as an extension vpiModule.
Anything else should be flagged as an error once we have vpi_chk_error()
implemented, but for now it just returns 0.
2008-05-15 10:46:53 -07:00
Larry Doolittle b99206ac8e avoid two unnecesary compile-time warnings 2008-05-01 18:34:03 -07:00
Stephen Williams 10ea9904f1 Clean up more vvp_bit4_t encoding dependencies. 2008-04-23 11:16:24 -07:00
Stephen Williams 40fd07d46e Remove most dependencies on vvp_bit4_t encoding.
Remove dependencies on vvp_bit4_encoding outside of the vvp_net
core types. The table_functor_s class was the worst offfender and
was barely used, so it is now removed completely. There are a few
opcodes in vhtread.cc that also make vvvp_bit4_t encoding
assumptions (and used casts) and those have been fixed. There
were also various VPI interface functions that are fixed.
2008-04-20 19:21:41 -07:00
Cary R 86301be3d2 Remove unused return_event_flag.
This patch removes the unused return_event_flag variable.
2008-03-18 21:44:13 -07:00
Stephen Williams e0fbc15bd4 Support vpiForceFlag and vpiReleaseFlag for nets.
vpi_put_value can mimic force and release with vpiForceFlag and
vpiReleaseFlag flags to the vpi_put_value call. With this patch,
the infrastructure is added to allow the flags argument to be passed
to the dispatched put_value function, and for signals handle those
flags as force/release of a net.
2008-03-10 21:54:58 -07:00
Larry Doolittle 39dd22ace4 Adjust unusual spacing
minimal changes, nearly eliminates oddball/inconsistent
source code use of whitespace
2008-02-19 09:15:03 -08:00
Larry Doolittle e6ea5cd409 More lint removal
tgt-vvp/eval_expr.c  uninitialized variables
vpi/sys_display.c  uninitialized variables
vvp/vpi_priv.cc  deprecated string constant usage
vvp/vpi_vthr_vector.cc  deprecated string constant usage

the last entry invokes vpip_name_string() and uses const char *
in the same way as the other 9 callers in vvp/*.cc, the only
difference is that the argument is static instead of computed.
2008-01-04 16:12:33 -08:00
Larry Doolittle 752cf21790 Warnings and spelling fixes.
Correct a variety of spelling errors, and eliminate
a variety of compile time warnings.
2007-12-17 17:42:09 -08:00
Larry Doolittle 103138cf4b Fix compile time warnings
These warnings actually look a lot like errors.
2007-12-01 18:04:43 -08:00
Cary R bf49400fb2 Add vpiIterator and vpiMemory to string version of vpiType
This patch adds both vpiIterate and vpiMemory to the list of
types that can be displayed as strings.
2007-11-29 22:41:47 -08:00
Cary R 51293b6e91 Fix/enhance array part select code.
This patch fixes/enhances the array part select code. It also
verifies that any lval array index in a continuous assignment
is a constant value. Also, %set/av now uses index register 1 as
described in the documentation (as a bit offset).
2007-11-07 20:52:56 -08:00
Cary R 3258b7726b Pass local scope precision from compiler to vvp/etc.
This patch adds ivl_scope_time_precision() to the compiler which can
be used to extract the local scope precision. tgt-stub and tgt-vvp
have been modified to use this new function and output a value that
is appropriate. The vvp runtime has been altered to use this new
data which is accessed with the vpip_time_precision_from_handle()
function. vpiTimePrecision uses this function to return the correct
precision.
2007-09-28 15:08:02 -07:00
yang yun ju 9d39b3a514 Access to modpaths via VPI
Add support for accessing the modpath nodes via PLI,
and add support for the vpi_set_delays and vpi_put_delays
functions to set the delays on those paths.

- GSoC 2007
2007-09-10 15:30:00 -07:00
Cary R 81a45cdc5f Make vpi_put_value to a real accept an integer value and add diagnostic code.
Modified the code that deals with real variables to accept an integer
value when using vpi_put_value(). Also added some type of diagnostic
message for all switch defaults that have an assert(0) to indicate an
error condition, removed CVS comments and removed a small section of
unreachable code.
2007-08-29 20:02:12 -07:00
Cary R 6653202e91 Enhance vpi_handle_by_name to accept either a scope or a module.
It appears that other simulators allow the second argument to
vpi_handle_by_name to be either a scope or a module. Allowing
a module in addition to a scope significantly increases the
usability of this function.
2007-08-16 14:36:06 -07:00
Cary R 951f9f2bbf Add vpiType to the vpi_get_str() function.
vpi_get_str() can now return a reasonable value for most of the
types used in vvp. I'm not certain I got all of them, but they
are easy to add if any are missing. I also fixed a couple of
typos that I found while looking for all the different types.
2007-08-16 10:48:28 -07:00
Cary R a359ec45f7 Pass the finish and stop system task argument correctly.
The argument passed to $finish and $stop is not currently used, but it
is now passed down to the functions that may someday do something
useful with it (schedule_finish() and schedule_stop() in vvp/schedule.cc).
2007-07-20 14:01:35 -07:00
steve 401faef5b8 Fix vpi_get_value vpiRealVal of signed constants. 2007-04-18 01:57:07 +00:00
steve fb7ce1d330 Support for vpi_get_value of scaler values. (ravi@bluespec) 2007-04-12 04:45:52 +00:00
steve ae88f5cc68 Lint fixes. 2007-03-07 00:38:15 +00:00
steve 85ceea7358 Fix missing check for thread bits width in ADDI 2007-01-31 22:28:55 +00:00
steve 5f5a6b5396 Cleanup vpi_const to use vec4 values. 2006-03-06 05:43:15 +00:00
steve 0c73f209de Be more careful with double types. 2005-12-05 21:19:55 +00:00
steve 3607fb584d Support UDP initial values. 2005-06-09 05:04:45 +00:00
steve 42433f4df9 Add support for notif0/1 gates.
Make delay nodes support inertial delay.
 Add the %force/link instruction.
2005-06-02 16:02:11 +00:00
steve a7ae8adf9b Support delayed/non-blocking assignment to reals and others. 2004-05-19 03:26:24 +00:00
steve 2d7380c03b PRototypes match the standard. 2004-02-18 17:52:00 +00:00
steve 17c891bc9c Fix type mismatches of various VPI functions. 2004-02-18 02:51:59 +00:00
steve e8a222e783 Fix mingw portability problems. 2003-06-25 04:04:19 +00:00
steve 996d4c76db vpi_handle diagnostic message. 2003-06-22 04:19:26 +00:00
steve bbdf03b457 1) setlinebuf() for vpi_trace
2) Addes error checks for trace file opens
 3) removes now extraneous flushes
 4) fixes acc_next() bug
2003-06-17 16:55:07 +00:00
steve 0555a5f182 vpi_trace of vpi_free_object. 2003-05-30 04:08:28 +00:00
steve 2e3ce49400 Arrange for mcd id=00_00_00_01 to go to stdout
as well as a user specified log file, set log
 file to buffer lines.

 Add vpi_flush function, and clear up some cunfused
 return codes from other vpi functions.

 Adjust $display and vcd/lxt messages to use the
 standard output/log file.
2003-05-15 16:51:08 +00:00
steve 04d32a4d4c Return all 64bits of time in vpi_get_time. 2003-05-15 01:24:46 +00:00
steve 78a2ef04a9 Add put_value with transport delay. 2003-05-02 04:29:57 +00:00
steve 60229d96a5 Support vpiScaledRealTime. 2003-04-27 04:19:24 +00:00
steve 380a52cde7 More detail in vpi tracing. 2003-03-14 05:02:34 +00:00
steve c2ce8bb26b Add VPI_TRACE tracing of VPI calls.
vpi_handle_by_name takes a const char*.
2003-03-13 04:34:18 +00:00
steve 385a688830 Add VPI tracing. 2003-03-12 02:50:32 +00:00
steve ef47ea31fa Use hashed name strings for identifiers. 2003-03-06 04:32:00 +00:00