Hints, Tips and Solutions

 

Volume 11, Number 9, September 2000

 

Q: It seems that seq_find() procedure does not work correctly: if you try the following code, you will see that the required object is not found (0 is displayed):

it = {};

seq_add_last(it, "vss");

seq_add_last(it, "vdd");

node = "vdd";

location = seq_find(it, node, 0);

display(location);

 

A: You must keep in mind the distinction between the LISA object and its value. You will readily find your 'node', if you modify the script as follows:

it = {};

node = "vdd";

seq_add_last(it, node);

location = seq_find(it, node, 0);

display(location);

 

On the other hand, LISA object is not similar to the notion of pointer from, e.g., the C language, as the modified script shows this:

it = {};

node = "vdd";

seq_add_last(it, node);

loc = seq_find(it, node, 0);

display(loc);

display(it[loc]);

node="!vdd";

loc1 = seq_find(it, node, 0);

display(it[loc]);

display(loc1); !

 

However if the last example makes you think that LISA object is too 'volatile', please try the following script:

it = {};

node = "vdd";

seq_add_last(it, node);

loc = seq_find(it, node, 0);

display(loc);

display(it[loc]);

node1=node;

node="!vdd";

node2="vdd";

loc1 = seq_find(it, node, 0);

display(it[loc]);

display(loc1);

loc2 = seq_find(it, node1, 0);

display(loc2);

loc3 = seq_find(it, node2, 0);

display(loc3);

node3 = it[loc];

loc4= seq_find(it,node3, 0);

display(loc4);

loc5= seq_find(it, it[loc], 0);

display(loc5);

 

Returning back to your question, I guess that the real issue was to fing the string "vdd" in the sequence 'it'.

This issue a little bit tricky due to the nature of a LISA sequence: unlike well-known arrays from other programming languages, it may contain objects of different types. For example, the following sequence if perfectly valid:

FOUND = FALSE;

cur=0;

last=ss.size;

loop begin

cur = cur + 1;

if (cur GTR last) then (leave loop);

if(ss[cur].type EQL string) then begin

if (string_match(ss[cur], "vdd"))

then (leave loop);

end;

end;

if(cur LEQ last) then (FOUND = TRUE);

if (FOUND EQL TRUE) then

(display("ss["&cur&"] = \""&ss[cur]&"\""))

else

(display("Power lost"));

Of course, if you are pretty sure that your sequence contains only strings, you may skip the type check. A good practice is to use string_match_exact() or other string procedures at will in this example and see what you find.

 

Q: In the layer setup, I cannot change the color of the layer by mouse clicking in the palette if initially the layer's color is black, i.e.,

RED=255, BLUE=255, GREEN=255.

A: To select color by mouse click in the palette, you must select two things:

(a) color shade. It is selected on the bigger color palette;

(b) color brightness. It is selected on the narrow vertical color strip.

The actual color you selected is shown in the box below the bigger palette. Please look at this box while clicking at different places of the VERTICAL color strip.

When you set (255, 255, 255) or (0 0 0) RGB values, e.g., using numeric fields, this means that you select either 100% brightness or 100% darkness. After this changing the color shade makes no difference: you will always get either black or white.

 

Q: Often I need to measure big objects. It order to position the ruler precisely I must zoon in at one end, zoom out that zoom again in at the other end. Is it possible too make this operation more convenient? For example, can I start the measurement in one window and finish it in another one?

A: Unfortunately, in the current versions of Expert all operations must start and end in the same window. A workaround is to combine the following two viewing commands:

View>>Previous View (default shortcut: ".") and

View>>Pan>>Pan to cursor (default shortcut: ".").

The latter one pans to cursor and zooms to grid resolution at the same time, so that it is easy to position a mouse precisely.

So, please try to execute the following commands:

  • select a larger view, with both start and end points for the ruler seen;

  • start the ruler tool and position the cursor near the start point;

  • View>>Pan>>Pan to cursor (shortcut: ".") to click the exact start point;

  • View>>Previous View (shortcut ".") for a coarser view to move cursor approximately into the ending area;

  • View>>Pan>>Pan to cursor (shortcut: ".") to click the end point with fine resolution.

By the way, it could be useful for other operations as well, as a replacement to zoom-full-zoom sequence.

 

Call for Questions

If you have hints, tips, solutions or questions to contribute, please contact our Applications and Support Department
Phone: (408) 567-1000 Fax: (408) 496-6080
email: support@silvaco.com