2 * Copyright (c) 2003 Michael Ruff (mruff at chiaro.com)
4 * This source code is free software; you can redistribute it
5 * and/or modify it in source code form under the terms of the GNU
6 * General Public License as published by the Free Software
7 * Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 #ident "$Id: a_handle_by_name.c,v 1.2 2003/06/17 16:55:07 steve Exp $"
23 # include <acc_user.h>
24 # include <vpi_user.h>
30 * acc_handle_by_name implemented using VPI interface
32 handle
acc_handle_by_name(const char*obj_name
, handle scope
)
37 /* if no scope provided, use tasks scope */
39 sys_h
= vpi_handle(vpiSysTfCall
, 0 /* NULL */);
40 scope
= vpi_handle(vpiScope
, sys_h
);
43 res
= vpi_handle_by_name(obj_name
, scope
);
46 fprintf(pli_trace
, "acc_handle_by_name(\"%s\", scope=%s) "
47 " --> %p\n", obj_name
,
48 vpi_get_str(vpiFullName
, scope
), res
);
55 * $Log: a_handle_by_name.c,v $
56 * Revision 1.2 2003/06/17 16:55:07 steve
57 * 1) setlinebuf() for vpi_trace
58 * 2) Addes error checks for trace file opens
59 * 3) removes now extraneous flushes
60 * 4) fixes acc_next() bug
62 * Revision 1.1 2003/05/24 03:02:04 steve
63 * Add implementation of acc_handle_by_name.