Hi, I have no drc violations after detailed routin...
# openlane
b
Hi, I have no drc violations after detailed routing, then no lvs violations, but after that magic drc has drc violations. I am also getting same magic drc violations in user_proj_example. I cloned caravel_user_project anew and followed installation steps and built user_proj_example, and I see magic drc violations in it as well. THis si the sequence of steps I followed -
Copy code
1302  git clone <https://github.com/efabless/caravel_user_project.git>
 1304  cd caravel_user_project/
 1305  make install 
 1307  mkdir PDK_ROOT
 1308  mkdir OPENLANE_ROOT
 1309  export PDK_ROOT=~/caravel_user_project/PDK_ROOT/
 1310  export OPENLANE_ROOT=~/caravel_user_project/OPENLANE_ROOT/
 1311  make update_caravel 
 1312  make pdk
 1313  make simenv
 1314  export CARAVEL_ROOT=$(pwd)/caravel
 1315  export SIM=RTL
 1317  make verify-io_ports
 1318  make openlane 
 1319  make user_proj_example
Is anyone else getting magic drc violations ? My magic version is -
Copy code
$ magic --version
8.2.157
Thanks
h
Which command do you use to open the project in magic?
b
Thanks, I am not opening the project in magic, it runs a step as part of
Copy code
make <project>
My magic version is -
Copy code
$ magic --version
8.2.157
I think that is the last step shown as magic/netgen in the openlane flow
h
I think you need the latest magic to build the pdk. You have to build it from source here: http://opencircuitdesign.com/magic/
Otherwise, you have to build the pdk by running
Copy code
make pdk-nonnative
However, by default, the docker image might not have the internet connection. You have to config docker to allow the image to have the internet connection.
b
Thanks, let me update magic and retry
m
Yes you need at least magic 160. And you will probably need to wipe your pdk and build it again after installing magic
b
Thanks, magic installation is taking me down a rabbithole of dependencies. Are there any instructions/ automation script available in openlane for magic installation ? Thanks
m
The homepage for magic has some details
You could try building the pdk non native, then you don't need magic
b
Thanks, I am getting this error in pdk-nonnative -
Copy code
Your branch is up to date with 'origin/master'.
Already up to date.
make[1]: Leaving directory '/home/bhawandeepsingh/Desktop/darkriscv_in_openlane'
docker run --rm -v /home/bhawandeepsingh/Desktop/darkriscv_in_openlane/PDK_ROOT:/home/bhawandeepsingh/Desktop/darkriscv_in_openlane/PDK_ROOT -v :/user_project -v /home/bhawandeepsingh/Desktop/darkriscv_in_openlane/caravel:/home/bhawandeepsingh/Desktop/darkriscv_in_openlane/caravel -e CARAVEL_ROOT=/home/bhawandeepsingh/Desktop/darkriscv_in_openlane/caravel -e PDK_ROOT=/home/bhawandeepsingh/Desktop/darkriscv_in_openlane/PDK_ROOT -u 1000:1000 efabless/openlane:current sh -c "cd /home/bhawandeepsingh/Desktop/darkriscv_in_openlane/caravel; make build-pdk; make gen-sources"
docker: Error response from daemon: OCI runtime create failed: invalid mount {Destination::/user_project Type:bind Source:/var/lib/docker/volumes/4301b3c91a0ea81bc278fa77113dcd90b078f8354c72fd80886c9411f9945d7e/_data Options:[rbind]}: mount destination :/user_project not absolute: unknown.
make: *** [Makefile:153: pdk-nonnative] Error 125
Thanks, any idea why it is looking for :/user_project ?
h
You might need to edit line 153 of the Makefile to this:
Copy code
pdk-nonnative: skywater-pdk skywater-library skywater-timing open_pdks
        docker run --rm -v $(PDK_ROOT):$(PDK_ROOT) -v $(shell pwd):/user_project -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) -e CARAVEL_ROOT=$(CARAVEL_ROOT) -e PDK_ROOT=$(PDK_ROOT) -u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/openlane:current sh -c "cd $(CARAVEL_ROOT); make build-pdk; make gen-sources"
$(pwd):/user_project -> $(shell pwd)/user_project
Ensure that you configure docker for internet access, otherwise it will not work.
you can check to see if your docker has been configure for internet access by running:
Copy code
docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:current
then run:
Copy code
$ ping <http://google.com|google.com>
b
Thanks, I got make pdk-nonnative to work and after that, make user_proj_example completed w/o DRC issues, let me proceed, thanks
Thanks @Hieu Bui @Matt Venn, I have a question. The observed behavior of my synthesis runs has changed. But when I check magic version in terminal, it still shows the old version. Add to it that I changed pdk, but openlane had no way to specify something analogous to nonnative, magic will be used by openlane, which probably means it might still be using the old one. How can I be sure that this old version is not being used at all at any step or only one version is used for every step ? Thanks
@Hieu Bui Thanks a lot for your help so far, quick question, what version do you get if you do
Copy code
magic --version
? My runs are ending abruptly at magic related steps. The error message is -
Copy code
[INFO]: current step index: 35

Magic 8.3 revision 145 - Compiled on Mon Mar 22 04:21:56 UTC 2021.
Starting magic under Tcl interpreter
Using the terminal as the console.
Using NULL graphics device.
Processing system .magicrc file
Sourcing design .magicrc for technology sky130A ...
2 Magic internal units = 1 Lambda
Input style sky130(): scaleFactor=2, multiplier=2
Scaled tech values by 2 / 1 to match internal grid scaling
Loading sky130A Device Generator Menu ...
Loading "/openLANE_flow/scripts/magic/maglef.tcl" from command line.
Reading LEF data from file /project/openlane/user_project_wrapper/runs/user_project_wrapper/results/magic/user_project_wrapper.lef.
This action cannot be undone.
LEF read: Processed 21978940 lines.
[INFO]: DONE GENERATING MAGLEF VIEW
sh: line 1:     8 Killed                  flow.tcl -design ./user_project_wrapper -save_path .. -save -tag user_project_wrapper -overwrite
make[1]: *** [Makefile:43: user_project_wrapper] Error 137
make[1]: Leaving directory '/home/bhawandeepsingh/Desktop/darkriscv_in_openlane/openlane'
make: *** [Makefile:71: user_project_wrapper] Error 2
h
This is my magic version used to build the pdk:  $ magic --version 8.3.153 Would you please check if your docker image have the internet access?  Run this in your terminal:
Copy code
$ docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:current
$ magic --version
$ ping -c 4 <http://google.com|google.com>
Docker run a separate system on your machine. It is like a virtual machine actually. Everything will be contained in that environment. Magic in your machine stay the same. But the magic in the docker image will be the correct version. However, I think 'make pdk-nonnative' would fail if it does not have internet connection.
b
Thanks, if I follow your steps -the 2nd command returns
Copy code
bash-4.2$ magic --version
8.3.145
The ping also returned -
Copy code
bash-4.2$ ping -c 4 <http://google.com|google.com>
PING <http://google.com|google.com> (216.58.195.78) 56(84) bytes of data.
64 bytes from <http://sfo07s16-in-f14.1e100.net|sfo07s16-in-f14.1e100.net> (216.58.195.78): icmp_seq=1 ttl=116 time=12.3 ms
64 bytes from <http://sfo07s16-in-f14.1e100.net|sfo07s16-in-f14.1e100.net> (216.58.195.78): icmp_seq=2 ttl=116 time=12.1 ms
64 bytes from <http://sfo07s16-in-f14.1e100.net|sfo07s16-in-f14.1e100.net> (216.58.195.78): icmp_seq=3 ttl=116 time=12.1 ms
64 bytes from <http://sfo07s16-in-f14.1e100.net|sfo07s16-in-f14.1e100.net> (216.58.195.78): icmp_seq=4 ttl=116 time=12.0 ms

--- <http://google.com|google.com> ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 12.009/12.156/12.305/0.172 ms
h
All is good. How much memory do you have?
b
Thanks, the laptop has 16GB RAM. While running different stages, ti does print the usage and peak usage ~
Copy code
cpu time = 00:05:11, elapsed time = 00:01:18, memory = 2066.19 (MB), peak = 4341.46 (MB)
h
I am not sure why but it might be the out-of-memory problem. In my system with 64G of ram. I can finish your design upto lvs. You can try with the default caravel_user_project example to see if there is any problem.
b
I was also reaching till LVS, then I thought if layout does not match schematic, it might be due to some physical design stage optimizations, then tried to solve LVS problems by changing some physical design related constraints -
Copy code
#set ::env(PL_RESIZER_DESIGN_OPTIMIZATIONS) 0
#set ::env(PL_RESIZER_TIMING_OPTIMIZATIONS) 0
#set ::env(PL_RESIZER_BUFFER_INPUT_PORTS) 0
#set ::env(PL_RESIZER_BUFFER_OUTPUT_PORTS) 0
#
#set ::env(PL_OPENPHYSYN_OPTIMIZATIONS) 0
#set ::env(DIODE_INSERTION_STRATEGY) 0
#set ::env(FILL_INSERTION) 0
#set ::env(TAP_DECAP_INSERTION) 0
h
So it is the problem of the combination of your config. My advice is that you keep the default config for user_project_wrapper and try to harden darksocv as a macro first. Then, in the user_project_wrapper you assemble it as a hard macro. The user_project_wrapper have to met some requirements of the caravel test harness, therefore, modifying it would not be a good idea and it will take a lot of time to make it right. You can start by using the minimum config as in the caravel_user_project example. Try to understand the problem that you got, then, solve it in a smart way. Copying the code on the Internet might not work. This is the minimum config that the darksocv can synthesize and place & route.
Copy code
set script_dir [file dirname [file normalize [info script]]]
# User config
set ::env(DESIGN_NAME) darksocv

# Change if needed
#set ::env(VERILOG_FILES) [glob $::env(DESIGN_DIR)/src/*.v]
set ::env(VERILOG_FILES) "\
        $script_dir/../../caravel/verilog/rtl/defines.v \
        $script_dir/../../verilog/rtl/darksocv.v \
        $script_dir/../../verilog/rtl/darkriscv.v \
        $script_dir/../../verilog/rtl/darkuart.v"

# Fill this
set ::env(CLOCK_PERIOD) "100"
set ::env(CLOCK_PORT) "XCLK"

#-> Do the below from the bash shell inside docker
#export STD_CELL_LIBRARY="sky130_fd_sc_ls"

set ::env(CLOCK_NET) $::env(CLOCK_PORT)
#set ::env(CLOCK_NET) "XCLK"
#set ::env(CLOCK_NET) "CLK"
#set ::env(CLOCK_NET) "core0.CLK"
#set ::env(CLOCK_NET) "uart0.CLK"

set ::env(FP_SIZING) relative
set ::env(FP_CORE_UTIL) 30
set ::env(DESIGN_IS_CORE) 0

set ::env(PL_TARGET_DENSITY) 0.5
set ::env(PL_BASIC_PLACEMENT) 0
set ::env(PL_ROUTABILITY_DRIVEN) 1


set ::env(VDD_NETS) [list {vccd1} {vccd2} {vdda1} {vdda2}]
set ::env(GND_NETS) [list {vssd1} {vssd2} {vssa1} {vssa2}]

set ::env(RUN_CVC) 0
You can try to harden it futher by using the exploration mode in Openlane. You can explore the synthesis results (choose the one that you think is the best for you). Openlane can also sweep different design parameters and give you a report. But it would take a lot of time to run 🙂.
b
Thanks a lot @Matthew Guthaus @Hieu Bui @Matt Venn darksocv built with a smaller memory. I am working on user_project_wrapper now, thanks a lot once again
🙌 3
Thanks a lot @Matthew Guthaus @Hieu Bui @Matt Venn user_project_wrapper build completed now with daorksocv macro (with a smaller memory), thanks a lot once again