[問題] Hspice E element語法

看板Electronics作者 (prof)時間10年前 (2015/08/15 21:00), 10年前編輯推噓0(003)
留言3則, 2人參與, 最新討論串1/2 (看更多)
各位大大好 想請問一下Hspice中以下兩句的意思: Ewinu fwinu 0 OR(2) fwinw1 0 fwinw2 0 0 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 1 Ewind fwind 0 AND(2) fwinw1 0 fwinw2 0 0 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 1 E element我知道是VCVS 中間的OR和AND我查了下manual, 它這樣寫: (manual網址: http://www.rudraj.it/hspice_sa.pdf 174頁) gatetype(k) Can be AND, NAND, OR, or NOR. k represents the number of inputs of the gate. x and y represent the piecewise linear variation of output, as a function of input. In multi-input gates, only one input determines the state of the output. 看來就是兩個input: fwinw1 0 fwinw2 0他們之間去做OR或AND 問題就是就是他E element明明就是在處理類比訊號 類比訊號是要怎麼做邏輯操作? 例如我兩個input分別是0.8和0.9這樣AND或OR起來是什麼東東? 再來就是後面那一長串數字 Manual似乎也有寫(175頁)但我也是看不太懂: x1,... Controlling voltage across the in+ and in- nodes. The x values must be in increasing order. y1,... Corresponding element values of x 尤其是y的element values是什麼意思不太懂 是說今天我就是輸出的電壓就是這些y值還是我VCVS的gain是這些對應的y值? 最後最重要是想請教 我有沒有辦法不用什麼AND OR這些去寫出來這兩句? 主要是我想要用ngspice去跑 但是這個AND OR之類的似乎是Hpisce增加的語法 而不是本來spice就有的語法 總之ngspice不能跑 不知有沒有辦法改寫呢? 總之先謝謝各位大大<(_ _)> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.34.222.1 ※ 文章網址: https://www.ptt.cc/bbs/Electronics/M.1439643606.A.693.html ※ 編輯: profyang (114.34.222.1), 08/15/2015 21:00:51

08/16 01:17, , 1F
阿 我已自己解決 AND 就是取比較小的 OR就是取大的
08/16 01:17, 1F

08/16 01:18, , 2F
後面那陀數字的用處測試之下好像只是讓他輸出在0~1之間
08/16 01:18, 2F

08/16 14:10, , 3F
cool 沒看過這可以這樣用
08/16 14:10, 3F
文章代碼(AID): #1LppVMQJ (Electronics)
文章代碼(AID): #1LppVMQJ (Electronics)