From: Dave Brolley <brolley@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: sid@sources.redhat.com
Subject: Re: [patch][commit] Base address for hw-glue-probe-bus
Date: Tue, 29 Aug 2006 20:37:00 -0000 [thread overview]
Message-ID: <44F4A580.6040807@redhat.com> (raw)
In-Reply-To: <20060829193935.GH24243@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
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
[-- Attachment #2: bus-probe1.patch.txt --]
[-- Type: text/plain, Size: 6198 bytes --]
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 ****
<defpin name="type" direction="out" legalvalues="enum values" behaviors="bus traffic sampling" />
<!-- attributes -->
! <defattribute name="base-address" category="setting" legalvalues="numeric" defaultvalue="0" behaviors="bus traffic tracing" />
<defattribute name="trace?" category="setting" legalvalues="boolean" defaultvalue="0" behaviors="bus traffic tracing" />
<defattribute name="sample-interval" category="setting" legalvalues="numeric" defaultvalue="1" behaviors="bus traffic sampling" />
<defattribute name="interval-counter" category="register" legalvalues="numeric" behaviors="bus traffic sampling" />
--- 18,24 ----
<defpin name="type" direction="out" legalvalues="enum values" behaviors="bus traffic sampling" />
<!-- attributes -->
! <defattribute name="base-address" category="setting" legalvalues="numeric" defaultvalue="0" behaviors="bus traffic sampling" />
<defattribute name="trace?" category="setting" legalvalues="boolean" defaultvalue="0" behaviors="bus traffic tracing" />
<defattribute name="sample-interval" category="setting" legalvalues="numeric" defaultvalue="1" behaviors="bus traffic sampling" />
<defattribute name="interval-counter" category="register" legalvalues="numeric" behaviors="bus traffic sampling" />
***************
*** 55,61 ****
pins. In sequence, the following output pins are driven:</p>
<ul>
<li>
! <name>address</name> - address parameter added to the value of the <attribute>base-address</attribute> attribute</li>
<li>
<name>data-high</name> - top 32 bits of bus data being read/written</li>
<li>
--- 55,62 ----
pins. In sequence, the following output pins are driven:</p>
<ul>
<li>
! <name>address</name> - address parameter added to the value of the
! <attribute>base-address</attribute> attribute</li>
<li>
<name>data-high</name> - top 32 bits of bus data being read/written</li>
<li>
***************
*** 146,151 ****
--- 147,173 ----
<p>
A statistics-gathering component could attach to the sampling output
pins to maintain a picture of a program's memory access patterns.</p>
+
+ <p>
+ The <attribute>base-address</attribute> attribute should only be used if
+ the downstream component has a fixed address within the system. The
+ <attribute>base-address</attribute> attribute is not suitable for situations in
+ which more than one address range is mapped onto the <bus>upstream</bus> bus.</p>
+ <p>
+ Consider the example below in which a single hw-glue-probe-bus is used to trace
+ two address ranges.</p>
+
+ <code> 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</code>
+
</p>
</p>
</env>
prev parent reply other threads:[~2006-08-29 20:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 17:55 Dave Brolley
2006-08-29 18:06 ` Frank Ch. Eigler
[not found] ` <44F48761.9050007@redhat.com>
[not found] ` <20060829183612.GF24243@redhat.com>
[not found] ` <44F48F16.1070702@redhat.com>
[not found] ` <20060829193935.GH24243@redhat.com>
2006-08-29 20:37 ` Dave Brolley [this message]
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=44F4A580.6040807@redhat.com \
--to=brolley@redhat.com \
--cc=fche@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).