I am having troubles making the pdk within the car...
# caravel
m
I am having troubles making the pdk within the carvel user project. It fails as follows:
Fetching submodule libraries/sky130_fd_io/latest
Could not access submodule 'third_party/make-env'
Sorry if this a well known issue, but I could not find any help (yet).
m
Try again in a bit, sometimes it does fail to fetch submodules
m
It did fetch the submodule, I can see the files. The issue is the access to
third_party/make-env
which I do not understand as it is there.
m
Recursively delete your pdk directory and try it again
Usually works
m
👍 Yes, that fixed it. Thanks! Now the make finished with some (other) errors. Don’t know if this is an issue or not. Need to Google it.
m
Make should finish clean
But 1000s of printed Warnings and errors are normal
m
Is then following a clean finish or a real error:
make[3]: Leaving directory '/home/martin/os-chip-design/caravel_test_project/pdks/open_pdks/sky130'
make[2]: * [Makefile586 all-a] Error 2 make[2]: Leaving directory ‘/home/martin/os-chip-design/caravel_test_project/pdks/open_pdks/sky130’ make[1]: * [/home/martin/os-chip-design/caravel_test_project/caravel/Makefile1256 build-pdk] Error 2 make[1]: Leaving directory ‘/home/martin/os-chip-design/caravel_test_project’ make: * [Makefile38 pdk] Error 2
m
Nah that looks bad
Whats the logs before that?
m
Very long, did not find the error (yet). Maybe I’m missing some tools installed?
m
what version is your magic?
it should be pretty up to date.
I'm on 8.3.209
m
m
Thanks for that tip. I was on an old version and upgraded it. But still the same issue (or similar).
It is getting even stranger on my side. I’ve upgraded magic, but now it is back 8.2.157. How come? Maybe I should start a Ubuntu VM from scratch. Or is one available?
m
magic version to make the pdk is 8.3.265 and must be native. This is different than the version used for openlane inside docker.
m
This means building from source, right? I am fighting with it 😉 Building it from source does not find the tcl/tk header files. Building tcl/tk from source, but Intel Quartus has a version installed… I do a full restart with a clean Ubuntu version.
m
I have a CI job setup here that builds magic as part of the install
note this is for MPW-3a tools (which I am still using until MPW5 is stable)
if you're not familiar with github CI - here is the workflow: https://github.com/mattvenn/project0_test/blob/main/.github/workflows/install.yaml
and it depends on some scripts in the /scripts directory
m
OK, I’ll take that as a starting point. Thanks.
Got dependencies installed and magic compiled from source. Looks like it is building the PDK now. Thanks for all your help! Maybe the dependencies on some packages and that magic needs to be compiled from source should be added to the description.
👍 1
m
Yes docs are lacking atm
I have already opened an issue
m
I can add two lines.
🙌 1
As I have you here at hand 😇: When I run
make user_proj_example
make enters openlane and does the make user…. However, then it is missing
sh: flow.tcl: command not found
Am I missing here a configuration step to generate flow.tcl?
m
flow.tcl
is part of openlane. Did you do
make openlane
?
Copy code
# Install openlane for hardening your project
# make sure to change <directory_name> with the directory you created in step 1
# in this case it is caravel_tutorial
export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
make openlane
or check that your
OPENLANE_ROOT
is set.
m
I think I did. I followed the instructions. However, to be sure I started today from from scratch with a fresh clone of the repo. Now when I want to
make openlane
it complains that openlane already exists:
fatal: destination path '/home/martin/os-chip-design/caravel_test_project/openlane' already exists and is not an empty directory
I am getting a bit desperate 😒
m
Try
export OPENLANE_ROOT=/home/martin/os-chip-design/openlane
(or some other directory outside
caravel_test_project
. and then
make openlane
I'd
export PDK_ROOT=/home/martin/os-chip-design/pdk
before
make pdk
also. The
openlane
directory in
caravel_test_project
is something totally different.
m
I can try, but getting confused. In following description it states to point to the openlane (and ptk) folder within the the carvel folder: https://github.com/efabless/caravel_user_project/blob/main/docs/source/roundtrip.rst Maybe I am reading it wrong. I will try, thanks.
m
It is confusing isn't it. Try this
export BASE_DIR=$PWD
Step 2 was
Copy code
# Create a directory and call it anything you want
mkdir -p caravel_tutorial

# navigate into the directory
cd caravel_tutorial
Step 3
Copy code
# Make sure that ``caravel_example`` matches the empty github repo name in step 1
git clone -b mpw-5a <https://github.com/efabless/caravel_user_project> caravel_example
cd caravel_example
So now you're in
$BASE_DIR/caravel_tutorial/caravel_example
Step 4
Copy code
# Install openlane for hardening your project
# make sure to change <directory_name> with the directory you created in step 1
# in this case it is caravel_tutorial
export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
make openlane

# Build the pdk
# make sure to change <directory_name> with the directory you created in step 1
# in this case it is caravel_tutorial

export PDK_ROOT=~/<directory_name>/pdks # you need to export this whenever you start a new shell
make pdk
Actually, it's the directory you created in Step 2 (i.e. in this case
caravel_tutorial
) So you would
export OPENLANE_ROOT=$BASE_DIR/caravel_tutorial/openlane
You could set
export PDK_ROOT=$BASE_DIR/cavarel_tutorial/pdks
And then in
caravel_tutorial
you'd have these 3 directories
caravel_example
this is your local repo
openlane
this is the openlane program directory
pdks/sky130A
this is the pdk directory.
m
Yes, got it.
Thanks for the clarification and all the help, it works now on my side!
👍 1