M
Mike
Guest
There seems to be a problem using named association with ModelSim. If
I instantiate a component with:
uut: cnt8
port map (
clk_i => clk,
n_reset_i => n_reset,
tco_o => tco,
q_o(0) => cnt_q(0),
q_o(1) => cnt_q(1),
q_o(2) => cnt_q(2),
q_o(3) => cnt_q(3),
q_o(4) => cnt_q(4),
q_o(5) => cnt_q(5),
q_o(6) => cnt_q(6),
q_o(7) => cnt_q(7)
);
then everything is fine. However if I use
uut: cnt8
port map (
clk_i => clk,
n_reset_i => n_reset,
tco_o => tco,
q_o(0) => cnt_q(0),
tco_o => tco,
q_o(1) => cnt_q(1),
q_o(2) => cnt_q(2),
q_o(3) => cnt_q(3),
q_o(4) => cnt_q(4),
q_o(5) => cnt_q(5),
q_o(6) => cnt_q(6),
q_o(7) => cnt_q(7)
);
(Note I have moved the wiring of tco_o) Then ModelSim complains with
the message
"# ** Error: top.vhd(41): association q_o has already been specified."
Has anyone else come accross this problem?
OK, I know the solution is to write code as per the first example, or
even better to use
q_o => cnt_q
but this is just an example. In reality the VHDL is generated by a
Xilinx program called ngc2hdl which takes a netlist in ngc format and
wraps it in VHDL so that it can be simulated. Or not as the case may
be.
Any ideas?
Mike
I instantiate a component with:
uut: cnt8
port map (
clk_i => clk,
n_reset_i => n_reset,
tco_o => tco,
q_o(0) => cnt_q(0),
q_o(1) => cnt_q(1),
q_o(2) => cnt_q(2),
q_o(3) => cnt_q(3),
q_o(4) => cnt_q(4),
q_o(5) => cnt_q(5),
q_o(6) => cnt_q(6),
q_o(7) => cnt_q(7)
);
then everything is fine. However if I use
uut: cnt8
port map (
clk_i => clk,
n_reset_i => n_reset,
tco_o => tco,
q_o(0) => cnt_q(0),
tco_o => tco,
q_o(1) => cnt_q(1),
q_o(2) => cnt_q(2),
q_o(3) => cnt_q(3),
q_o(4) => cnt_q(4),
q_o(5) => cnt_q(5),
q_o(6) => cnt_q(6),
q_o(7) => cnt_q(7)
);
(Note I have moved the wiring of tco_o) Then ModelSim complains with
the message
"# ** Error: top.vhd(41): association q_o has already been specified."
Has anyone else come accross this problem?
OK, I know the solution is to write code as per the first example, or
even better to use
q_o => cnt_q
but this is just an example. In reality the VHDL is generated by a
Xilinx program called ngc2hdl which takes a netlist in ngc format and
wraps it in VHDL so that it can be simulated. Or not as the case may
be.
Any ideas?
Mike