1

I have a parameterized verilog module with a bitwidth that is variable depending on the value given in `define WIDTH.

However, I would like to be able to somehow change the value of WIDTH by passing in a parameter during synthesis using design compiler.

I was wondering if there is a way to do this?

For instance, I'd like to be able to write the following for my input file for design compiler:

analyze -format sverilog -define WIDTH 10 myverilogfile.v
1
  • 1
    That probably depends on your design compiler, refer to the user manual first. One idea, if that functionality isn't built into the compiler, is to write a small script to substitute a keyword with a value, then run the analyze function. Commented Mar 29, 2015 at 3:42

2 Answers 2

4

For Design Compiler the format is:

analyze -format sverilog -define WIDTH=10,DEPTH=128 myverilogfile.v
Sign up to request clarification or add additional context in comments.

1 Comment

What about if I am using parameterized modules? not a defines file
0

Yes, most compilers will let you do this. It is tool-specific, though, there is no standard spec for this. The most common format to do this would be +define+WIDTH=10; you would have to check the documentation or help for your compiler though (or experiment)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.