Problem with the rename refactor on a newly added port that hasn't been added to the instantiation in a higher level.

Given a top level file:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity testtop is
end entity;
architecture tb of testtop is
signal clk : std_logic;
signal reset : std_logic;
signal output : std_logic;
begin
DUT: entity work.test_bottom
port map ( clk => clk, reset => reset, output => output
);
end tb;

and a lower level file:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity test_bottom is
port ( clk : in std_logic; reset : in std_logic; -- test_input : in std_logic; --UNCOMMENT THIS LINE output : out std_logic
);
end entity;
architecture rtl of test_bottom is
begin
output <= '0'; --COMMENT OUT THIS LINE
--output <= test_input; --UNCOMMENT THIS LINE
end;

Follow the directions in the comments of the lower level file by adding a new port called test_input and assigning test_input to the output signal giving you a file that looks like this:
 library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity test_bottom is
port ( clk : in std_logic; reset : in std_logic; test_input : in std_logic; --UNCOMMENT THIS LINE output : out std_logic
);
end entity;
architecture rtl of test_bottom is
begin
--output <= '0'; --COMMENT OUT THIS LINE
output <= test_input; --UNCOMMENT THIS LINE
end;
Don't change the upper level file yet. Do a rename refactor on test input in the lower file to change it's name to test, then open up the top level file and look at the incorrect change:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity testtop is
end entity;
architecture tb of testtop is
signal clk : std_logic;
signal reset : std_logic;
signal output : std_logic;
begin
DUT: entity work.test_bottom
port map ( clk => clk, reset => reset, test => output --Problem is here, test is a new port, now we're missing output and test is incorrectly assigned and no errors are flagged. This should leave output alone and flag an error that input test is missing (which is flagged pre-rename)
);
end tb;

Rename

Hi Nathanael,

thanks for the step by step explanation. I'll try to reproduce it tomorrow.

Thanks,
Hendrik.

ticket:1854

Hi Nathanael,

I could reproduce this issue. I have logged it as ticket:1854.
I have no idea what is going wrong here. We will have to debug.

Thanks,
Hendrik.

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.