-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgen-vis.sh
executable file
·57 lines (50 loc) · 1.66 KB
/
gen-vis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
PDK=sky130_fd_sc_hd
GL=spm.gl.v
GDS=spm.gds
VCD=build/spm.vcd
echo "PDK = $PDK"
echo "PDK_ROOT = $PDK_ROOT"
CELLS=$PDK_ROOT/open_pdks/sky130/sky130A/libs.ref/$PDK/verilog/$PDK.v
if [ ! -f "$CELLS" ]; then
echo "Verilog cell models not found. Ensure that PDK and PDK_ROOT are set correctly, and that a recent version of the PDK has been installed"
exit 1
fi
# Hack to fix cells to work with yosys verilog parser
mkdir -p build
cp $CELLS build/tmp_${PDK}_cells_fixed.v
sed -i 's/wire 1/wire __1/g' build/tmp_${PDK}_cells_fixed.v
if [ ! -f "$GL" ]; then
echo "Gate-level netlist not found."
exit 1
fi
if [ ! -f "$GDS" ]; then
echo "GDS file not found."
exit 1
fi
if [ ! -f "$VCD" ]; then
echo "VCD file not found. Please ensure the simulation was run and the results were not deleted."
exit 1
fi
mkdir -p out
python3 ../../chip-vis.py \
--cell_models build/tmp_${PDK}_cells_fixed.v \
--gl_netlist $GL \
--vcd $VCD \
--gds $GDS \
--prefix "spm_tb.uut." \
--status_var "spm_tb.status" \
--rst "spm_tb.uut.rst" \
--clk "spm_tb.uut.clk" \
--start_status "Calc" \
--outfile "out/spm_vis.gif" \
--mode 0,1,2,3,4,5 \
--scale 3 \
--fps 8 \
--downscale 1.2 \
--blur 7 \
--exp_grow 1.2 \
--exp_decay 0.8 \
--lin_grow 0.15 \
--lin_decay 0.15 \
--build_dir build