1 2-- Copyright (C) 2002 Morgan Kaufmann Publishers, Inc 3 4-- This file is part of VESTs (Vhdl tESTs). 5 6-- VESTs is free software; you can redistribute it and/or modify it 7-- under the terms of the GNU General Public License as published by the 8-- Free Software Foundation; either version 2 of the License, or (at 9-- your option) any later version. 10 11-- VESTs is distributed in the hope that it will be useful, but WITHOUT 12-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14-- for more details. 15 16-- You should have received a copy of the GNU General Public License 17-- along with VESTs; if not, write to the Free Software Foundation, 18-- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20entity inline_05 is 21 22end entity inline_05; 23 24 25---------------------------------------------------------------- 26 27 28architecture test of inline_05 is 29 30 type stimulus_list is array (natural range <>) of integer; 31 32 33 -- code from book: 34 35 function "&" ( a, b : stimulus_list ) return stimulus_list; 36 37 attribute debug : string; 38 attribute debug of 39 "&" [ stimulus_list, stimulus_list return stimulus_list ] : function is 40 "source_statement_step"; 41 42 43 type mvl is ('X', '0', '1', 'Z'); 44 type mvl_vector is array ( integer range <>) of mvl; 45 function resolve_mvl ( drivers : mvl_vector ) return mvl; 46 47 subtype resolved_mvl is resolve_mvl mvl; 48 49 50 type builtin_types is (builtin_bit, builtin_mvl, builtin_integer); 51 attribute builtin : builtin_types; 52 53 attribute builtin of resolved_mvl : subtype is builtin_mvl; 54 55 -- end of code from book 56 57 function "&" ( a, b : stimulus_list ) return stimulus_list is 58 begin 59 return stimulus_list'(1 to 0 => 0); 60 end function "&"; 61 62 function resolve_mvl ( drivers : mvl_vector ) return mvl is 63 begin 64 return drivers(drivers'left); 65 end function resolve_mvl; 66 67begin 68end architecture test; 69