Commit Graph

40 Commits

Author SHA1 Message Date
Cary R fcb543d6e5 Some cppcheck cleanup 2025-10-12 17:37:50 -07:00
mole99 d7c6d7ce76 Fix memory leak and add vpi_release_handle() 2023-09-04 15:20:31 +02:00
mole99 b8ae6b1686 Fix port bit index 2023-09-04 11:31:35 +02:00
mole99 a1440ced86 Add support for annotation of input and output vectors 2023-09-04 09:20:19 +02:00
mole99 11c944f5e9 Cleanup 2023-08-29 09:54:39 +02:00
mole99 37119b1504 Remove some unnecessary output 2023-08-23 12:56:11 +02:00
mole99 7beadb92f8 Framework of the INTERCONNECT implementation 2023-08-23 12:56:10 +02:00
Cary R 017a68c193 Update SDF warnings to include SDF file/line information 2023-06-25 20:12:43 -07:00
mole99 34dc10d798 SDF: Implement warning for wildcard cell instanciation 2023-06-15 10:35:05 +02:00
Cary R 956f6ccf4c Update VPI routines to on error signal VVP to return non-zero 2021-01-20 23:50:53 -08:00
Martin Whitaker 4a8f4d65d0 Fix spelling of pulsere_flag in vpi_user.h (from Pablo Bleyer). 2019-11-12 18:01:39 +00:00
Cary R 21418c6a41 Fix a couple memory leaks in $sdf_annotate() 2017-11-16 19:42:07 -08:00
Larry Doolittle 6ebb57195b Fuss with C function prototypes
119 formal void parameters added to keep -Wstrict-prototypes happy.
Process found one real missing prototype in vpi/vcd_priv.h:
EXTERN void vcd_names_delete(struct vcd_names_list_s*tab);
8 such warnings left, all in Tony's code
2014-07-08 13:44:11 -07:00
Cary R e4476d544f Improve SDF warnings to separate name and scope
Some of the SDF warnings were mixing some of the scope path with the
instance name. These are now separated into just scope and instance name.
There was also a place where vpi_get_str() was being called twice in a
single print statement. This is illegal since vpi_get_str() uses a single
buffer and multiple calls will overwrite the buffer.
2014-04-25 13:56:01 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Larry Doolittle 5d977cac73 Brainless start to const-correct changes
Results of running
cd vpi
for f in *.c *.h; do sed -i \
  -e "s/_calltf(PLI_BYTE8/_calltf(ICARUS_VPI_CONST PLI_BYTE8/" \
  -e "s/_compiletf(PLI_BYTE8/_compiletf(ICARUS_VPI_CONST PLI_BYTE8/" $f; done
and a trivial patch to vpi_user.h to, among other things, make
ICARUS_VPI_CONST blank.

Thus, this patch does absolutely nothing.  Will be followed by a
(much shorter) patch that makes it do something.  :-)
2010-10-06 15:08:54 -07:00
Stephen Williams ec49f10e2d Revert bad merge from vhdl branch 2010-10-02 11:02:27 -07:00
Cary R 21d15ceece Fix the compiler and modpath scaling of real delays.
A real delay must be scaled and rounded using the local precision
before it is finally scaled to the simulation time units. This
patch fixes the compiler to do this correctly or generate the
correct code for run time calculated delays. Delays in a CA
already worked correctly. The run time was also fixed to scale
modpath (SDF back annotation) delays correctly.
2010-06-18 16:11:54 -07:00
Cary R d508960a9e Fix space issues in VPI directory 2010-05-23 17:19:59 -07:00
Cary R ecacd7bae9 Make sure to call vpi_config.h first.
vpi_config.h defines _FILE_OFFSET_BITS. This must be defined before
any system includes files are processed, so vpi_config.h must be
called first. This patch puts vpi_config.h first. It also removes
direct calls for both vpi_config.h and vpi_user.h when sys_priv.h
is included since it already includes these two files.

It also updates the code to always include vpi_user.h using double
quotes.
2010-05-17 20:51:59 -07:00
Cary R f2d5acabd5 Add support for vpiUserSystf iteration, etc.
This patch adds support for iterating over the list of vpiUserSystf
tasks/functions that have vpiUserDefn set. The vpiUserDefn property
is true by default, but you can call vpip_make_systf_system_defined()
to set this property false (will hide the vpiUserSystf object). All
the normal system tasks/functions have been modified to call this
procedure to remove them from the list of vpiUserSystf objects. Only
user defined system tasks or functions should appear in the list.

vpi_compare_objects() is just a simple are the two pointers the
same. This works correctly for the vpiUserSystf objects, but the
other handle objects have not been checked.
2010-04-13 20:54:59 -07:00
Cary R 301bbe94a0 Set negative absolute SDF delays to zero.
The SDF standard allows negative absolute delays, but simulation
tools cannot handle this so set negative delays to zero.
2010-04-02 17:06:44 -07:00
Cary R 47f1286819 Add support to select min/typ/max delays from the SDF file.
This patch adds support to select either the min, typ or max
delay depending on what was used by the compiler.
2010-03-22 17:54:09 -07:00
Cary R fa1160c4ab Fix/enhance readmem/writemem routines, etc.
This patch adds compilef routines for the readmemb/h and
writememb/h system tasks. It also fixes some errors related
to arrays with negative range values. You can not specify a
negative address in the file, but arrays with negative range
values or negative start/finish argument to the tasks are
supported. It also generates an error when reading invalid
character from the input file.

A significant amount of the code is common between the two
styles of tasks so this has been grouped into common
routines.

It also adds a common routine for getting a string that will
be used as a file name. This routine is used by any task
that requires a file name value. If a filename has a
non-printable character it will be displayed as a \octal
constant to show what the character is.

Updates the dumping routines to match each other better,
improves some error messages and fixes a bug in the LXT2
dumper when dumping greater than 32 bit delays.
2009-02-26 20:46:02 -08:00
Cary R 9f0e0c6c55 Add support for the other edges in a SDF file.
This patch adds support for the other edges 01, 10, etc. These still
need to be verified in the context of IOPATHs, but they are ignored
in the timing checks and that's what was needed.
2009-02-10 11:51:36 -08:00
Cary R bb799e7e8f SDF files can have null delays.
A SDF file can have null delays and for that case you are to use
the existing delay value (do not change it). This patch adds that
functionality.
2009-02-10 11:47:04 -08:00
Cary R 284ba55764 Update the $sdf_annotate() compiletf and other fixes.
This patch updates the compiletf for $sdf_annotate() to better
check the arguments and to display the file and line location
when an error/warning does occur. It does the same for the
calltf messages. It also fixes a couple of subtle bugs.

First we need to look for a NULL string not a NULL value. The
result buffer should always be defined so will never be NULL.

Next if a scope has no modules we should return like the module
was not found (return 0) vs asserting.
2009-02-05 16:29:02 -08:00
Stephen Williams 03c31808e1 Make $sdf_annotate resilient to missing delay paths.
The $sdf_annotate function needs to handle the special (and probably
ver rare) case that there are no paths in the target module.
2009-01-28 20:44:15 -08:00
Stephen Williams 3aaea46144 Content-free portability fixes.
These are patches from ITOH Yasufumi and Larry Doolittle of pr2120948.
They change nothing, but make the code compile with older compilers.
2008-09-29 18:06:47 -07:00
Larry Doolittle 59b2d23c64 chip away at compile-time warnings
1 x format string (real bug)
2 x uninitialized variable (potential bugs),
1 x parentheses around assignment used as truth value (shut up compiler)
2008-01-03 14:44:48 -08:00
Stephen Williams f28dfb6178 Better SDF error handling
Handle basic errors like incorrect or missing SDF files.
2007-12-15 15:25:25 -08:00
Stephen Williams 97f7a97db7 NoEdge IOPATHS may match multiple specify paths.
An IOPATH in the SDF file may match all specify paths no matter
the conditions or edge specifications.
2007-12-14 21:04:20 -08:00
Stephen Williams a14d836be3 Support annotation of edge paths
Parse SDF file annotations of edge sensitive delay paths.
Add vpi support for getting the specified edge sensitivity of
an edge sensitive path, and annotate paths with proper attention
to the edge that is specified for the path.
2007-12-13 20:42:06 -08:00
Stephen Williams f602687187 Support second argument of sdf_annotate
The second argument of $sdf_annotate is the scope that is to be
annotated. The argument is optional, and the default is to annotate
the current scope, where the $sdf_annotate is invoked.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-30 21:57:38 -08:00
Stephen Williams fde334a5d2 Handle empty INSTANCE name
Handle the special case that the SDF CELL instance is empty. In this
case, the SDF file is requesting the current scope instead of an
instance within the scope.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-28 18:17:01 -08:00
Stephen Williams d92e7d904f Handle hierarchical instances
Iterate through hierarchical names created by the SDF
parser, and follow the scopes to the cell.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-27 21:44:25 -08:00
Stephen Williams 5af8fff980 Command line control of warnings
Implement extended vvp command line options to control the amount
of detail that the sdf annotator emits while parsing the source
file.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-22 18:22:46 -08:00
Stephen Williams 4986e550b1 Pass SDF delays into simulation
Pass parsed SDF delays into the vvp run time as vpiScaledRealTime
variables, and handling the mapping of 2-values to 12-delays.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-22 17:34:51 -08:00
Stephen Williams 73e60f4b81 Match parsed IOPATH to cell and modpath to be annotated. 2007-11-20 22:20:22 -08:00
Stephen Williams c5950e3aa6 Add stub $sdf_annotate function.
Add the $sdf_annotate function infrastructure, and a stub parser
that can parse miniman SDF files.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-18 17:36:03 -08:00