Verilog A problem: Equation with internal variable

Status
Not open for further replies.

prcken

Advanced Member level 1
Joined
Nov 1, 2006
Messages
419
Helped
41
Reputation
82
Reaction score
38
Trophy points
1,308
Location
Shanghai
Visit site
Activity points
4,059
Hi I had a problem to write an equation in verilog-A.
i want to express the change of minority carrier concentration (del_N) in the pn junction as a variable of the applied voltage (V(P,N)) and the distance of the pn junction (x).
but I just need to vary the distance x inside the code, I don't want x to be an input. Basically, del_N is different at different x positions.
Please check the following picture, and any idea how to do that in verilogA? in Matlab, it's easy to define x in vector format as this x = j:i:k, where i is the increment, j and k is the starting distance and stop distance, respectively.
Thanks!


I also tried to use genvar in veriloga, as following. but it pops out an error says genvar expression need to be integer.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…