Re: [問題] Hspice E element語法
※ 引述《profyang (prof)》之銘言:
: 各位大大好
: 想請問一下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不能跑 不知有沒有辦法改寫呢?
: 總之先謝謝各位大大<(_ _)>
仔細研究之下原始的spice真的是很弱(我是用ngspice 功能應該幾乎跟原始spice差不多)
像這種VCVS居然連讓它有個time delay都不行
在Hspice中我們可以這樣寫:
E1 1 0 DELAY 2 0 TD = 1e-09
但在ngspice就不行...
只是要一個電壓是另外一個電壓差個delay這是有很難嗎...?
在數學上應該超簡單才對啊!!
也難怪會有hspice了...原始的spice這真的是很慘
可惜hspice
1.要錢
2.要錢所以每次call的時候都要5秒去認證license
想用matlab跑大量case時很致命
如果是已知範圍的for loop還可以用alter解決
但while loop這種不知道跑到幾時的就真的很GG
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.34.222.1
※ 文章網址: https://www.ptt.cc/bbs/Electronics/M.1439736257.A.DF2.html
推
08/18 18:34, , 1F
08/18 18:34, 1F
推
08/18 22:06, , 2F
08/18 22:06, 2F
→
08/18 22:33, , 3F
08/18 22:33, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):