4 views
Skip to first unread message

Alexandre Rusev

unread,
Nov 29, 2020, 4:38:19 PM11/29/20
to electr...@googlegroups.com
Looking into Electric docs I don't see extensible explanation ("Creating new technologies") how scaling rules are coded for nodes in XML file.

I need to parse code implementation to make it out ...

Could anyone point out document, where scaling of teh nodes in XML is explained?

Steven Rubin

unread,
Nov 29, 2020, 4:58:07 PM11/29/20
to electr...@googlegroups.com

The only scaling rules available for a technology are the "scale units" that convert lambda distances (the scalable value) to nanometers. This scale appears near the top of the XML file and is controllable from the "Technology / Units" Preferences. There is no way to adjust the details of a technology from this scale.

   -Steven Rubin

--
You received this message because you are subscribed to the Google Groups "Electric VLSI Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electricvlsi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/electricvlsi/CACoSTqLSHPBSZK9ENt-X-S5-a2Lyqkdqxj9QDW4vB6fdVLJ%2Bpw%40mail.gmail.com.

Adam Joseph

unread,
Dec 1, 2020, 8:28:59 PM12/1/20
to electr...@googlegroups.com

On Mon, 30 Nov 2020 00:38:05 +0300
Alexandre Rusev <cybe...@gmail.com> wrote:
> Looking into Electric docs I don't see extensible explanation
> ("Creating new technologies") how scaling rules are coded for nodes
> in XML file.

It is complicated. I remember struggling with this (especially "box"
vs "lambdabox"), got it encoded into my Java classes and then never
looked at it again. I seem to recall that it wasn't explained in the
documentation and I had to read the Electric source code (which is why
Electric is awesome: because you can actually do that!)

> Could anyone point out document, where scaling of teh nodes in XML is
> explained?

The comment at the top of this class should be helpful, it is sort of
my personal gripe about the part that took me the longest to understand:

https://gitlab.com/westernsemico/com.westernsemico.vlsi/-/blob/master/src/com/westernsemico/vlsi/sw/electric/techxml/ScaledBox.java

I wrote that comment (and the code) back when it was fresh in my mind.
What follows is based on my current recollection, which is much less
fresh.

Basically when you see stuff like this:

<box klx=".." kly=".." khx=".." khy="..">
<lambdaBox klx=".." kly=".." khx=".." khy=".."/>
</box>

It means that the thing you're defining will be sized by scaling
something else. The "something else" is usually the nodeBase. For each
axis (x or y) and each edge (the lower "l" edge or higher "h" edge) you
take that edge on that axis from the "something else", FIRST you
MULTIPLY it by the value in the <box> tag and THEN you ADD the value in
the <lambdaBox> tag. Note FIRST/THEN and MULTIPLY/ADD.

For example,

<box klx="2" kly="3" khx="2" khy="3">
<lambdaBox klx="0" kly="0" khx="100" khy="99"/>
</box>

This will produce a scaled result by:

+ multiplying the lesser x edge (klx) by 2 and adding 0
+ multiplying the higher x edge (khx) by 2 and adding 0
+ multiplying the lesser y edge (kly) by 3 and adding 100
+ multiplying the higher y edge (khy) by 3 and adding 99

So the end result is that the scaled box will be four times as wide
(2+2) and six times as tall (3+3) as its nodeBase, and its origin will
be at (100,99) instead of at (0,0)

Steve, if I got that wrong I apologize. It was a few years ago that I
worked this out and wrapped it in Java and haven't dealt with it since.

- a
Reply all
Reply to author
Forward
0 new messages