Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

exponential operator in verilog

Status
Not open for further replies.

ssrk1050

Newbie level 3
Joined
Oct 4, 2018
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
25
For simulating exponential function in verilog, I used ** operator in modelsim but i could not implement it. Can you tell me how to ***** exponential function using verilog?
 

Make sure your compiler is configured to Verilog 2001 or above.
The ** operator has been introduced in the 2001 standard.
 

For simulating exponential function in verilog, I used ** operator in modelsim but i could not implement it. Can you tell me how to ***** exponential function using verilog?

You mean it didn't synthesise? That is expected.
 

Th OP mentioned he's trying to simulate.
 

yes, can you suggest me how to synthesis exponential function(xilinx implementation)?
 

Use an IP core from the catalog.
 

i want implementaion program on xilinx only for exponential function (ex: exp(x))
 

As I said, if you want - you can use an IP core from Vivado's / ISE catalogs. It's free of charge.
If you want something custom - choose an algorithm and write it in Verilog...
 

And if it turns out that your exponent is a power of 2, you should be using the shift operator, which is synthesizable.
 

And if it turns out that your exponent is a power of 2, you should be using the shift operator, which is synthesizable.
Suppose we're trying to do x^4 (and 4 is a power of 2...) - how can you calculate the result by simply shifting ?
 

I meant if the expression involves a power of 2

X * 2**N
X & (2**N-1)


These expressions are synthesizable.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top