There are approx. 47 out of 1455 subckts in PSPICE 9.1 libraries which contain X* subckt calls together with zero or more U* instances. Now this type of subckt can be translated to XSPICE.
This commit is contained in:
parent
9ed7a24a0e
commit
bd0f725776
|
|
@ -576,7 +576,8 @@ static struct card *u_instances(struct card *startcard)
|
||||||
models_ok++;
|
models_ok++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ciprefix("u", cut_line)) {
|
} else if (ciprefix("u", cut_line) || ciprefix("x", cut_line)) {
|
||||||
|
/* U* device instance or X* instance of a subckt */
|
||||||
if (subcktcard) {
|
if (subcktcard) {
|
||||||
if (repeat_pass) {
|
if (repeat_pass) {
|
||||||
if (!u_process_instance(cut_line)) {
|
if (!u_process_instance(cut_line)) {
|
||||||
|
|
|
||||||
|
|
@ -4239,11 +4239,16 @@ BOOL u_check_instance(char *line)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Check to see if the U* instance is a type which can be translated.
|
Check to see if the U* instance is a type which can be translated.
|
||||||
|
An X* instance of a subckt is allowed.
|
||||||
Return TRUE if it can be translated
|
Return TRUE if it can be translated
|
||||||
*/
|
*/
|
||||||
char *xspice, *itype;
|
char *xspice, *itype;
|
||||||
struct instance_hdr *hdr = create_instance_header(line);
|
struct instance_hdr *hdr = NULL;
|
||||||
|
|
||||||
|
if (ciprefix("x", line)) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
hdr = create_instance_header(line);
|
||||||
if (!hdr) {
|
if (!hdr) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
@ -4284,10 +4289,24 @@ BOOL u_process_instance(char *nline)
|
||||||
{
|
{
|
||||||
/* Return TRUE if ok */
|
/* Return TRUE if ok */
|
||||||
char *p1, *itype, *xspice;
|
char *p1, *itype, *xspice;
|
||||||
struct instance_hdr *hdr = create_instance_header(nline);
|
struct instance_hdr *hdr = NULL;
|
||||||
Xlatorp xp = NULL;
|
Xlatorp xp = NULL;
|
||||||
BOOL behav_ret = TRUE;
|
BOOL behav_ret = TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
if (ciprefix("x", nline)) {
|
||||||
|
/* An X* instance of a subckt is translated unchanged */
|
||||||
|
Xlate_datap xdp = create_xlate_translated(nline);
|
||||||
|
Xlatorp xlp = create_xlator();
|
||||||
|
(void) add_xlator(xlp, xdp);
|
||||||
|
append_xlator(translated_p, xlp);
|
||||||
|
if (ps_ports_and_pins & 4) {
|
||||||
|
printf("TRANS_IN %s\n", nline);
|
||||||
|
}
|
||||||
|
delete_xlator(xlp);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
hdr = create_instance_header(nline);
|
||||||
if (!hdr) {
|
if (!hdr) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue