Systemverilog "math_real" equivalent

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

VHDL has the "math_real" package.
This package has very useful functions such as trigonometrics, power, square root, etc...
Does Systemverilog have something equivalent ?
 

SystemVerilog has all these function built-in to the language, and not a separate package. See section 20.8.2 Real math functions in the IEEE 1800-2017 SystemVerilog LRM. Note that the power function is available as the operator x**y
 
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Thanks dave_59,
Can the trigonometric functions be used in synthesis (during compile time) to setup values for constants ?
 

I don't see why not, but you'll have to check with your specific synthesis tool
 
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…