0

In my code, I've to use some registers which are used to store some values for making decision in code. They don't directly take values from input wire. Now, I'm getting ...

Signal is assigned but never used. This unconnected signal will be trimmed during the optimization process.

Should I ignore this warning? My simulation works correctly.

toolic
  • 57,801
  • 17
  • 75
  • 117
Tusher
  • 41
  • 1
  • 1
  • 4
  • The synthesizer will just tear out all that logic and anything below it so it will not effect your final design. However, I strongly agree with @toolic you should probably remove the signals unless you plan on using them in the future. At least comment them out. It is a good practice. – NKamrath Apr 17 '15 at 19:09
  • This massage means you are not using these signals. If you are realy using them, considder this message as an error. One possible cause could be an unreached state so these signals are never tested or a second condition that's always true/false so your signals are not needed for a transition/output generation. – Paebbels Apr 17 '15 at 20:19

1 Answers1

5

The short answer is: no, you shouldn't. The long answer is (as usually) "it depends".

Assigned signals that are detected as not being in use could mean that you forgot to connect a port of your module, or you mispelled a signal name. In these cases, it is likely that your design won't behave as expected.

On the other hand, there is a kind of construction that usually leads to this warning: the case in that a register is defined with N bits, although only some of them are actually used (for example, an 8 bit control register in a device, in which only bit 0 is used). In this case, the warning can be safely ignored. Your simulation will not be affected by this.

So just ask yourself whether that particular signal should be used (read) by any other part in your design or not.

mcleod_ideafix
  • 11,128
  • 2
  • 24
  • 32