5. Future Wish list, upgrades etc.
This Application comes with *NO WARRANTY* from the Author(s) and/or maintainer(s). It is just a piece of useful C-code that we thought would be useful to the NC users across the globe. Please feel free to send in your comments to the maintainer Srinivasan Venkataramanan @ mailto:[email protected]_SPAM (Remove NO_SPAM).
I
sincerely thank Martyn Pollard of Cadence for helping me to get started
on this valuable Application
Note. My sincere thanks are also to the original Author of this
Application, Lee Tatischeff (email [email protected]_spam ).
I haven't done many improvements yet on this, but will try and do as and when possible. One significant enhancement is support for SLASH (/) as hierarchical separator – which is done, infact one could use a mixture of both / and : though I am sure no one would like to do it J. Please do send in your inputs/comments.
This application implements a "spy" function as a foreign procedure in NC-VHDL Simulator.
Usage:
my_spy_proc(":some:undriven:destination:signal",":then:some:source:signal");
OR
my_spy_proc("/some/undriven/destination/signal","/then/some/source/signal");
The application will setup a process, which updates the value of the destination signal (first parameter) with the value of the source signal (second parameter).
Notes:
-
Both parameters are strings, and therefore must be
enclosed in double quotes (").
- You may use this procedure inside a VHDL Process or in the concurrent portion (see the example in this page for more).
- Hierarchy separator is the colon (:) and/or slash (/). If some other separator is required, please contact the maintainer Srinivasan Venkataramanan @ mailto:[email protected]_SPAM (Remove NO_SPAM).
- On either parameter, if the initial colon (:) is omitted, that parameter is assumed to be local to the existing scope.
- The path may not include or traverse Verilog. If the design is mixed language, but there is no verilog in either path, this application will behave correctly.
- Escaped identifiers are not supported.
- Source and destination signals must be of same type and range.
- The destination signal must be otherwise undriven.
- The VHDL procedure should be declared as follows:
package my_spy is
procedure my_spy_proc (
destination : IN string;
source : IN
string
);
attribute foreign of
my_spy_proc : procedure is "spylib:spy_proc";
end;
- It is a good idea to declare a package body which will report an error if the foreign C library is not being used properly:
package body my_spy is
procedure my_spy_proc (
destination : IN string;
source : IN string
) is
begin
assert false
report "ERROR:
foreign subprogram my_spy_proc was not called"
severity error;
end;
A simple example is provided as a tar file, just download the tarred, gzipped file and do:
·
gunzip
·
tar xvf
·
cd nc_my_spy
·
Please take a look at the simple run.ksh
script, you may need to modify the CDS_INST_DIR variable etc.
·
If you are using Sun Solaris it should work just
fine, other OS may need some fine tuning (like setting the proper ARCH variable
etc.).
·
The example VHDL file example_spy.vhd shows two ways
of "accessing" internal signals using two different hierarchy
separators such as slash (/) and colon (:).
·
I am using gcc as C-compiler - you may wish to
change it to cc, if so edit the Makefile provided.
There are a few critical "improvements" that I personally feel are important in this valuable application such as
· Range Checking,
· Type Checking etc.
Also it will be of IMMENSE
help if the binary Object files can be provided for all the major platforms so
that the users won’t need to have a C compiler and compile on their own.
Unfortunately at this moment I have only SUN at my disposal, so am providing
the “Shared Object file” for SUN Solaris. If any one of the potential users
can provide me with compiled versions for other OS I would really appreciate
it.
Please do mail me @ mailto:[email protected]_SPAM (Remove NO_SPAM) if you have any clever ideas/suggestions on top of these. Also any “upgrades" themselves are most Welcome J Since I am doing this in my free time I can't promise any due date for any of the above features.
Hope you find it useful.
Have fun J,
Srinivasan
You are Visitor Number:
![]()