Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ORS Hardware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ORS Hardware
Commits
4ff5bd5f
Commit
4ff5bd5f
authored
Mar 20, 2023
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/compare_netlist.py: correctly display modified components
parent
ba9d7b2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tools/compare_netlist.py
tools/compare_netlist.py
+7
-7
No files found.
tools/compare_netlist.py
View file @
4ff5bd5f
...
@@ -47,8 +47,8 @@ def dict_compare(d1, d2):
...
@@ -47,8 +47,8 @@ def dict_compare(d1, d2):
d1_keys
=
set
(
d1
.
keys
())
d1_keys
=
set
(
d1
.
keys
())
d2_keys
=
set
(
d2
.
keys
())
d2_keys
=
set
(
d2
.
keys
())
shared_keys
=
d1_keys
.
intersection
(
d2_keys
)
shared_keys
=
d1_keys
.
intersection
(
d2_keys
)
added
=
d
1_keys
-
d2
_keys
added
=
d
2_keys
-
d1
_keys
removed
=
d
2_keys
-
d1
_keys
removed
=
d
1_keys
-
d2
_keys
modified
=
{
o
:
(
d1
[
o
],
d2
[
o
])
for
o
in
shared_keys
if
d1
[
o
]
!=
d2
[
o
]}
modified
=
{
o
:
(
d1
[
o
],
d2
[
o
])
for
o
in
shared_keys
if
d1
[
o
]
!=
d2
[
o
]}
same
=
set
(
o
for
o
in
shared_keys
if
d1
[
o
]
==
d2
[
o
])
same
=
set
(
o
for
o
in
shared_keys
if
d1
[
o
]
==
d2
[
o
])
return
added
,
removed
,
modified
,
same
return
added
,
removed
,
modified
,
same
...
@@ -59,11 +59,11 @@ def pprint(o):
...
@@ -59,11 +59,11 @@ def pprint(o):
else
:
else
:
print
(
None
)
print
(
None
)
def
compare_netlist
(
netlist
1
,
netlist2
):
def
compare_netlist
(
netlist
ref
,
netlistnew
):
comp
1
,
con1
=
netlist1
comp
ref
,
conref
=
netlistref
comp
2
,
con2
=
netlist2
comp
new
,
connew
=
netlistnew
comp_added
,
comp_removed
,
comp_modified
,
comp_same
=
dict_compare
(
comp
2
,
comp1
)
comp_added
,
comp_removed
,
comp_modified
,
comp_same
=
dict_compare
(
comp
ref
,
compnew
)
con_added
,
con_removed
,
con_modified
,
con_same
=
dict_compare
(
con
2
,
con1
)
con_added
,
con_removed
,
con_modified
,
con_same
=
dict_compare
(
con
ref
,
connew
)
print
(
"******************************************************"
)
print
(
"******************************************************"
)
print
(
"******************** COMPONENTS **********************"
)
print
(
"******************** COMPONENTS **********************"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment