#!/usr/local/bin/perl # Run this script on the PLA's cif file extracted from magic # This script changes the name of the ground net from GND to gnd # and the name of the power net from Vdd to vdd and changes all # labels to the text layer while (<>) { # this section changes the GND to gnd if ($_ =~ /^94 GND(.* )[^ ]*;/){ print "94 gnd".$1."TXT;\n"; } # this section changes Vdd to vdd elsif ($_ =~ /^94 Vdd(.* )[^ ]*;/){ print "94 vdd".$1."TXT;\n"; } # this section moves all labels to the text layer elsif ($_ =~ /(^94.* )[^ ]*;/){ print $1."TXT;\n" } else { print $_ } }