[PATCH] Implement System Verilog $urandom and $urandom_range functions.
[iverilog.git] / PUdp.cc
blob18c6f196941abb64fe7d898c1fc28e5e146a25b0
1 /*
2 * Copyright (c) 2003-2004 Stephen Williams (steve@icarus.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)
8 * any later version.
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
19 #ifdef HAVE_CVS_IDENT
20 #ident "$Id: PUdp.cc,v 1.3 2004/03/08 00:47:44 steve Exp $"
21 #endif
23 # include "PUdp.h"
25 PUdp::PUdp(perm_string n, unsigned nports)
26 : ports(nports), sequential(false), initial(verinum::Vx), name_(n)
30 unsigned PUdp::find_port(const char*name)
32 for (unsigned idx = 0 ; idx < ports.count() ; idx += 1) {
34 if (ports[idx] == name)
35 return idx;
38 return ports.count();
42 * $Log: PUdp.cc,v $
43 * Revision 1.3 2004/03/08 00:47:44 steve
44 * primitive ports can bind bi name.
46 * Revision 1.2 2004/02/18 17:11:54 steve
47 * Use perm_strings for named langiage items.
49 * Revision 1.1 2003/07/15 05:07:13 steve
50 * Move PUdp constructor into compiled file.