From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23070 invoked by alias); 29 Aug 2006 20:37:38 -0000 Received: (qmail 23057 invoked by uid 22791); 29 Aug 2006 20:37:37 -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 20:37:30 +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 k7TKbS6U014530 for ; Tue, 29 Aug 2006 16:37:28 -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 k7TKbKAU018514; Tue, 29 Aug 2006 16:37:22 -0400 Received: from [172.16.14.227] (IDENT:vusa3TimmmAuJtZb8BrHuSJSIoPAZec+@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k7TKbKCT014151; Tue, 29 Aug 2006 16:37:20 -0400 Message-ID: <44F4A580.6040807@redhat.com> Date: Tue, 29 Aug 2006 20:37:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: "Frank Ch. Eigler" CC: sid@sources.redhat.com Subject: Re: [patch][commit] Base address for hw-glue-probe-bus References: <44F47F8D.6040108@redhat.com> <20060829180645.GE24243@redhat.com> <44F48761.9050007@redhat.com> <20060829183612.GF24243@redhat.com> <44F48F16.1070702@redhat.com> <20060829193935.GH24243@redhat.com> In-Reply-To: <20060829193935.GH24243@redhat.com> Content-Type: multipart/mixed; boundary="------------050005020304080804000203" 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/msg00038.txt.bz2 This is a multi-part message in MIME format. --------------050005020304080804000203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 428 Frank Ch. Eigler wrote: >Right, go ahead with your patch. For the documentation of this new >attribute though, please make a mention of the possibility of the >probed device being multiply mapped. > > > OK. I've committed the attached patch which adds the requested documentation and a correction to the code which ensures that base-address is also reflected in the out generated when the trace? attribute is set. Dave --------------050005020304080804000203 Content-Type: text/plain; name="bus-probe1.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bus-probe1.patch.txt" Content-length: 6198 Index: sid/component/glue/glue.cxx =================================================================== RCS file: /cvs/src/src/sid/component/glue/glue.cxx,v retrieving revision 1.13 diff -c -p -r1.13 glue.cxx *** sid/component/glue/glue.cxx 29 Aug 2006 17:47:22 -0000 1.13 --- sid/component/glue/glue.cxx 29 Aug 2006 20:31:19 -0000 *************** probing_bus::writeAny(host_int_4 addr, D *** 469,480 **** this->counter ++; if (this->counter >= this->prober->sample_interval) { if (this->verbose_p) this->traceAccess (addr, data, code, s); 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); --- 469,481 ---- this->counter ++; if (this->counter >= this->prober->sample_interval) { + addr += this->prober->base_address; if (this->verbose_p) this->traceAccess (addr, data, code, s); 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); *************** probing_bus::readAny(host_int_4 addr, Da *** 505,516 **** this->counter ++; if (this->counter >= this->prober->sample_interval) { if (this->verbose_p) this->traceAccess (addr, data, code, s); 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); --- 506,518 ---- this->counter ++; if (this->counter >= this->prober->sample_interval) { + addr += this->prober->base_address; if (this->verbose_p) this->traceAccess (addr, data, code, s); 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); Index: sid/component/glue/hw-glue-probe-bus.xml =================================================================== RCS file: /cvs/src/src/sid/component/glue/hw-glue-probe-bus.xml,v retrieving revision 1.3 diff -c -p -r1.3 hw-glue-probe-bus.xml *** sid/component/glue/hw-glue-probe-bus.xml 29 Aug 2006 17:47:22 -0000 1.3 --- sid/component/glue/hw-glue-probe-bus.xml 29 Aug 2006 20:31:19 -0000 *************** *** 18,24 **** ! --- 18,24 ---- ! *************** *** 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
  • --- 55,62 ---- 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
    • *************** *** 146,151 **** --- 147,173 ----

      A statistics-gathering component could attach to the sampling output pins to maintain a picture of a program's memory access patterns.

      + +

      + The base-address attribute should only be used if + the downstream component has a fixed address within the system. The + base-address attribute is not suitable for situations in + which more than one address range is mapped onto the upstream bus.

      +

      + Consider the example below in which a single hw-glue-probe-bus is used to trace + two address ranges.

      + + new hw-glue-probe-bus bus-prober + new SOME_KIND_OF_CPU cpu + new SOME_KIND_OF_TRANSPARENT_MAPPER probe-mapper + new SOME_KIND_OF_MAPPER mapper + connect-bus cpu insn-memory probe-mapper access-port + connect-bus probe-mapper [0-1023] bus-prober upstream + connect-bus probe-mapper [1024-2047] mapper access-port + connect-bus probe-mapper [2048-3071] bus-prober upstream + connect-bus bus-prober downstream mapper access-port + set bus-prober trace? 1 +

      --------------050005020304080804000203--