Guest
This question is for SV LRM gurus. I often declare my modules as follows:
`default_net_type none
module m...
(
input wire ...
inout wire ...
output logic
);
logic ...
endmodule : m
`default_net_type wire
I use "`default_net_type none" at the beginning to catch nets not declared at simulation time. I also switched from wire/reg for I/Os and signals to logic for all. The side-effect of "`default_net_type none" seems to be force me to declare module inputs and inouts as wires!
I am not sure why that does not affect outputs.
Is there a better solution to catch undeclared nets and at the same time declare all signals (I/Os or otherwise) as logic?
-- Amal
`default_net_type none
module m...
(
input wire ...
inout wire ...
output logic
);
logic ...
endmodule : m
`default_net_type wire
I use "`default_net_type none" at the beginning to catch nets not declared at simulation time. I also switched from wire/reg for I/Os and signals to logic for all. The side-effect of "`default_net_type none" seems to be force me to declare module inputs and inouts as wires!
I am not sure why that does not affect outputs.
Is there a better solution to catch undeclared nets and at the same time declare all signals (I/Os or otherwise) as logic?
-- Amal