I have some analog designs I want to make complime...
# magic
w
I have some analog designs I want to make complimentary versions of (nmos swapped with pmos and power rails flipped). Anyone scripted something similar in magic before? I was thinking of flattening the design and then selecting specific layers and replacing them with the complementary version. But magic is alters layers when they overlap and such, so that would be very order sensitive (and might not work at all?). it seems I might just be better off stripping out all the active stuff and only keep my routing, mirror everything, and then instantiate replacement nmos and pmos where the old pmos and nmos were?
t
The "compose" section of the tech file has methods for turning N types to P and P types to N. Generally, painting nwell over an N region will turn everything to P, and painting "pwell" over a P region will turn everything to N. If that doesn't work, then the "compose" section needs to be adjusted.
p
What about saving it to .mag and then doing search/replace on the file?
t
@Philipp Gühring: Also a good way. Never underestimate the power of the text editor to get things done when the file format is ASCII. . .