Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Am 26.03.2013 17:28, schrieb Zoran Stojkovic:
Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Mir ist nicht klar, wie Sie auf P kommen?
"P.pin.direction" erzeugt einen Syntax error.
Hier ein funktionierendes Beispiel:
if (schematic) {
schematic(SCH) {
SCH.parts(PA) {
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR) {
if (dlgMessageBox(PA.name+" : " + P.name + "\nHurra kein
PAS oder PWR", "OK", "ESC") != 0) exit(-9);
}
}
}
}
}
}
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
--
______________________________________________________________
Alfred Zaffran Support
CadSoft Computer GmbH Hotline: 08635-698930
Pleidolfweg 15 FAX: 08635-698940
84568 Pleiskirchen eMail: <alf@cadsoft.de>
Web: <www.cadsoft.de>
Registergericht: Amtsgericht Traunstein HRB 5573
Geschäftsführer: Thomas Liratsch
______________________________________________________________
EAGLE V6.4 availabe now!
Am 27.03.2013, 09:22 Uhr, schrieb A. Zaffran <alf@cadsoft.de>:
Am 26.03.2013 17:28, schrieb Zoran Stojkovic:
Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Mir ist nicht klar, wie Sie auf P kommen?
"P.pin.direction" erzeugt einen Syntax error.
Hier ein funktionierendes Beispiel:
if (schematic) {
schematic(SCH) {
SCH.parts(PA) {
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR) {
if (dlgMessageBox(PA.name+" : " + P.name + "\nHurra kein
PAS oder PWR", "OK", "ESC") != 0) exit(-9);
}
}
}
}
}
}
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
UPS, mein Fehler. Zu wenig Input:
Ich möchte für ein FPGA eine "Netzliste" ausgeben, d.h. alle
angeschlossenen Netze in einer Datei haben.
Hierfür wäre es schön, wenn die Versorgungsleitungen und passiven pins
weggelassen werden.
folgender code funktioniert (ein Ausschnitt):
schematics(SCH) {
SCH.nets(N) {
N.pinrefs(P) {
if(P.part.name == partname) // check if e.g. "U1"
if(P.pin.direction != 1 && P.pin.direction != 6)
printf("%s\t%s\t%s\n", N.name, P.pin.contact.name, P.pin.name);
}
}
}
mache ich das mit PIN_DIRECTION_PAS usw., dann funkt's nicht.
ich habe Ihren code eingebaut:
SCH.parts(PA) {
if(PA.name == partname) {
printf("%s:\n",partname);
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR)
printf("%s\t%s\t%s\n", P.net, P.contact.name, P.name);
}
}
}
}
Hier kommt kein Netzname (P.net) zurück (leerer String) und es werden auch
fast (?) alle pins ausgegeben.
So ganz verstehe ich das nicht.
Danke,
Zoran
Am 27.03.2013 10:00, schrieb Zoran Stojkovic:
Am 27.03.2013, 09:22 Uhr, schrieb A. Zaffran <alf@cadsoft.de>:
Am 26.03.2013 17:28, schrieb Zoran Stojkovic:
Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Mir ist nicht klar, wie Sie auf P kommen?
"P.pin.direction" erzeugt einen Syntax error.
Hier ein funktionierendes Beispiel:
if (schematic) {
schematic(SCH) {
SCH.parts(PA) {
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR) {
if (dlgMessageBox(PA.name+" : " + P.name + "\nHurra kein
PAS oder PWR", "OK", "ESC") != 0) exit(-9);
}
}
}
}
}
}
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
UPS, mein Fehler. Zu wenig Input:
Ich möchte für ein FPGA eine "Netzliste" ausgeben, d.h. alle
angeschlossenen Netze in einer Datei haben.
Hierfür wäre es schön, wenn die Versorgungsleitungen und passiven pins
weggelassen werden.
folgender code funktioniert (ein Ausschnitt):
schematics(SCH) {
SCH.nets(N) {
N.pinrefs(P) {
if(P.part.name == partname) // check if e.g. "U1"
if(P.pin.direction != 1 && P.pin.direction != 6)
printf("%s\t%s\t%s\n", N.name, P.pin.contact.name, P.pin.name);
}
}
}
mache ich das mit PIN_DIRECTION_PAS usw., dann funkt's nicht.
ich habe Ihren code eingebaut:
SCH.parts(PA) {
if(PA.name == partname) {
printf("%s:\n",partname);
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR)
printf("%s\t%s\t%s\n", P.net, P.contact.name, P.name);
}
}
}
}
Hier kommt kein Netzname (P.net) zurück (leerer String) und es werden
auch fast (?) alle pins ausgegeben.
P.net ergibt einen Syntax error!
Richtig ist ==>> P.pin.net
So ganz verstehe ich das nicht.
Danke,
Zoran
Hier das funktionierende Beispiel:
string PinDir[];
PinDir[PIN_DIRECTION_NC] = "Not connected";
PinDir[PIN_DIRECTION_IN] = "Input";
PinDir[PIN_DIRECTION_OUT] = "Output (totem-pole)";
PinDir[PIN_DIRECTION_IO] = "In/Output (bidirectional)";
PinDir[PIN_DIRECTION_OC] = "Open Collector";
PinDir[PIN_DIRECTION_PWR] = "Power-Input-Pin";
PinDir[PIN_DIRECTION_PAS] = "Passiv";
PinDir[PIN_DIRECTION_HIZ] = "High-Impedance-Output";
PinDir[PIN_DIRECTION_SUP] = "Supply-Pin";
string PartName = "U1";
string s;
schematic(SCH) {
SCH.nets(N) {
N.pinrefs(P) {
if(P.part.name == PartName) { // check if e.g. "U1"
if(P.pin.direction != PIN_DIRECTION_PWR && P.pin.direction !=
PIN_DIRECTION_PAS) {
sprintf(s, "%s\t%s\t%s\t%s\t%s\n", P.pin.net, P.part.name,
P.pin.contact.name, P.pin.name, PinDir[P.pin.direction]);
if (dlgMessageBox(s, "OK", "ESC") != 0) exit(-27);
}
}
}
}
}
Aber Achtung: wenn keine Part U1 in der Schaltung ist, wird nichts
ausgegeben!
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
--
______________________________________________________________
Alfred Zaffran Support
CadSoft Computer GmbH Hotline: 08635-698930
Pleidolfweg 15 FAX: 08635-698940
84568 Pleiskirchen eMail: <alf@cadsoft.de>
Web: <www.cadsoft.de>
Registergericht: Amtsgericht Traunstein HRB 5573
Geschäftsführer: Thomas Liratsch
______________________________________________________________
EAGLE V6.4 availabe now!
Am 27.03.2013 10:00, schrieb Zoran Stojkovic:
Am 27.03.2013, 09:22 Uhr, schrieb A. Zaffran <alf@cadsoft.de>:
Am 26.03.2013 17:28, schrieb Zoran Stojkovic:
Hallo!
Ich habe da mal eine Frage.
Bei meiner ulp funktioniert
if(P.pin.direction != 1 && P.pin.direction != 6)
aber
if(P.pin.direction != PIN_DIRECTION_PAS && P.pin.direction !=
PIN_DIRECTION_PWR)
funktioniert nicht.
Weiß jemand warum?
Danke,
Zoran
Mir ist nicht klar, wie Sie auf P kommen?
"P.pin.direction" erzeugt einen Syntax error.
Hier ein funktionierendes Beispiel:
if (schematic) {
schematic(SCH) {
SCH.parts(PA) {
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR) {
if (dlgMessageBox(PA.name+" : " + P.name + "\nHurra kein
PAS oder PWR", "OK", "ESC") != 0) exit(-9);
}
}
}
}
}
}
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
UPS, mein Fehler. Zu wenig Input:
Ich möchte für ein FPGA eine "Netzliste" ausgeben, d.h. alle
angeschlossenen Netze in einer Datei haben.
Hierfür wäre es schön, wenn die Versorgungsleitungen und passiven pins
weggelassen werden.
folgender code funktioniert (ein Ausschnitt):
schematics(SCH) {
SCH.nets(N) {
N.pinrefs(P) {
if(P.part.name == partname) // check if e.g. "U1"
if(P.pin.direction != 1 && P.pin.direction != 6)
printf("%s\t%s\t%s\n", N.name, P.pin.contact.name, P.pin.name);
}
}
}
mache ich das mit PIN_DIRECTION_PAS usw., dann funkt's nicht.
ich habe Ihren code eingebaut:
SCH.parts(PA) {
if(PA.name == partname) {
printf("%s:\n",partname);
PA.device.gates(G) {
G.symbol.pins(P) {
if(P.direction != PIN_DIRECTION_PAS && P.direction !=
PIN_DIRECTION_PWR)
printf("%s\t%s\t%s\n", P.net, P.contact.name, P.name);
}
}
}
}
Hier kommt kein Netzname (P.net) zurück (leerer String) und es werden
auch fast (?) alle pins ausgegeben.
P.net ergibt einen Syntax error!
Richtig ist ==>> P.pin.net
So ganz verstehe ich das nicht.
Danke,
Zoran
Hier das funktionierende Beispiel:
string PinDir[];
PinDir[PIN_DIRECTION_NC] = "Not connected";
PinDir[PIN_DIRECTION_IN] = "Input";
PinDir[PIN_DIRECTION_OUT] = "Output (totem-pole)";
PinDir[PIN_DIRECTION_IO] = "In/Output (bidirectional)";
PinDir[PIN_DIRECTION_OC] = "Open Collector";
PinDir[PIN_DIRECTION_PWR] = "Power-Input-Pin";
PinDir[PIN_DIRECTION_PAS] = "Passiv";
PinDir[PIN_DIRECTION_HIZ] = "High-Impedance-Output";
PinDir[PIN_DIRECTION_SUP] = "Supply-Pin";
string PartName = "U1";
string s;
schematic(SCH) {
SCH.nets(N) {
N.pinrefs(P) {
if(P.part.name == PartName) { // check if e.g. "U1"
if(P.pin.direction != PIN_DIRECTION_PWR && P.pin.direction !=
PIN_DIRECTION_PAS) {
sprintf(s, "%s\t%s\t%s\t%s\t%s\n", P.pin.net, P.part.name,
P.pin.contact.name, P.pin.name, PinDir[P.pin.direction]);
if (dlgMessageBox(s, "OK", "ESC") != 0) exit(-27);
}
}
}
}
}
Aber Achtung: wenn keine Part U1 in der Schaltung ist, wird nichts
ausgegeben!
Mit freundlichen Grüßen / Best regards
Alfred Zaffran
--
______________________________________________________________
Alfred Zaffran Support
CadSoft Computer GmbH Hotline: 08635-698930
Pleidolfweg 15 FAX: 08635-698940
84568 Pleiskirchen eMail: <alf@cadsoft.de>
Web: <www.cadsoft.de>
Registergericht: Amtsgericht Traunstein HRB 5573
Geschäftsführer: Thomas Liratsch
______________________________________________________________
EAGLE V6.4 availabe now!