Python & EDA
Transcript of Python & EDA
![Page 1: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/1.jpg)
dokelung (Ko-Lung Yuan)
![Page 2: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/2.jpg)
About Me
https://github.com/dokelung/
http://dokelung-blog.logdown.com/
![Page 3: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/3.jpg)
⼩小⼩小的⼼心得分享
今天講些什麼?
![Page 4: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/4.jpg)
• EDA
• script-king
• msat
• minickt
Agenda
![Page 5: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/5.jpg)
常有⼈人問我這樣⼀一個問題...
什麼是電⼦子設計⾃自動化?
![Page 6: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/6.jpg)
IC Design Flow
![Page 7: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/7.jpg)
In EDA World …
我在這裡
![Page 8: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/8.jpg)
在最⼀一開始,我也是學過⼀一點 功夫的...C / C++ / Java …
三腳貓
![Page 9: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/9.jpg)
直到我遇⾒見了... 他!
直到我遇⾒見了...
![Page 10: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/10.jpg)
Python可以拿來幹⿇麻呢?除了吃飯和睡覺之外我都想⽤用Python啊
![Page 11: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/11.jpg)
拿來寫 script 好了
真是送禮⾃自⽤用兩相宜啊!
![Page 13: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/13.jpg)
接著幹嘛好呢?
來寫個 solver 好了
於是乎msat 就誕⽣生了!
![Page 15: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/15.jpg)
Multiset Constraint Solving
{ 1, 3, 3, 1 } { 2, 3, 3 }
Subset-Sum Problem
{ 1, 2, 3, 4, 5 } { 6 }=
>=Element set Target setRelation
What Is this?
![Page 16: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/16.jpg)
subset-sum problem
k-partition problem
bin-packing problem
knapsack problem
pseudo Boolean constraint
symmetry encoding
What?
![Page 17: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/17.jpg)
{ 1, 2, 3, 4, 5 } k = 3
{ 1, 4 } { 2, 3 } { 5 }
Let E = { 1, 2, 3, 4, 5 } Let T = { 5, 5, 5 } Relation “=”
k-partition Problem
![Page 18: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/18.jpg)
{ 2, 2, 3, 4 } bin size = 5
{ 2 } { 2, 3 } { 4 }
Let E = { 2, 2, 3, 4 } with all use rule Try T = { 5 }, { 5, 5 }, { 5, 5, 5 } … Relation “<=”
Bin-packing Problem
![Page 19: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/19.jpg)
size = { 1, 2, 1, 2, 1 } value = { 2, 3, 1, 2, 2 } knapsack capacity = 5
Let E1 = { 1, 2, 1, 2, 1 } T1 = { 5 } Relation “<=“ Let E2 = { 2, 3, 1, 2, 2 } T2 = { Vmax } Relation “=“ Try Vmax …
Knapsack Problem
![Page 20: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/20.jpg)
3x + 5y - 2z >= 5 6x + 2y + 2z >= 2
x = 1, y = 1, z =0
Let E1 = { 3, 5, -2 } T1 = { 5 } Relation “>=“ Let E2 = { 6, 2, 2 } T2 = { 2 } Relation “>=“
PBC
![Page 21: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/21.jpg)
How to Solve
Let E = { 1, 1, 3, 3 } Try T = { 2, 3, 3 } Relation “>=”
!2 !1 0 1 2 3 0 True True True False False False 1 True True True True False False 1 True True True True True False 3 True True True True True True 3 True True True True True True
![Page 22: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/22.jpg)
minickthttps://github.com/dokelung/minickt
AND
OR
XOR
ab
cd
e
fout
![Page 23: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/23.jpg)
–dokelung
「⼯工商服務,真⼼心不誤。」
![Page 24: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/24.jpg)
![Page 25: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/25.jpg)
6/9(二) 天瓏買的到
![Page 26: Python & EDA](https://reader031.fdocuments.net/reader031/viewer/2022012313/55ccf892bb61eba90f8b45e4/html5/thumbnails/26.jpg)
謝謝⼤大家 Q & A