Hello! I was also following along Glayout: Coding ...
# ieee-sscs-dc-24
s
Hello! I was also following along Glayout: Coding a Simple Example (via stack) youtube video instructions and created a folder inside
OpenFASOC/openfasoc/generators/glayout/glayout/flow/blocks/
(as mentioned) and created a folder VIA and inside placed via.py which has the code shown in the video. And offcouse, when I create a file in the above location, I don't have a way to call
Copy code
from glayout.flow.pdk.gf180_mapped  import gf180_mapped_pdk  as gf180
as I am inside the
glayout/flow/blocks/
folder. How you wanted to place our files? I have followed the installation instructions and the test_glayout.py runs file inside the docker with Klayout+Klive And, How do you suggest to try out the example notebooks, that you shared in the
OpenFASOC/docs/source/notebooks/glayout
in this folder based hierarchy quite afraid to trying anything as that might create problems later down the line, when pushing my Cells. My question would be, Where to place our own files for testing and how (and where) to run the notebooks from?
c
Please refrain from posting solutions by yourself, ask someone for approval first, we might not want a part of that solution in the code
👍 1
s
Will remove and repost as reply only! Is the approach with example notebooks good?
The solution of the relative path problem would be, adding the following lines in any file which is in the blocks folder for example if I have
blocks/VIA/via.py
then adding the following works
Copy code
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
Thanks @Chetanya Goyal for suggesting the add. I guess, with the example notebooks, we can place then in the same personal folder inside the blocks and add this line to run them. Please correct me if wrong!
And would be useful, if you guys kindly see and post about the
relative path
for both via.py and example notebooks placement in the general channel. Saw it in at-least one more thread with two people asking the same question!