Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can HSPICE accept parameter as string which used in .so file?

Status
Not open for further replies.

Hyunseok

Newbie
Newbie level 1
Joined
Aug 9, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
19
Hi Guys,

I'm trying to use HSPICE circuit file using external library(.so file).
I can't find what is the problemes in below process.

1. .so file
In this external library, I want to input 'string'. So Here is sample C source code.
Code:
#include <stdio.h>
#include <string.h>

static double char_match(char *c1)
{
     if (strcmp(c1,'test_string'))
     {
         return 0;
     }
    else
    {
        return 100;
    }


2. .sp file
With this circuit description, string can't be imported to "char_match" function
Code:
*
.option CFLflag
.cfllib './sample_cfl2.so'
.cfl_prototype char_match(param)

.param p1=str('test_string')
.param p2=char_match(p1)
...



And Here is the debug message
Code:
**warning** (sample_cfl2.sp:xx) Parameter XXX is ignored
 Using CFL library ./sample_cfl2.so

  **error** (sample_cfl2.sp:9) Illegal character in statement in column   xx : char_match(p1)
  **error** (sample_cfl2.sp:9) Illegal character in statement in column   xx : char_match(p1)


Can anyone help?

[moderator action: added CODE tags]
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top