afridi
Junior Member
![* *](https://designers-guide.org/forum/Templates/Forum/default/starblue.gif)
Offline
Posts: 24
|
Help me understand this verilog-A code .I simply dont know anything about verilog-A. I want to modify this code for low voltage of 0 and high voltage of 2.5V.Can anyone help me modify this.
This is a code for a comparator
" module comparator(sigin, sigref, sigout); input sigin, sigref; output sigout; electrical sigin, sigref, sigout; parameter real sigout_high = 10; parameter real sigout_low = -10; parameter real sigin_offset = 0; parameter real comp_slope =1000;
analog begin
@ ( initial_step ) begin if (sigout_high <= sigout_low) begin $display("Range specification error. sigout_high = (%E) less than sigout_low = (%E).\n", sigout_high, sigout_low ); $finish; end end
V(sigout) <+ 0.5 * (sigout_high - sigout_low) * tanh(comp_slope*(V(sigin, sigref)- sigin_offset)) + (sigout_high + sigout_low)/2;
"
REGARDS
|