H
Holger Schmidt
Guest
Hi,
I have a module like this:
module a (b[1], b[0]);
output [1:0] b;
reg [1:0] b;
/* some code that sets b */
endmodule
Now I want to instantiate that module. What works is to have an
ordered
list in the module port connection list like this:
wire c, d;
a e(c, d);
Is it possible to change that to a named port connection like this:
a f(.b({c, d}));
The Verilog reference I have says that the name of a port cannot be a
bit-select. Does that mean that I cannot connect by name to something
that is a bit-select in the module definition or does it mean that I
cannot do something like this:
a g(.b[0](d));
Thanks,
Holger
I have a module like this:
module a (b[1], b[0]);
output [1:0] b;
reg [1:0] b;
/* some code that sets b */
endmodule
Now I want to instantiate that module. What works is to have an
ordered
list in the module port connection list like this:
wire c, d;
a e(c, d);
Is it possible to change that to a named port connection like this:
a f(.b({c, d}));
The Verilog reference I have says that the name of a port cannot be a
bit-select. Does that mean that I cannot connect by name to something
that is a bit-select in the module definition or does it mean that I
cannot do something like this:
a g(.b[0](d));
Thanks,
Holger