From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 722 invoked by alias); 2 Aug 2005 19:03:40 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 507 invoked by uid 22791); 2 Aug 2005 19:03:26 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 02 Aug 2005 19:03:26 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j72J3Pwg000777 for ; Tue, 2 Aug 2005 15:03:25 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j72J3PV19820 for ; Tue, 2 Aug 2005 15:03:25 -0400 Received: from [172.16.14.227] (IDENT:ZEv7+Y3bGb5FBpBxFEBQOY+YXxcmgSt8@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id j72J3O1M014836 for ; Tue, 2 Aug 2005 15:03:24 -0400 Message-ID: <42EFC37C.6010808@redhat.com> Date: Tue, 02 Aug 2005 19:03:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] Enhancements to Bus Arbitration Modelling Content-Type: multipart/mixed; boundary="------------090008010907090007070802" X-SW-Source: 2005-q3/txt/msg00011.txt.bz2 This is a multi-part message in MIME format. --------------090008010907090007070802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 838 Hi, I've committed this patch which adds the capability to implement passthrough for each upstream interface of a bus arbitrator independently. Previously, the passthrough could only be enabled for the arbitrator as a whole. This is useful when one or more components upstream of the arbitrator need access to components downstream of the arbitrator without arbitration while still requiring arbitration for other upstream components. The implementation is achieved by passing the index of the upstream accessor to the virtual check_passthough method. The default implementation supports no explicit upstream passthough and checks only for passthrough required by the system state. This patch also adds a virtual method which defines the latency of accessing the bus arbitrator itself. The default latency is 0 cycles. Dave --------------090008010907090007070802 Content-Type: text/plain; name="bus-model.sources.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bus-model.sources.ChangeLog" Content-length: 270 2005-08-02 Dave Brolley * sidbusutil.h (bus_arbitrator): Remove passthrough_pin. (check_passthrough): Now takes 'upstream' argument. Correct all calls. Don't check passthrough_pin here. (access_latency): New virtual method of bus_arbitrator. --------------090008010907090007070802 Content-Type: text/plain; name="bus-model.sources.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bus-model.sources.patch.txt" Content-length: 4966 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 ---- --------------090008010907090007070802--