1 2-- Copyright (C) 2001 Bill Billowitch. 3 4-- Some of the work to develop this test suite was done with Air Force 5-- support. The Air Force and Bill Billowitch assume no 6-- responsibilities for this software. 7 8-- This file is part of VESTs (Vhdl tESTs). 9 10-- VESTs is free software; you can redistribute it and/or modify it 11-- under the terms of the GNU General Public License as published by the 12-- Free Software Foundation; either version 2 of the License, or (at 13-- your option) any later version. 14 15-- VESTs is distributed in the hope that it will be useful, but WITHOUT 16-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 18-- for more details. 19 20-- You should have received a copy of the GNU General Public License 21-- along with VESTs; if not, write to the Free Software Foundation, 22-- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 24-- --------------------------------------------------------------------- 25-- 26-- $Id: tc98.vhd,v 1.2 2001-10-26 16:30:02 paw Exp $ 27-- $Revision: 1.2 $ 28-- 29-- --------------------------------------------------------------------- 30 31ENTITY c04s03b02x00p29n02i00098ent_a IS 32 GENERIC ( gen_in : IN INTEGER ); 33 PORT ( prt_in : IN INTEGER ); 34 35 ATTRIBUTE attr1 : INTEGER; 36 ATTRIBUTE attr1 OF gen_in : CONSTANT IS 100; 37 ATTRIBUTE attr1 OF prt_in : SIGNAL IS 200; 38END c04s03b02x00p29n02i00098ent_a; 39 40ARCHITECTURE c04s03b02x00p29n02i00098arch_a OF c04s03b02x00p29n02i00098ent_a IS 41 42BEGIN 43 PROCESS 44 BEGIN 45 ASSERT gen_in'attr1 = 100 REPORT "ERROR: Bad value for gen_in'attr1" SEVERITY FAILURE; 46 ASSERT prt_in'attr1 = 200 REPORT "ERROR: Bad value for prt_in'attr1" SEVERITY FAILURE; 47 assert NOT(gen_in'attr1 = 100 and prt_in'attr1 = 200) 48 report "***PASSED TEST: c04s03b02x00p29n02i00098" 49 severity NOTE; 50 assert (gen_in'attr1 = 100 and prt_in'attr1 = 200) 51 report "***FAILED TEST: c04s03b02x00p29n02i00098 - Attribute reading fail." 52 severity ERROR; 53 wait; 54 END PROCESS; 55END c04s03b02x00p29n02i00098arch_a; 56 57 58 59ENTITY c04s03b02x00p29n02i00098ent IS 60END c04s03b02x00p29n02i00098ent; 61 62ARCHITECTURE c04s03b02x00p29n02i00098arch OF c04s03b02x00p29n02i00098ent IS 63 COMPONENT c04s03b02x00p29n02i00098ent_a 64 GENERIC ( gen_in : IN INTEGER ); 65 PORT ( prt_in : IN INTEGER ); 66 END COMPONENT; 67 FOR cmp1 : c04s03b02x00p29n02i00098ent_a USE ENTITY work.c04s03b02x00p29n02i00098ent_a(c04s03b02x00p29n02i00098arch_a); 68 69 SIGNAL s : INTEGER; 70BEGIN 71 72 cmp1 : c04s03b02x00p29n02i00098ent_a 73 GENERIC MAP ( 0 ) 74 PORT MAP ( s ); 75 76END c04s03b02x00p29n02i00098arch; 77