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.

Verilog/System Verilog pre-compile features

Status
Not open for further replies.

wisemonkey

Junior Member level 3
Joined
Apr 1, 2010
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
San Jose
Activity points
1,498
Hi,
I'm working on IP core project. so I need few configurable inputs and few user inputs.

I'm using `ifdef and `endif mostly to have different designs and I know (as much as I can remember) those can be used for synthesis as well without any issue if `ifdef-`endif used correctly.

However my issue is, Does SV or Verilog have facility to take user inputs? I want to take width of a signal as an input.

And how to use math functions in SV / Verilog. I want to use log2(number) function or even better I want to see if number is a power of 2 if not then find out immediate power of 2 (I'm interested in power only)

P.S. All these values will be assigned to variables before compilation so I won't call them dynamic as such, however they need to be configurable (in sense of MUX) and one user input.

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top