I need a code to realize this function in verilog-a

Status
Not open for further replies.

colorcircle

Newbie level 3
Joined
Apr 20, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
code?

Hii
I need a code to realize this function in verilog-a
Vout=2*V*(1+3*V^2 +4*V^4)
where Vout is output voltage
and V is the input voltage.
am new to this thing,maybe above is easy for you
so please suggest.
thank you
 

i didnt check the following, if it has problem please let me know

but it seems like this;

`include "disciplines.h"
`include "constants.h

module equation(vout,vin);
output vout;
input vin;
electrical vout, vin;
//define input, output

analog begin
V(vout) <+ 2*V(vin) * (1+3*pow(V(vin),2) + 4*pow(V(vin),4)) ;
// <+ assign voltage value
end

endmodule


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