[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Math functions and PLI



Matt -

On Sun, Dec 16, 2007 at 06:19:38PM -0800, Matt Ettus wrote:
> I found this package to do sin and cos from PLI:
>    http://www.chris.spear.net/pli/math.htm
> But I can't get it to run with Icarus.  I get the following errors
> when I compile:

Cool.  I postponed writing my own long enough that I can use
someone else's!  Well, after the bugs are shaken out, that is.

There's some lint in math.c that we can clean up later.  Mostly
it needs the appended patch, and to be compiled like this:

$ iverilog-vpi math.c
[ delete a bunch of nearly innocuous warnings ]
Making math.vpi from  math.o...
$ 

Unfortunately, when I go to use the result I still get the
messages that Matt reports.  Steve, what am I missing?

   - Larry

--- math-spear.c	2007-12-16 22:10:20.000000000 -0800
+++ math.c	2007-12-16 22:38:33.000000000 -0800
@@ -118,7 +118,7 @@
 
 
 /*******************************************************************************
-Everything after this point is for Verilog-XL
+Everything after this point is for Verilog-XL  */
 
 // XL uses a routine to get the size of the return argument - is this right?
 int math_size()
@@ -137,5 +137,10 @@
     {0} // final entry must be 0
 };
 
+// // Icarus Verilog compatibility
+static void veriusertfs_register(void)
+{
+	veriusertfs_register_table(veriusertfs);
+}
+void (*vlog_startup_routines[])() = { &veriusertfs_register, 0 };
 
-*******************************************************************************/


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user