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
Veridian
  • 3,531
  • 12
  • 46
  • 80
  • 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. – N8TRO Mar 29 '15 at 03:42

2 Answers2

4

For Design Compiler the format is:

analyze -format sverilog -define WIDTH=10,DEPTH=128 myverilogfile.v
Morgan
  • 19,934
  • 8
  • 58
  • 84
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)

BobH
  • 86
  • 3