Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make verify-mprj_por fails #29

Open
buzmeg opened this issue Aug 22, 2022 · 4 comments
Open

make verify-mprj_por fails #29

buzmeg opened this issue Aug 22, 2022 · 4 comments
Assignees
Labels
flow Makefile or in-repository flow script changed

Comments

@buzmeg
Copy link

buzmeg commented Aug 22, 2022

PDK was installed using volare from earlier in the README.md

make verify-mprj_por
docker run -v /home/foo/efabless/caravel_user_project_analog:/home/foo/efabless/caravel_user_project_analog -v /home/foo/efabless/caravel_user_project_analog/pdk:/home/foo/efabless/caravel_user_project_analog/pdk \
                -v /home/foo/efabless/caravel_user_project_analog/caravel:/home/foo/efabless/caravel_user_project_analog/caravel \
                -e TARGET_PATH=/home/foo/efabless/caravel_user_project_analog -e PDK_ROOT=/home/foo/efabless/caravel_user_project_analog/pdk \
                -e CARAVEL_ROOT=/home/foo/efabless/caravel_user_project_analog/caravel \
                -u : efabless/dv_setup:latest \
                sh -c "cd /home/foo/efabless/caravel_user_project_analog/verilog/dv/mprj_por && export SIM=RTL && make"
/opt/riscv32i/bin/riscv32-unknown-elf-gcc -I /home/foo/efabless/caravel_user_project_analog/caravel -march=rv32imc -mabi=ilp32 -Wl,-Bstatic,-T,/home/foo/efabless/caravel_user_project_analog/caravel/verilog/dv/caravel/sections.lds,--strip-debug -ffreestanding -nostdlib -o mprj_por.elf /home/foo/efabless/caravel_user_project_analog/caravel/verilog/dv/caravel/start.s mprj_por.c
/opt/riscv32i/bin/riscv32-unknown-elf-objcopy -O verilog mprj_por.elf mprj_por.hex 
# to fix flash base address
sed -i 's/@10000000/@00000000/g' mprj_por.hex
iverilog -DFUNCTIONAL -DSIM -DEF_STYLE -I /home/foo/efabless/caravel_user_project_analog/pdk/ \
-I /home/foo/efabless/caravel_user_project_analog/caravel/verilog/dv/caravel -I /home/foo/efabless/caravel_user_project_analog/caravel/verilog/rtl \
-I ../    -I ../../../verilog/rtl \
mprj_por_tb.v -o mprj_por.vvp 
/home/foo/efabless/caravel_user_project_analog/caravel/verilog/rtl/caravan_netlists.v:30: Include file libs.ref/verilog/sky130_fd_io/sky130_fd_io.v not found
../../../verilog/rtl/example_por.v:57: error: Unknown module type: sky130_fd_sc_hvl__schmittbuf_1
../../../verilog/rtl/example_por.v:68: error: Unknown module type: sky130_fd_sc_hvl__schmittbuf_1
../../../verilog/rtl/example_por.v:79: error: Unknown module type: sky130_fd_sc_hvl__lsbufhv2lv_1
../../../verilog/rtl/example_por.v:57: error: Unknown module type: sky130_fd_sc_hvl__schmittbuf_1
../../../verilog/rtl/example_por.v:68: error: Unknown module type: sky130_fd_sc_hvl__schmittbuf_1
../../../verilog/rtl/example_por.v:79: error: Unknown module type: sky130_fd_sc_hvl__lsbufhv2lv_1
7 error(s) during elaboration.
*** These modules were missing:
        sky130_fd_sc_hvl__lsbufhv2lv_1 referenced 2 times.
        sky130_fd_sc_hvl__schmittbuf_1 referenced 4 times.
***
make: *** [Makefile:51: mprj_por.vvp] Error 7
rm mprj_por.elf
make: *** [Makefile:61: verify-mprj_por] Error 2
@AidanMedcalf
Copy link

Fix: Edit top-level Makefile to pass $PDK to docker:

# Makefile line 60
$(DV_PATTERNS): verify-% : ./verilog/dv/%
    docker run -v ${TARGET_PATH}:${TARGET_PATH} -v ${PDK_ROOT}:${PDK_ROOT} \
                -v ${CARAVEL_ROOT}:${CARAVEL_ROOT} \
                -e TARGET_PATH=${TARGET_PATH} -e PDK_ROOT=${PDK_ROOT} \
                -e CARAVEL_ROOT=${CARAVEL_ROOT} -e PDK=${PDK} \
                -u $(id -u $$USER):$(id -g $$USER) efabless/dv_setup:latest \
                sh -c $(VERIFY_COMMAND)

After that it fails to include mgmt_core_wrapper.v, so there may be missing include paths.

@buzmeg
Copy link
Author

buzmeg commented Sep 10, 2022

I'm clearly not going to make this MPW, so I'm not that worried about getting this to pass right now and I assume the relevant folks are super busy with the deadline coming up Monday.

I'll be more aggressive about getting this fixed after Sept 19th or so after folks have put the MPW to bed. :)

Thanks.

@nkrackow
Copy link

nkrackow commented Oct 14, 2022

I managed to get verify-mprj_por finishing by first doing #29 (comment) and then copying over mgmt_core_wrapper.v, mgmt_core.v and DFFRAM.v from https://github.com/efabless/caravel_mgmt_soc_litex/tree/main/verilog/rtl and adding

	`include "mgmt_core.v"
	`include "DFFRAM.v" 

to caravan_netlist.v in lines 92, 93.
Now I can look at the vcd traces from the sim. :)

I guess this has something to do with switching over to litex mgmt core and stuff hasn't been updated in the analog user project.
I just started playing around with caravel and the open pdk so I don't feel qualified to dig in and properly fix this but I hope this helps.

@SaraEfabless SaraEfabless added the flow Makefile or in-repository flow script changed label Jan 18, 2023
@jeffdi
Copy link
Contributor

jeffdi commented Aug 23, 2023

PR ready for merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flow Makefile or in-repository flow script changed
Projects
None yet
Development

No branches or pull requests

6 participants