Hi,Matthias:
I found I cannot save to another filename after Boolean operations. Here is my code:
ac = input("1/0")
po = input("2/0")
gate = po.and(ac)
gate.output("3/0")
ly = RBA::Application::instance.main_window.current_view.active_cellview.layout
p=ly.cell_by_name(0) # <<< Is it the topcell name?
fn = "trial "+p.to_s+".OAS.gz"
opt = RBA::SaveLayoutOptions::new
opt.format="OASIS"
opt.oasis_compression_level=9
ly.write(fn, true, opt)
The view topcell is "L1". I want to save file to "trial L1.OAS.gz". But this script has error on define the p variable. Could you help me to correct my mistake?
Thanks!
arided
Comments
Hi arided,
"cell_by_name" returns the cell for a given name. The correct code to get the top cell name would be
And the active layout can now be obtained somewhat easier
All the above requires version 0.23.
If your intention is to produce another file as output of a DRC rather then writing to your original file, you can also use the "target" feature of the DRC engine. To obtain the current cell name, you can use "source.cell_name":
Matthias
Thank you! I will try to learn version 0.23 RBM again. I found it quite different with old veriosn with layer_process built-in simple script.
regards,
arided