2 * Copyright (c) 2000-2005 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)
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: net_modulo.cc,v 1.9 2005/09/15 22:54:47 steve Exp $"
31 # include "compiler.h"
38 NetModulo::NetModulo(NetScope
*s
, perm_string n
, unsigned wr
,
39 unsigned wa
, unsigned wb
)
41 width_r_(wr
), width_a_(wa
), width_b_(wb
)
43 pin(0).set_dir(Link::OUTPUT
);
44 pin(0).set_name(perm_string::literal("Result"), 0);
45 pin(1).set_dir(Link::INPUT
);
46 pin(1).set_name(perm_string::literal("DataA"), 0);
47 pin(2).set_dir(Link::INPUT
);
48 pin(2).set_name(perm_string::literal("DataB"), 0);
51 NetModulo::~NetModulo()
55 unsigned NetModulo::width_r() const
60 unsigned NetModulo::width_a() const
65 unsigned NetModulo::width_b() const
70 Link
& NetModulo::pin_Result()
75 const Link
& NetModulo::pin_Result() const
80 Link
& NetModulo::pin_DataA()
85 const Link
& NetModulo::pin_DataA() const
90 Link
& NetModulo::pin_DataB()
95 const Link
& NetModulo::pin_DataB() const
101 * $Log: net_modulo.cc,v $
102 * Revision 1.9 2005/09/15 22:54:47 steve
103 * Fix bug configuring NetModulo pins.
105 * Revision 1.8 2005/03/12 06:43:35 steve
106 * Update support for LPM_MOD.
108 * Revision 1.7 2004/02/18 17:11:56 steve
109 * Use perm_strings for named langiage items.
111 * Revision 1.6 2003/03/06 00:28:41 steve
112 * All NetObj objects have lex_string base names.
114 * Revision 1.5 2002/08/12 01:34:59 steve
115 * conditional ident string using autoconfig.
117 * Revision 1.4 2002/08/11 23:47:04 steve
118 * Add missing Log and Ident strings.