How to debug » History » Version 1
jun chen, 03/09/2025 11:18 PM
1 | 1 | jun chen | # How to debug |
---|---|---|---|
2 | |||
3 | ## write debug message |
||
4 | |||
5 | * in c++, all debug message should be output with the macro DBG(num, xxxx) |
||
6 | * in python, all debug message should be output with logging.debug(num, xxx) |
||
7 | |||
8 | ## enable debug message |
||
9 | |||
10 | * we should put below code at the begin of the user script to enable any debug code. |
||
11 | ``` |
||
12 | set—debug—level(num, filename) |
||
13 | ``` |
||
14 | num should be larger than the macro used in the source code, such as set—debug—level(lOO, 'aa.cc'), |
||
15 | all debug message in aa.cc were output with DBG(num, xx x) where num < lOO will be print |
||
16 | |||
17 | use set—debug—level(num) without specify the filename, all source files debug message will be enabled. |
||
18 | |||
19 | ## show source file name of the debug message |
||
20 | |||
21 | ``` |
||
22 | show—debug—filename() |
||
23 | ``` |
||
24 | |||
25 | ## vectorless flow correlation between vesper and hvp |
||
26 | |||
27 | 1. get pin service |
||
28 | ``` |
||
29 | >>lt=dv.get—design() |
||
30 | >>cell=lt.get—cell(l625) |
||
31 | >>ps=cell.get—pin—service() |
||
32 | >>pin—data= ps.get—pin—data(64) |
||
33 | >>pin—data |
||
34 | ``` |
||
35 | |||
36 | 2. hvp deubg |
||
37 | |||
38 | attachment:"correlation vesper and hvp.pptx" |
||
39 | |||
40 | ``` |
||
41 | hvp -regression -wd /**tempfolder /**run.tcl |
||
42 | ``` |
||
43 | |||
44 | 3. vesper debug instance power |
||
45 | 在create_view后使用debug_instance=["instance_name",...] |
||
46 | |||
47 | 4. gdb hvp: |
||
48 | |||
49 | ``` |
||
50 | gdb hvp_binary set args *.tcl |
||
51 | b *.cpp:line_number |
||
52 | wh |
||
53 | run |
||
54 | ``` |