Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to export GDS file of each layer?

Status
Not open for further replies.

CongJ

Newbie level 5
Joined
Dec 4, 2022
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
62
I have some GDS files, and they are all multi-layers.

How can I get the single-layer GDS file of them?

e.g., the original GDS file consisting of 10 layers. I want to get 10 GDS files from it; each GDS file is one layer of the original GDS file.

Besides, since I want to process several files, it should be achieved using command lines rather than GUI operations so that I can write a script to extract them automatically.

Thanks for your kind help.
 

How can I get the single-layer GDS file of them?

Why do you want to do that? What is your target software/system? GDSII is designed to support multiple layers in one file, so all (?) software supporting GDSII can deal with that.

Long ago, my company did some GDSII translators, and we used this GDSII file format description:

If you are targeting another format/system anyway, how about this?

This also looks useful:
 
Last edited:

If you want to go at it the hard way, flatten it all to "0 x" data,
save that, then make 10 layouts where you select-all with
layer filtering and delete "everything that's not art".

If you are importing to a modern CAD system you might be
able to do it efficiently by streaming in, and then streaming out
against each of 10 "runt layer tables" that ignore "all but XXX".
 

Why do you want to do that? What is your target software/system? GDSII is designed to support multiple layers in one file, so all (?) software supporting GDSII can deal with that.

Long ago, my company did some GDSII translators, and we used this GDSII file format description:

If you are targeting another format/system anyway, how about this?

This also looks useful:
Hello Volker,

Thanks for your answer.

I want to get each layer of the GDS files to transform them into images for view.

I have tried to do this using gdspy, but it seems complicated, so I am in here and asking for help.
 

If you want to go at it the hard way, flatten it all to "0 x" data,
save that, then make 10 layouts where you select-all with
layer filtering and delete "everything that's not art".

If you are importing to a modern CAD system you might be
able to do it efficiently by streaming in, and then streaming out
against each of 10 "runt layer tables" that ignore "all but XXX".
Hello friends,

Thanks for your answer.

I think your advice is what I need.

Can it be done using virtuoso or innovus software?

And could you give me some more detailed advice?

I am a freshman in this, so it is tough for me.

Thanks again for your kind help.
 
Last edited:

You say the goal is to get per-layer images (like layer check-plots?). If so, why not just toggle layer visibility and "export image"? If the databases themselves have no value except as intermediate step, jump over.
 

You say the goal is to get per-layer images (like layer check-plots?). If so, why not just toggle layer visibility and "export image"? If the databases themselves have no value except as intermediate step, jump over.
Thanks for your answer,

Can this operation be done using the command line?

I can achieve it using the GUI of virtuoso or klayout software, but it is so complicated.

Thanks,
blues.
 

I'm afraid there is no "plug and play" solution that you can use without writing some code yourself.

All these tools enable automation, it just depends on your programming skills which solution is easiest.

I'm currently looking into gdspy (Python code). That library can read and write GDSII and enables layer /datatype filtering when iterating over objects in your cells. My estimate is that you can solve your problem with ~100 lines of Python code using gdspy.

During my tests, I will have your task in mind and see if I can create something. Do you also need to separate by purpose (GDSII: datatype) or just by layer? Do you have a fixed list of layers, or need a universal solution that works with any technology?
 

Hello Volker,

Thanks for your kind help.

I just need to separate the GDS file by layer. And the layers list is not fixed.

Someone else told me that I can achieve it using the StreamOut function of the virtuoso software. Changing the layermap file can export the GDS file with just one layer.

But I am still trying.
 

Someone else told me that I can achieve it using the StreamOut function of the virtuoso software. Changing the layermap file can export the GDS file with just one layer.

Yes, that is the most simple solution.

Just in case you are still interested in automation, I have attached a simple Python script that I created using gdspy.
Usage: gdspy_extractsinglelayer <input.gds> <layernum>

Output is a flat (no hierarchy) GDSII file with that one layer, polygons and paths. Paths are converted to polygons. I just tested with a few layouts, no extensive testing!

Good luck!
Volker
 

Attachments

  • gdspy_extractsinglelayer.zip
    892 bytes · Views: 134

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top