Hi,
The ISE is looking for .ant file and pointing the errors in .ant file.
It happens when I try to generate the "Self checking test bench". The
code is as follows
--------------------------------------------------------------------------------
-- Copyright (c) 1995-2003 Xilinx, Inc.
-- All Right Reserved.
--------------------------------------------------------------------------------
-- ____ ____
-- / /\/ /
-- /___/ \ / Vendor: Xilinx
-- \ \ \/ Version : 10.1
-- \ \ Application : ISE
-- / / Filename : USB_TEST.ant
-- /___/ /\ Timestamp : Thu Feb 12 16:46:47 2009
-- \ \ / \
-- \___\/\___\
--
--Command:
--Design Name: USB_TEST
--Device: Xilinx
--
library IEEE;
use IEEE.Std_logic_1164.ALL;
use IEEE.Numeric_std.ALL;
use IEEE.STD_LOGIC_TEXTIO.ALL;
library STD;
use STD.TEXTIO.ALL;
--USE IEEE.STD_LOGIC_ARITH.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY USB_TEST IS
END USB_TEST;
ARCHITECTURE testbench_arch OF USB_TEST IS
FILE RESULTS: TEXT OPEN WRITE_MODE IS "C:\VHDL_PROGRAMS
\Phil_prj_2\sdramtst\XSA\3S1000\USB_Writer_CPLD\USB_TEST.ano";
COMPONENT DPR_Writer
PORT (
Data_Bus : Out UNSIGNED (13 DownTo 0);
Address_bus : Out UNSIGNED (18 DownTo 0);
Read_write : Out std_logic;
Output_Enable : Out std_logic;
CE0 : Out std_logic;
CE1 : Out std_logic;
LBL : Out std_logic;
UBL : Out std_logic;
USB_Data : In UNSIGNED (7 DownTo 0);
USB_CLK : In std_logic;
ZZL : Out std_logic;
SEML : Out std_logic;
OPTL : In std_logic;
Reset : In std_logic;
Indicator_LED : Out std_logic
);
END COMPONENT;
SIGNAL Data_Bus : UNSIGNED (13 DownTo 0) := "00000000000000";
SIGNAL Address_bus : UNSIGNED (18 DownTo 0) :=
"0000000000000000000";
SIGNAL Read_write : std_logic := '0';
SIGNAL Output_Enable : std_logic := '0';
SIGNAL CE0 : std_logic := '0';
SIGNAL CE1 : std_logic := '0';
SIGNAL LBL : std_logic := '0';
SIGNAL UBL : std_logic := '0';
SIGNAL USB_Data : UNSIGNED (7 DownTo 0) := "00000000";
SIGNAL USB_CLK : std_logic := '0';
SIGNAL ZZL : std_logic := '0';
SIGNAL SEML : std_logic := '0';
SIGNAL OPTL : std_logic := '0';
SIGNAL Reset : std_logic := '0';
SIGNAL Indicator_LED : std_logic := '0';
SHARED VARIABLE TX_ERROR : INTEGER := 0;
SHARED VARIABLE TX_OUT : LINE;
constant PERIOD : time := 100 ns;
constant DUTY_CYCLE : real := 0.5;
constant OFFSET : time := 0 ns;
BEGIN
UUT : DPR_Writer
PORT MAP (
Data_Bus => Data_Bus,
Address_bus => Address_bus,
Read_write => Read_write,
Output_Enable => Output_Enable,
CE0 => CE0,
CE1 => CE1,
LBL => LBL,
UBL => UBL,
USB_Data => USB_Data,
USB_CLK => USB_CLK,
ZZL => ZZL,
SEML => SEML,
OPTL => OPTL,
Reset => Reset,
Indicator_LED => Indicator_LED
);
PROCESS -- clock process for USB_CLK
BEGIN
WAIT for OFFSET;
CLOCK_LOOP : LOOP
USB_CLK <= '0';
WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
USB_CLK <= '1';
WAIT FOR (PERIOD * DUTY_CYCLE);
END LOOP CLOCK_LOOP;
END PROCESS;
PROCESS -- Annotation process for USB_CLK
VARIABLE TX_TIME : INTEGER := 0;
PROCEDURE ANNOTATE_Data_Bus(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", Data_Bus, "));
STD.TEXTIO.write(TX_LOC, Data_Bus);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_Address_bus(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", Address_bus, "));
STD.TEXTIO.write(TX_LOC, Address_bus);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_Read_write(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", Read_write, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, Read_write);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_Output_Enable(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", Output_Enable,
"));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, Output_Enable);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_CE0(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", CE0, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, CE0);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_CE1(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", CE1, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, CE1);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_LBL(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", LBL, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, LBL);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_UBL(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", UBL, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, UBL);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_ZZL(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", ZZL, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, ZZL);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_SEML(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", SEML, "));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, SEML);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
PROCEDURE ANNOTATE_Indicator_LED(
TX_TIME : INTEGER
) IS
VARIABLE TX_STR : String(1 to 4096);
VARIABLE TX_LOC : LINE;
BEGIN
STD.TEXTIO.write(TX_LOC, string'("Annotate["));
STD.TEXTIO.write(TX_LOC, TX_TIME);
STD.TEXTIO.write(TX_LOC, string'(", Indicator_LED,
"));
IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, Indicator_LED);
STD.TEXTIO.write(TX_LOC, string'("]"));
TX_STR(TX_LOC.all'range) := TX_LOC.all;
STD.TEXTIO.writeline(RESULTS, TX_LOC);
STD.TEXTIO.Deallocate(TX_LOC);
END;
BEGIN
WAIT for 1 fs;
ANNOTATE_Data_Bus(0);
ANNOTATE_Address_bus(0);
ANNOTATE_Read_write(0);
ANNOTATE_Output_Enable(0);
ANNOTATE_CE0(0);
ANNOTATE_CE1(0);
ANNOTATE_LBL(0);
ANNOTATE_UBL(0);
ANNOTATE_ZZL(0);
ANNOTATE_SEML(0);
ANNOTATE_Indicator_LED(0);
WAIT for OFFSET;
TX_TIME := TX_TIME + 0;
ANNO_LOOP : LOOP
--Rising Edge
WAIT for 65 ns;
TX_TIME := TX_TIME + 65;
ANNOTATE_Data_Bus(TX_TIME);
ANNOTATE_Address_bus(TX_TIME);
ANNOTATE_Read_write(TX_TIME);
ANNOTATE_Output_Enable(TX_TIME);
ANNOTATE_CE0(TX_TIME);
ANNOTATE_CE1(TX_TIME);
ANNOTATE_LBL(TX_TIME);
ANNOTATE_UBL(TX_TIME);
ANNOTATE_ZZL(TX_TIME);
ANNOTATE_SEML(TX_TIME);
ANNOTATE_Indicator_LED(TX_TIME);
WAIT for 35 ns;
TX_TIME := TX_TIME + 35;
END LOOP ANNO_LOOP;
END PROCESS;
PROCESS
BEGIN
-- ------------- Current Time: 135ns
WAIT FOR 135 ns;
Reset <= '1';
-- -------------------------------------
-- ------------- Current Time: 235ns
WAIT FOR 100 ns;
Reset <= '0';
-- -------------------------------------
WAIT FOR 999865 ns;
STD.TEXTIO.write(TX_OUT, string'("Total[]"));
STD.TEXTIO.writeline(RESULTS, TX_OUT);
ASSERT (FALSE) REPORT
"Success! Simulation for annotation completed"
SEVERITY FAILURE;
END PROCESS;
END testbench_arch;
Regards,
John