-1

I am trying to understand a piece of Verilog code as below:

module_name instance_name (
.....
.signal1(signal1_local['SIGNAL_WIDTH - 1 : 0]),
....
);

I am not able to understand the 'SIGNAL_WIDTH , why is the apostrophe (') used here? Can anyone please tell what does it signify? Thanks in advance

toolic
  • 57,801
  • 17
  • 75
  • 117

1 Answers1

1

It is a tick define:

Some where in the code there will be some thing similar to:

'define SIGNAL_WIDTH 10

They tend to be global, so it could be anywhere.

Morgan
  • 19,934
  • 8
  • 58
  • 84
  • Morgan is correct. It's done this way because the code was written such that the signal: signal1 could change in ONE spot (at the `define location) and it would change the width of the signal in the rest of the code. It's good practice. – Russell Oct 08 '13 at 11:02