source("your_input.gds")
target("your_output.gds")
# A = 1/0, B = 2/0 (example)
a = input(1, 0)
b = input(2, 0)
# run XOR and output to 2/0
x = a ^ b
x.output(2, 0)
# copy A to output
a.output(1, 0)
Thanks, Matthias! I haven't tried yet but I believe it will work.
I suggest you add some overview page with block diagram quickly describing each class with the connection between these classes. There are users like me who may not be ready to read through everything but just to quickly start with something. I searched in the documentation before asking but there is no easy way to quickly find that it is the Region class which will work for me. Now I found it and see the example code. I think that will save you a lot of time answering those elementary questions here. I am not that lazy, but without any general direction, I may give up after searching for a while because I have no idea how far I am to the destination. Just my two cents. Or maybe you already have that in the documentation. If so please redirect me to that page. Thanks!
Also, like for this XOR operation. I tried to search "XOR", "boolean" etc. I didn't find a page describing boolean operations and what class can be used as input.
Comments
DRC script?
Like this?
I suggest you add some overview page with block diagram quickly describing each class with the connection between these classes. There are users like me who may not be ready to read through everything but just to quickly start with something. I searched in the documentation before asking but there is no easy way to quickly find that it is the Region class which will work for me. Now I found it and see the example code. I think that will save you a lot of time answering those elementary questions here. I am not that lazy, but without any general direction, I may give up after searching for a while because I have no idea how far I am to the destination. Just my two cents. Or maybe you already have that in the documentation. If so please redirect me to that page. Thanks!
Also, like for this XOR operation. I tried to search "XOR", "boolean" etc. I didn't find a page describing boolean operations and what class can be used as input.
Hi, Matthias. I tried the code. It works. Thanks.