1 /* Definitions to support the interrupt controller.
2    Copyright 2001, 2002 Brian R. Gaeke.
3    Copyright 2002, 2003 Paul Twohey.
4 
5 This file is part of VMIPS.
6 
7 VMIPS is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
11 
12 VMIPS is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License along
18 with VMIPS; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
20 
21 #ifndef _INTCTRL_H_
22 #define _INTCTRL_H_
23 
24 #include "types.h"
25 #include <vector>
26 class DeviceInt;
27 
28 class IntCtrl {
29 private:
30 	typedef std::vector<DeviceInt *> Devices;
31 	Devices devs;
32 
33 public:
IntCtrl()34 	IntCtrl() { }
~IntCtrl()35 	virtual ~IntCtrl() { }
36 
37 	/* Return the mask of all asserted interrupts for connected devices. */
38 	virtual uint32 calculateIP();
39 
40 	/* Connect interrupt line LINE (see deviceint.h) to device DEV. */
41 	virtual void connectLine(uint32 line, DeviceInt *dev);
42 };
43 
44 #endif /* _INTCTRL_H_ */
45