Index: sid/include/sidbusutil.h =================================================================== RCS file: /cvs/src/src/sid/include/sidbusutil.h,v retrieving revision 1.15 diff -c -p -r1.15 sidbusutil.h *** sid/include/sidbusutil.h 10 May 2005 15:48:22 -0000 1.15 --- sid/include/sidbusutil.h 2 Aug 2005 18:19:15 -0000 *************** *** 1,6 **** // sidbusutil.h -*- C++ -*- Different types and sizes of buses. ! // Copyright (C) 1999, 2000, 2001, 2002, 2004 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. --- 1,6 ---- // sidbusutil.h -*- C++ -*- Different types and sizes of buses. ! // Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** namespace sidutil *** 1213,1220 **** running_pin.set_active_high (); add_pin ("active", & active_pin); active_pin.set_active_high (); - add_pin ("passthrough", & passthrough_pin); - passthrough_pin.set_active_high (); } ~bus_arbitrator () throw () { } --- 1213,1218 ---- *************** namespace sidutil *** 1289,1295 **** sid::bus::status write(int upstream, sid::host_int_4 addr, DataType data) { ! if (ulog_level >= 8 || ! check_passthrough ()) log (5, "%s: received write request from %s interface at 0x%x\n", name.c_str (), up2str(upstream), addr); return arbitrate_write (upstream, downstream_for_address (addr), addr, data); --- 1287,1293 ---- sid::bus::status write(int upstream, sid::host_int_4 addr, DataType data) { ! if (ulog_level >= 8 || ! check_passthrough (upstream)) log (5, "%s: received write request from %s interface at 0x%x\n", name.c_str (), up2str(upstream), addr); return arbitrate_write (upstream, downstream_for_address (addr), addr, data); *************** namespace sidutil *** 1299,1305 **** sid::bus::status read(int upstream, sid::host_int_4 addr, DataType& data) { ! if (ulog_level >= 8 || ! check_passthrough ()) log (5, "%s: received read request from %s interface at 0x%x\n", name.c_str (), up2str(upstream), addr); return arbitrate_read (upstream, downstream_for_address (addr), addr, data); --- 1297,1303 ---- sid::bus::status read(int upstream, sid::host_int_4 addr, DataType& data) { ! if (ulog_level >= 8 || ! check_passthrough (upstream)) log (5, "%s: received read request from %s interface at 0x%x\n", name.c_str (), up2str(upstream), addr); return arbitrate_read (upstream, downstream_for_address (addr), addr, data); *************** namespace sidutil *** 1335,1341 **** DataType& data) { // Check for direct passthrough ! if (check_passthrough ()) return downstream_bus (downstream)->read (addr, data); // Prioritize the request --- 1333,1339 ---- DataType& data) { // Check for direct passthrough ! if (check_passthrough (upstream)) return downstream_bus (downstream)->read (addr, data); // Prioritize the request *************** namespace sidutil *** 1354,1360 **** DataType data) { // Check for direct passthrough ! if (check_passthrough ()) return downstream_bus (downstream)->write(addr, data); // Prioritize the request --- 1352,1358 ---- DataType data) { // Check for direct passthrough ! if (check_passthrough (upstream)) return downstream_bus (downstream)->write(addr, data); // Prioritize the request *************** namespace sidutil *** 1410,1431 **** return s; } ! bool check_passthrough () { - if (passthrough_pin.state () == binary_pin_active) - { - log (8, "%s: passthrough enabled\n", name.c_str ()); - return true; - } - if (running_pin.state () != binary_pin_active || active_pin.state () != binary_pin_active) { log (8, "%s: system is idle -- passthrough\n", name.c_str ()); return true; } ! return false; ! } protected: // Route locking --- 1408,1429 ---- return s; } ! virtual bool check_passthrough (int = 0) { if (running_pin.state () != binary_pin_active || active_pin.state () != binary_pin_active) { log (8, "%s: system is idle -- passthrough\n", name.c_str ()); return true; } ! return false; ! } ! ! protected: ! // Methods for timing ! // ! // Default to no latency ! virtual sid::host_int_2 access_latency (bus_request &r) { return 0; } protected: // Route locking *************** namespace sidutil *** 1457,1463 **** // binary_input_pin running_pin; binary_input_pin active_pin; - binary_input_pin passthrough_pin; }; } --- 1455,1460 ----