Having the following SystemVerilog code:
module my_module(
input wire [31:0] my_net
);
...
endmodule
...
...
wire [31:0] my_net;
assign my_net = ...;
my_module m(my_net);
What are the consequences (at synthesis time) of change the my_net declaration by:
typedef logic [31:0] my_net_t; // This is actually no longer a net, but a variable.
module my_module(
input my_net_t my_net
);
...
endmodule
my_module m(my_net);
...
...
wire [31:0] my_net;
assign my_net = ...;
my_module m(my_net);
I mean, logic is a variable, not a net, therefore, will the synthesizer generate a register for my_net?
Incorrect.
logicis a data type that can be applied to a variable or net.are implicitly the same as
When internal to a module
are implicitly
But regardless of
my_netbeing a variable or net, a continuous assignment tomy_netdoes not create a register.