+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 4
    Points: 1,087, Level: 7

    Join Date
    Mar 2010
    Location
    Ontario
    Posts
    5
    Helped
    0 / 0
    Points
    1,087
    Level
    7

    Help me write an equation in Verilog A

    Hi,
    Can you help me anyone how to write below equation in verilogA?? Your help would greatly appreciate.
    "y=x / (a * exp(-0.5*((x-b)/c)^2) ) +d"

    •   AltAdvertisment

        
       

  2. #2
    Member level 3
    Points: 2,032, Level: 10
    Achievements:
    7 years registered

    Join Date
    Mar 2008
    Location
    Moscow, Russia
    Posts
    54
    Helped
    5 / 5
    Points
    2,032
    Level
    10

    Equation in verilogA

    Write x^y as follows: pow(x,y). Residual write as is.



    •   AltAdvertisment

        
       

  3. #3
    Newbie level 4
    Points: 1,087, Level: 7

    Join Date
    Mar 2010
    Location
    Ontario
    Posts
    5
    Helped
    0 / 0
    Points
    1,087
    Level
    7

    Re: Equation in verilogA

    Hi,
    Sorry I could not understand what you mean. Actually I want 2 make a module and plot this equation. can you explain me clearly how to plot this equation in verilogA please??
    y = x/ (a* exp(-0.5*((x-b)/c)^2)) +d



    •   AltAdvertisment

        
       

  4. #4
    Advanced Member level 3
    Points: 7,235, Level: 20

    Join Date
    Mar 2008
    Location
    USA
    Posts
    773
    Helped
    232 / 232
    Points
    7,235
    Level
    20

    Equation in verilogA

    You cannot "plot" the equation in verilog-a. You need to build a module, simulate it and then plot the result. The equation can be witten as IADanilov said:
    y = x/(a*exp(-0.5*pow((x-b)/c),2))+d;
    you just have to define what the symbols are (real, integer...).

    If you just want to "plot" the equation you could use matlab.



--[[ ]]--