public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][commit] Enhancements to Bus Arbitration Modelling
Date: Tue, 02 Aug 2005 19:03:00 -0000	[thread overview]
Message-ID: <42EFC37C.6010808@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

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

[-- Attachment #2: bus-model.sources.ChangeLog --]
[-- Type: text/plain, Size: 270 bytes --]

2005-08-02  Dave Brolley  <brolley@redhat.com>

	* 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.

[-- Attachment #3: bus-model.sources.patch.txt --]
[-- Type: text/plain, Size: 4966 bytes --]

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 ----

                 reply	other threads:[~2005-08-02 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42EFC37C.6010808@redhat.com \
    --to=brolley@redhat.com \
    --cc=sid@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).