netlist-graph 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ /target
2
+ crates/*/target/
3
+ crates/*/Cargo.lock
4
+ /book
5
+ /compile_commands.json
6
+ .cache
7
+
8
+ # Python
9
+ __pycache__/
10
+ *.pyc
11
+ *.swp
12
+ .pdm-python
13
+
14
+ # macOS Finder metadata
15
+ **/.DS_Store
16
+
17
+ # Claude Code session data
18
+ .claude/
19
+
20
+ # tldr local cache + ignore config
21
+ .tldr/
22
+ .tldrignore
23
+
24
+ # Simulation artifacts
25
+ *.vvp
26
+ *.vcd
27
+ # Committed cosim regression goldens (CpuBackend CI diffs against these).
28
+ !tests/xprop_cosim/expected/*.vcd
29
+ # Stage C flash cosim golden (mcu_soc; CpuBackend == Metal, #105).
30
+ !tests/mcu_soc/expected/*.vcd
31
+ *.tar.gz
32
+ debug_trace.csv
33
+ *_watchlist.json
34
+ api_artifacts/
35
+ tb_verify_sim
36
+
37
+ # Binary timing IR. Commit JSON dumps (e.g. via timing-ir-diff's
38
+ # pretty-printed output) instead — *.jtir.json is intentionally not
39
+ # ignored so those can be checked in.
40
+ *.jtir
41
+ # WS4 corpus goldens are the deliberate exception — the .jtir is the
42
+ # canonical binary the regression test diffs against; the .json sidecar
43
+ # is for PR-time review. Both ship.
44
+ !tests/timing_ir/corpus/**/*.jtir
45
+ # Pre-generated timing IR for CI (Metal runner lacks OpenSTA + Liberty)
46
+ !tests/timing_test/inv_chain_pnr/inv_chain.jtir
47
+
48
+ # Build output directories
49
+ **/build/results/
50
+
51
+ # ChipFlow design build artifacts
52
+ designs/*/build/
53
+ designs/*/.doit.db
54
+
55
+ # Test build artifacts (binary firmware, netlists)
56
+ tests/*/build/
57
+
58
+ # uv lock file
59
+ uv.lock
60
+
61
+ # IP fetched via cf-ipm at build time
62
+ /ip/
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: netlist-graph
3
+ Version: 0.1.0
4
+ Summary: Graph-based netlist analysis tool for SKY130 post-synthesis netlists
5
+ Project-URL: Homepage, https://github.com/gpu-eda/Jacquard
6
+ Project-URL: Repository, https://github.com/gpu-eda/Jacquard
7
+ Project-URL: Documentation, https://gpu-eda.github.io/Jacquard/signal-tracing.html
8
+ License-Expression: Apache-2.0
9
+ Keywords: eda,jacquard,netlist,synthesis,verilog
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: click>=8.0
12
+ Requires-Dist: networkx>=3.0
13
+ Description-Content-Type: text/markdown
14
+
15
+ # netlist-graph
16
+
17
+ Graph-based netlist analysis tool for SKY130 post-synthesis netlists.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ cd scripts/netlist_graph
23
+ uv sync
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### Search for nets
29
+
30
+ ```bash
31
+ uv run netlist-graph search <netlist.v> <pattern>
32
+ ```
33
+
34
+ ### Trace drivers (backwards)
35
+
36
+ ```bash
37
+ uv run netlist-graph drivers <netlist.v> <net> [-d depth]
38
+ ```
39
+
40
+ ### Trace loads (forwards)
41
+
42
+ ```bash
43
+ uv run netlist-graph loads <netlist.v> <net> [-d depth]
44
+ ```
45
+
46
+ ### Find path between nets
47
+
48
+ ```bash
49
+ uv run netlist-graph path <netlist.v> <source> <target>
50
+ ```
51
+
52
+ ### Generate trace configuration
53
+
54
+ Generate signal type and driver information:
55
+
56
+ ```bash
57
+ # Simple output
58
+ uv run netlist-graph trace <netlist.v> <signal1> <signal2> ...
59
+
60
+ # Generate JSON for programmatic use
61
+ uv run netlist-graph trace <netlist.v> ibus__cyc rst_n_sync.rst --json
62
+ ```
63
+
64
+ ### Generate watchlist file
65
+
66
+ Create a JSON watchlist for signal monitoring:
67
+
68
+ ```bash
69
+ uv run netlist-graph watchlist <netlist.v> <output.json> <signal1> <signal2> ...
70
+ ```
71
+
72
+ Example:
73
+ ```bash
74
+ uv run netlist-graph watchlist design.v watch.json ibus__cyc rst_n_sync gpio_out
75
+ ```
76
+
77
+ ### Interactive mode
78
+
79
+ ```bash
80
+ uv run netlist-graph interactive <netlist.v>
81
+ ```
82
+
83
+ Commands in interactive mode:
84
+ - `d <net>` - find drivers
85
+ - `l <net>` - find loads
86
+ - `p <src> <tgt>` - find path
87
+ - `s <pattern>` - search nets
88
+ - `c <net>` - cone of influence
89
+ - `q` - quit
90
+
91
+ ## Examples
92
+
93
+ ```bash
94
+ # Find what drives the ibus_cyc signal
95
+ uv run netlist-graph drivers tests/timing_test/minimal_build/6_final.v "ibus__cyc" -d 8
96
+
97
+ # Trace reset synchronizer path
98
+ uv run netlist-graph drivers tests/timing_test/minimal_build/6_final.v "rst_n_sync.rst"
99
+
100
+ # Find path from reset input to CPU
101
+ uv run netlist-graph path tests/timing_test/minimal_build/6_final.v "gpio_in[40]" "ibus__cyc"
102
+
103
+ # Generate watchlist for debugging
104
+ uv run netlist-graph watchlist tests/timing_test/minimal_build/6_final.v watch.json \
105
+ ibus__cyc rst_n_sync.rst gpio_out[0] gpio_out[1]
106
+ ```
107
+
108
+ ## Signal Types
109
+
110
+ The tool classifies signals based on their drivers:
111
+ - `reg` - Driven by a flip-flop (dfxtp, dfrtp, etc.)
112
+ - `mem` - Driven by SRAM
113
+ - `comb` - Combinational logic (gates, buffers)
@@ -0,0 +1,99 @@
1
+ # netlist-graph
2
+
3
+ Graph-based netlist analysis tool for SKY130 post-synthesis netlists.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ cd scripts/netlist_graph
9
+ uv sync
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ### Search for nets
15
+
16
+ ```bash
17
+ uv run netlist-graph search <netlist.v> <pattern>
18
+ ```
19
+
20
+ ### Trace drivers (backwards)
21
+
22
+ ```bash
23
+ uv run netlist-graph drivers <netlist.v> <net> [-d depth]
24
+ ```
25
+
26
+ ### Trace loads (forwards)
27
+
28
+ ```bash
29
+ uv run netlist-graph loads <netlist.v> <net> [-d depth]
30
+ ```
31
+
32
+ ### Find path between nets
33
+
34
+ ```bash
35
+ uv run netlist-graph path <netlist.v> <source> <target>
36
+ ```
37
+
38
+ ### Generate trace configuration
39
+
40
+ Generate signal type and driver information:
41
+
42
+ ```bash
43
+ # Simple output
44
+ uv run netlist-graph trace <netlist.v> <signal1> <signal2> ...
45
+
46
+ # Generate JSON for programmatic use
47
+ uv run netlist-graph trace <netlist.v> ibus__cyc rst_n_sync.rst --json
48
+ ```
49
+
50
+ ### Generate watchlist file
51
+
52
+ Create a JSON watchlist for signal monitoring:
53
+
54
+ ```bash
55
+ uv run netlist-graph watchlist <netlist.v> <output.json> <signal1> <signal2> ...
56
+ ```
57
+
58
+ Example:
59
+ ```bash
60
+ uv run netlist-graph watchlist design.v watch.json ibus__cyc rst_n_sync gpio_out
61
+ ```
62
+
63
+ ### Interactive mode
64
+
65
+ ```bash
66
+ uv run netlist-graph interactive <netlist.v>
67
+ ```
68
+
69
+ Commands in interactive mode:
70
+ - `d <net>` - find drivers
71
+ - `l <net>` - find loads
72
+ - `p <src> <tgt>` - find path
73
+ - `s <pattern>` - search nets
74
+ - `c <net>` - cone of influence
75
+ - `q` - quit
76
+
77
+ ## Examples
78
+
79
+ ```bash
80
+ # Find what drives the ibus_cyc signal
81
+ uv run netlist-graph drivers tests/timing_test/minimal_build/6_final.v "ibus__cyc" -d 8
82
+
83
+ # Trace reset synchronizer path
84
+ uv run netlist-graph drivers tests/timing_test/minimal_build/6_final.v "rst_n_sync.rst"
85
+
86
+ # Find path from reset input to CPU
87
+ uv run netlist-graph path tests/timing_test/minimal_build/6_final.v "gpio_in[40]" "ibus__cyc"
88
+
89
+ # Generate watchlist for debugging
90
+ uv run netlist-graph watchlist tests/timing_test/minimal_build/6_final.v watch.json \
91
+ ibus__cyc rst_n_sync.rst gpio_out[0] gpio_out[1]
92
+ ```
93
+
94
+ ## Signal Types
95
+
96
+ The tool classifies signals based on their drivers:
97
+ - `reg` - Driven by a flip-flop (dfxtp, dfrtp, etc.)
98
+ - `mem` - Driven by SRAM
99
+ - `comb` - Combinational logic (gates, buffers)
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "netlist-graph"
3
+ version = "0.1.0"
4
+ description = "Graph-based netlist analysis tool for SKY130 post-synthesis netlists"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ requires-python = ">=3.11"
8
+ keywords = ["netlist", "eda", "verilog", "synthesis", "jacquard"]
9
+ dependencies = [
10
+ "networkx>=3.0",
11
+ "click>=8.0",
12
+ ]
13
+
14
+ [project.urls]
15
+ Homepage = "https://github.com/gpu-eda/Jacquard"
16
+ Repository = "https://github.com/gpu-eda/Jacquard"
17
+ Documentation = "https://gpu-eda.github.io/Jacquard/signal-tracing.html"
18
+
19
+ [project.scripts]
20
+ netlist-graph = "netlist_graph.cli:main"
21
+
22
+ [build-system]
23
+ requires = ["hatchling"]
24
+ build-backend = "hatchling.build"
25
+
26
+ [tool.hatch.build.targets.wheel]
27
+ packages = ["src/netlist_graph"]
28
+
29
+ [tool.ruff]
30
+ line-length = 100
31
+ target-version = "py311"
32
+
33
+ [tool.ruff.lint]
34
+ select = ["E", "F", "I", "N", "W"]
@@ -0,0 +1,6 @@
1
+ """Graph-based netlist analysis for SKY130 post-synthesis netlists."""
2
+
3
+ from netlist_graph.parser import parse_netlist
4
+ from netlist_graph.graph import NetlistGraph
5
+
6
+ __all__ = ["parse_netlist", "NetlistGraph"]