From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31584 invoked by alias); 29 Aug 2006 17:55:40 -0000 Received: (qmail 31570 invoked by uid 22791); 29 Aug 2006 17:55:39 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Aug 2006 17:55:34 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7THtWFg009611 for ; Tue, 29 Aug 2006 13:55:32 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7THtPs5032102 for ; Tue, 29 Aug 2006 13:55:26 -0400 Received: from [172.16.14.227] (IDENT:C/TYj/8D8n75lj9xK0veS2RtGoJa7ojq@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k7THtPCT006689 for ; Tue, 29 Aug 2006 13:55:25 -0400 Message-ID: <44F47F8D.6040108@redhat.com> Date: Tue, 29 Aug 2006 17:55: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] Base address for hw-glue-probe-bus Content-Type: multipart/mixed; boundary="------------000405070608090801070303" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00035.txt.bz2 This is a multi-part message in MIME format. --------------000405070608090801070303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 917 Hi, The address which is driven on the "address" pin of hw-glue-probe-bus is the one which comes in on the "upstream" bus. This is OK if the probe bus is at the top of the memory heirarchy, but not so useful if it is, for example, between a mapper and a memory component. In this case, the address which is driven is the offset into the memory region. In order to make this component more useful, I've committed the attached patch which adds a "base-address" attribute to hw-glue-probe-bus. This base is added to the address being probed and the result is driven on the "address" pin. This allows the actual address being probed to be driven in cases like the one above. The default value of "base-address" is zero, so the behaviour of configurations which don't set it will not change. Tested on the internal port which exposed the requirement. Let me know if you have any problems or concerns. Dave --------------000405070608090801070303 Content-Type: text/plain; name="bus-probe.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bus-probe.ChangeLog" Content-length: 318 2006-08-29 Dave Brolley * glue.cxx (base_address): New member of bus_prober. (bus_prober): Initialize base_address. (writeAny): Add this->prober->base_address to the address driven. (readAny): Likewise. * hw-glue-probe-bus.xml: Document new base-address attribute. * *.txt: Regenerated. --------------000405070608090801070303 Content-Type: text/plain; name="bus-probe.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bus-probe.patch.txt" Content-length: 4979 Index: sid/component/glue/glue.cxx =================================================================== RCS file: /cvs/cvsfiles/devo/sid/component/glue/glue.cxx,v retrieving revision 1.38 diff -c -p -r1.38 glue.cxx *** sid/component/glue/glue.cxx 11 Nov 2002 22:28:28 -0000 1.38 --- sid/component/glue/glue.cxx 28 Aug 2006 18:58:34 -0000 *************** *** 1,6 **** // glue.cxx - miscellaneous glue components. -*- C++ -*- ! // Copyright (C) 1999-2001 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 ---- // glue.cxx - miscellaneous glue components. -*- C++ -*- ! // Copyright (C) 1999-2001, 2006 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** class bus_prober: public virtual compone *** 376,381 **** --- 376,382 ---- probing_bus upstream; bus* downstream; + host_int_4 base_address; output_pin address_pin; output_pin data_high_pin; output_pin data_low_pin; *************** public: *** 390,396 **** bus_prober::bus_prober (): upstream (this), ! downstream (0) { sample_interval = 1; --- 391,398 ---- bus_prober::bus_prober (): upstream (this), ! downstream (0), ! base_address (0) { sample_interval = 1; *************** public: *** 408,413 **** --- 410,416 ---- add_pin ("type", & this->accesstype_pin); add_attribute ("type", & this->accesstype_pin, "pin"); + add_attribute ("base-address", & this->base_address, "setting"); add_attribute ("sample-interval", & this->sample_interval, "setting"); add_attribute ("trace?", & this->upstream.verbose_p, "setting"); add_attribute ("label", & this->label, "setting"); *************** probing_bus::writeAny(host_int_4 addr, D *** 470,476 **** this->counter = 0; // drive informational pins ! this->prober->address_pin.drive (addr); typename DataType::host_int_type d_host = data; // natural endianness host_int_8 d_wide(d_host); // widen this->prober->data_high_pin.drive ((d_wide >> 32) & 0xFFFFFFFF); --- 473,479 ---- this->counter = 0; // drive informational pins ! this->prober->address_pin.drive (this->prober->base_address + addr); typename DataType::host_int_type d_host = data; // natural endianness host_int_8 d_wide(d_host); // widen this->prober->data_high_pin.drive ((d_wide >> 32) & 0xFFFFFFFF); *************** probing_bus::readAny(host_int_4 addr, Da *** 506,512 **** this->counter = 0; // drive informational pins ! this->prober->address_pin.drive (addr); typename DataType::host_int_type d_host = data; // natural endianness host_int_8 d_wide(d_host); // widen this->prober->data_high_pin.drive ((d_wide >> 32) & 0xFFFFFFFF); --- 509,515 ---- this->counter = 0; // drive informational pins ! this->prober->address_pin.drive (this->prober->base_address + addr); typename DataType::host_int_type d_host = data; // natural endianness host_int_8 d_wide(d_host); // widen this->prober->data_high_pin.drive ((d_wide >> 32) & 0xFFFFFFFF); Index: sid/component/glue/hw-glue-probe-bus.xml =================================================================== RCS file: /cvs/cvsfiles/devo/sid/component/glue/hw-glue-probe-bus.xml,v retrieving revision 1.4 diff -c -p -r1.4 hw-glue-probe-bus.xml *** sid/component/glue/hw-glue-probe-bus.xml 27 May 2002 20:53:49 -0000 1.4 --- sid/component/glue/hw-glue-probe-bus.xml 28 Aug 2006 18:58:34 -0000 *************** *** 18,23 **** --- 18,24 ---- + *************** *** 54,60 **** pins. In sequence, the following output pins are driven:

  • ! address - address parameter
  • data-high - top 32 bits of bus data being read/written
  • --- 55,61 ---- pins. In sequence, the following output pins are driven:

    • ! address - address parameter added to the value of the base-address attribute
    • data-high - top 32 bits of bus data being read/written
    • --------------000405070608090801070303--