Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Systemverilog "math_real" equivalent

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,639
Helped
302
Reputation
606
Reaction score
297
Trophy points
1,363
Activity points
18,215
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 ?
 

dave_59

Advanced Member level 3
Joined
Dec 15, 2011
Messages
812
Helped
361
Reputation
726
Reaction score
354
Trophy points
1,353
Location
Fremont, CA, USA
Activity points
6,240
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
 
  • Like
Reactions: shaiko

    shaiko

    points: 2
    Helpful Answer Positive Rating

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,639
Helped
302
Reputation
606
Reaction score
297
Trophy points
1,363
Activity points
18,215
Thanks dave_59,
Can the trigonometric functions be used in synthesis (during compile time) to setup values for constants ?
 

dave_59

Advanced Member level 3
Joined
Dec 15, 2011
Messages
812
Helped
361
Reputation
726
Reaction score
354
Trophy points
1,353
Location
Fremont, CA, USA
Activity points
6,240
I don't see why not, but you'll have to check with your specific synthesis tool
 
  • Like
Reactions: shaiko

    shaiko

    points: 2
    Helpful Answer Positive Rating
Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top