K
Ken Cecka
Guest
Hi All,
I've got a testbench framework I've been using for a while now in Xilinx ISim and it's been working well, but I recently tried to migrate it to another project and ran into all kinds of problems with ISim hanging. I finally tracked it down to a signal I had removed because it was unused.
I've boiled it down to a minimal testcase which I'll be submitting to Xilinx, but I thought I'd ask about it here first in case I'm doing something horribly abusive/invalid with the language. In the code pasted below, things work fine as long as dummy is present. If I comment out dummy, ISim hangs for several minutes and then exits.
Other points of interest:
- if I change 'r' to an integer, isim never hangs
(irrespective of dummy)
- if I leave 'r' as a record but put it inside tb, isim always hangs
(irrespective of dummy)
Ken
-------------------------------------------------------------------------------
PACKAGE pkg IS
TYPE rec IS
RECORD
sig : INTEGER;
END RECORD;
SIGNAL r : rec;
COMPONENT dut IS PORT ( r : IN rec );
END COMPONENT;
END pkg;
-------------------------------------------------------------------------------
USE WORK.pkg.ALL;
ENTITY dut IS PORT ( r : IN rec );
END dut;
ARCHITECTURE model OF dut IS
SIGNAL dummy : INTEGER;
BEGIN
END;
-------------------------------------------------------------------------------
USE WORK.pkg.ALL;
ENTITY tb IS
END tb;
ARCHITECTURE model OF tb IS
BEGIN
WRAPPER : dut PORT MAP (r => r);
PROCESS
BEGIN
WAIT FOR 1500 ns;
ASSERT (FALSE) REPORT "Done!" SEVERITY NOTE;
WAIT;
END PROCESS;
END;
I've got a testbench framework I've been using for a while now in Xilinx ISim and it's been working well, but I recently tried to migrate it to another project and ran into all kinds of problems with ISim hanging. I finally tracked it down to a signal I had removed because it was unused.
I've boiled it down to a minimal testcase which I'll be submitting to Xilinx, but I thought I'd ask about it here first in case I'm doing something horribly abusive/invalid with the language. In the code pasted below, things work fine as long as dummy is present. If I comment out dummy, ISim hangs for several minutes and then exits.
Other points of interest:
- if I change 'r' to an integer, isim never hangs
(irrespective of dummy)
- if I leave 'r' as a record but put it inside tb, isim always hangs
(irrespective of dummy)
Ken
-------------------------------------------------------------------------------
PACKAGE pkg IS
TYPE rec IS
RECORD
sig : INTEGER;
END RECORD;
SIGNAL r : rec;
COMPONENT dut IS PORT ( r : IN rec );
END COMPONENT;
END pkg;
-------------------------------------------------------------------------------
USE WORK.pkg.ALL;
ENTITY dut IS PORT ( r : IN rec );
END dut;
ARCHITECTURE model OF dut IS
SIGNAL dummy : INTEGER;
BEGIN
END;
-------------------------------------------------------------------------------
USE WORK.pkg.ALL;
ENTITY tb IS
END tb;
ARCHITECTURE model OF tb IS
BEGIN
WRAPPER : dut PORT MAP (r => r);
PROCESS
BEGIN
WAIT FOR 1500 ns;
ASSERT (FALSE) REPORT "Done!" SEVERITY NOTE;
WAIT;
END PROCESS;
END;