A
Andreas Ehliar
Guest
When I'm creating an RTL design I usually end up with quite a few
unconnected signals. As an example, in a processor I'm working on I
have put all control signals for a certain pipeline stage in one
large vector, something like this:
`define ALU_CTRL [2:0]
`define MAC_CTRL [5:3]
`define OTHER_STUFF [9:6]
`define YET_MORE_OTHER_STUFF [29:10]
// This define trick is quite ugly and it would be nicer to use
// SystemVerilog's interfaces here, but I would probably have
// the same problems.
And in the ALU module I can do something like:
case(pipeline_ctrl_execute`ALU_CTRL)
3'b000: result <= a + b;
3'b001: result <= a - b;
... and so on
The advantage is that the top level module is quite simple as I don't
have hundreds of control signals for the various modules all over the
place. The disadvantage is that I get hundreds of synthesis warnings
about unused signals. For example, when synthesizing the ALU I get
warned that pipeline_ctrl_execute[29:3] are unconnected. (With XST as
a synthesis tool I get one line for every signal that is unconnected
which is fairly annoying...)
So, a question for the group: How do you handle unconnected/unused
signals in a module?
Do you:
* Make sure that they never occur by painfully making sure that all
inputs are always used in some way in all modules?
* Ignore the problem and all warnings about unconnected signals in the
logfile?
* Add all "approved" unconnected signals to a logfile filter?
* Use verilog-mode's /*AUTOUNUSED*/? Doesn't work for partial signals(?)
* Something else?
/Andreas
unconnected signals. As an example, in a processor I'm working on I
have put all control signals for a certain pipeline stage in one
large vector, something like this:
`define ALU_CTRL [2:0]
`define MAC_CTRL [5:3]
`define OTHER_STUFF [9:6]
`define YET_MORE_OTHER_STUFF [29:10]
// This define trick is quite ugly and it would be nicer to use
// SystemVerilog's interfaces here, but I would probably have
// the same problems.
And in the ALU module I can do something like:
case(pipeline_ctrl_execute`ALU_CTRL)
3'b000: result <= a + b;
3'b001: result <= a - b;
... and so on
The advantage is that the top level module is quite simple as I don't
have hundreds of control signals for the various modules all over the
place. The disadvantage is that I get hundreds of synthesis warnings
about unused signals. For example, when synthesizing the ALU I get
warned that pipeline_ctrl_execute[29:3] are unconnected. (With XST as
a synthesis tool I get one line for every signal that is unconnected
which is fairly annoying...)
So, a question for the group: How do you handle unconnected/unused
signals in a module?
Do you:
* Make sure that they never occur by painfully making sure that all
inputs are always used in some way in all modules?
* Ignore the problem and all warnings about unconnected signals in the
logfile?
* Add all "approved" unconnected signals to a logfile filter?
* Use verilog-mode's /*AUTOUNUSED*/? Doesn't work for partial signals(?)
* Something else?
/Andreas