A Mechanistic Design
Desperate engineers worked around this limitation in the layout tool by writing scripts that parse
the layout tool's data files and insert
rules directly into the file, applying them to an entire bus at a
time.
The layout tool stores each circuit connection in a
net list
file, which looks something like this:
Net Name Component.Pin
-------- -------------
Xyz0 A.0, B.0
Xyz1 A.1, B.1
Xyz2 A.2, B.2
. . .
It stores the layout rules in a file format something like this:
Net Name Rule Type Parameters
-------- --------- ----------
Xyz1 min_linewidth 5
Xyz1 max_delay 15
Xyz2 min_linewidth 5
Xyz2 max_delay 15
. . .
The engineers carefully use a naming convention for the nets so that
an alphabetical sort of the
data file will place the nets of a bus together in a sorted file. Then their script can parse the file
and modify each net based on its bus. Actual code to parse, manipulate, and write the files is just
too verbose and opaque to serve this example, so I'll just list the steps in the procedure.
1. Sort net list file by net name.
2.
Read each line in file, seeking first one that starts with bus name pattern.
3. For each line with matching name, parse line to get net name.
4. Append net name with rule text to rules file.
5. Repeat from 3 until left of line no longer matches bus name.
So the input of a bus rule such as this:
Bus Name Rule Type Parameters
-------- --------- ----------
Xyz max_vias 3
would result in adding net rules to the file like these:
Net Name Rule Type Parameters
-------- --------- ----------
. . .
Xyz0 max_vias 3
Xyz1 max_vias 3
Xyz2 max_vias 3
. . .
I imagine that the person who first wrote such a script
had only this simple need, and if this were
the only requirement, a script like this would make a lot of sense. But in practice, there are now
dozens of scripts. They could, of course, be refactored to share
sorting and string matching
functions, and if the language supported function calls to encapsulate the details, the scripts could
begin to read almost like the summary steps above. But still, they are just file manipulations. A
different file format (and there are several) would require starting from scratch, even though the
concept of grouping buses and applying rules to them is the same.
If you wanted richer
functionality or interactivity, you would have to pay for every inch.
What the script writers were trying to do was to supplement the tool's domain model with the
concept of "bus." Their implementation infers the bus's existence through sorts and string
matches, but it does not explicitly deal with the concept.
Do'stlaringiz bilan baham: