OSDN Git Service

2006-08-29 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Tue, 29 Aug 2006 17:47:22 +0000 (17:47 +0000)
committerbrolley <brolley>
Tue, 29 Aug 2006 17:47:22 +0000 (17:47 +0000)
        * 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.

sid/component/glue/ChangeLog
sid/component/glue/Makefile.in
sid/component/glue/glue.cxx
sid/component/glue/hw-glue-bus-mux.txt
sid/component/glue/hw-glue-probe-bus.txt
sid/component/glue/hw-glue-probe-bus.xml
sid/component/glue/hw-glue-sequence.txt

index 910e0ad..a91ef83 100644 (file)
@@ -1,3 +1,12 @@
+2006-08-29  Dave Brolley  <brolley@redhat.com>
+
+       * 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.
+
 2006-03-27  Frank Ch. Eigler  <fche@elastic.org>
 
        * glue.cxx (bus_prober): Fix extra class qualifications.
index f5d2078..a44c8e4 100644 (file)
@@ -165,6 +165,10 @@ SIDTARGET_MT_FALSE = @SIDTARGET_MT_FALSE@
 SIDTARGET_MT_TRUE = @SIDTARGET_MT_TRUE@
 SIDTARGET_PPC_FALSE = @SIDTARGET_PPC_FALSE@
 SIDTARGET_PPC_TRUE = @SIDTARGET_PPC_TRUE@
+SIDTARGET_SH64_FALSE = @SIDTARGET_SH64_FALSE@
+SIDTARGET_SH64_TRUE = @SIDTARGET_SH64_TRUE@
+SIDTARGET_SH_FALSE = @SIDTARGET_SH_FALSE@
+SIDTARGET_SH_TRUE = @SIDTARGET_SH_TRUE@
 SIDTARGET_X86_FALSE = @SIDTARGET_X86_FALSE@
 SIDTARGET_X86_TRUE = @SIDTARGET_X86_TRUE@
 SIDTARGET_XSTORMY16_FALSE = @SIDTARGET_XSTORMY16_FALSE@
@@ -225,6 +229,8 @@ sidtarget_m68k = @sidtarget_m68k@
 sidtarget_mips = @sidtarget_mips@
 sidtarget_mt = @sidtarget_mt@
 sidtarget_ppc = @sidtarget_ppc@
+sidtarget_sh = @sidtarget_sh@
+sidtarget_sh64 = @sidtarget_sh64@
 sidtarget_x86 = @sidtarget_x86@
 sidtarget_xstormy16 = @sidtarget_xstormy16@
 socket_libs = @socket_libs@
index 6d7446e..dc25e89 100644 (file)
@@ -1,6 +1,6 @@
 // glue.cxx - miscellaneous glue components.  -*- C++ -*-
 
-// Copyright (C) 1999-2001 Red Hat.
+// Copyright (C) 1999-2001, 2006 Red Hat.
 // Portions Copyright (C) 2004 Sirius Satellite Radio Inc.
 // This file is part of SID and is licensed under the GPL.
 // See the file COPYING.SID for conditions for redistribution.
@@ -377,6 +377,7 @@ class bus_prober: public virtual component,
   probing_bus upstream;
   bus* downstream;
 
+  host_int_4 base_address;
   output_pin address_pin;
   output_pin data_high_pin;
   output_pin data_low_pin;
@@ -391,7 +392,8 @@ public:
 
   bus_prober ():
     upstream (this),
-    downstream (0)
+    downstream (0),
+    base_address (0)
     {
       sample_interval = 1;
 
@@ -409,6 +411,7 @@ public:
       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");
@@ -471,7 +474,7 @@ probing_bus::writeAny(host_int_4 addr, DataType data, host_int_4 code) throw ()
 
          this->counter = 0;
          // drive informational pins
-         this->prober->address_pin.drive (addr);
+         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);
@@ -507,7 +510,7 @@ probing_bus::readAny(host_int_4 addr, DataType& data, host_int_4 code) throw ()
 
          this->counter = 0;
          // drive informational pins
-         this->prober->address_pin.drive (addr);
+         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 d4f679f..c1b5358 100644 (file)
@@ -90,22 +90,22 @@ Component Reference:
    | switch  | in        | 0 or non-zero | switching |
    +-------------------------------------------------+
 
-   +-------------------------------------------------+
-   |                      buses                      |
-   |-------------------------------------------------|
-   |  name   |  addresses  |  accesses   | behaviors |
-   |---------+-------------+-------------+-----------|
-   |upstream |unrestricted |unrestricted |bus traffic|
-   +-------------------------------------------------+
-
-   +-------------------------------------------------+
-   |                   attributes                    |
-   |-------------------------------------------------|
-   | name |category|  legal   |  default  |behaviors||
-   |      |        |  values  |   value   |         ||
-   |------+--------+----------+-----------+---------||
-   |switch|pin     |-         |-          |switching||
-   +-------------------------------------------------+
+   +----------------------------------------------------+
+   |                       buses                        |
+   |----------------------------------------------------|
+   |   name   |  addresses   |   accesses   | behaviors |
+   |----------+--------------+--------------+-----------|
+   |upstream  |unrestricted  |unrestricted  |bus traffic|
+   +----------------------------------------------------+
+
+   +---------------------------------------------------+
+   |                    attributes                     |
+   |---------------------------------------------------|
+   |  name  | category | legal  | default | behaviors ||
+   |        |          | values |  value  |           ||
+   |--------+----------+--------+---------+-----------||
+   |switch  |pin       |-       |-        |switching  ||
+   +---------------------------------------------------+
 
    +-------------------------------------------------+
    |                    accessors                    |
index 8354fce..4ad0ec0 100644 (file)
@@ -12,53 +12,54 @@ Functionality:
 
    This component resembles a probe that transparently monitors bus traffic.
 
-+------------------------------------------------------------------------------------+
-|                                     Behaviors                                      |
-|------------------------------------------------------------------------------------|
-|bus traffic|When the downstream accessor is configured, all incoming bus API calls  |
-|passthrough|to the upstream bus are passed through verbatim. Without the downstream |
-|           |accessor configured, the upstream bus will return bus::unmapped for all |
-|           |calls. Still, the sampling and tracing functions are still active.      |
-|-----------+------------------------------------------------------------------------|
-|bus traffic|Every now and then (at an interval configured by the sample-interval    |
-|   sampling|attribute), a transaction is also reported via a collection of output   |
-|           |pins. In sequence, the following output pins are driven:                |
-|           |                                                                        |
-|           |  * "address" - address parameter                                       |
-|           |  * "data-high" - top 32 bits of bus data being read/written            |
-|           |  * "data-low" - bottom 32 bits of same                                 |
-|           |  * "status" - bus::status value returned from downstream               |
-|           |  * "type" - an encoded value identifying the size, endianness, and     |
-|           |    direction of the data transfer. Specifically, in C lingo,           |
-|           |                                                                        |
-|           |         (type & 0x00F): log2 of access size (0/1/2/3 for *_int_1/2/4/8)|
-|           |         (type & 0x010): 0x10 (little-endian) or 0x00 (big-endian)      |
-|           |         (type & 0x100): 0x100 (read) or 0x00 (write)                   |
-|           |                                                                        |
-|           |This sampling function is disabled if sample-interval is zero. The      |
-|           |read-only interval-counter attribute indicates the current value of the |
-|           |modular transaction counter.                                            |
-|-----------+------------------------------------------------------------------------|
-|bus traffic|If the trace? attribute is set, sampled bus traffic is traced to stdout |
-|    tracing|in a compact format. The sampling counter is shared with the traffic    |
-|           |probing behavior above.                                                 |
-|           |                                                                        |
-|           |One line per transaction is shown in a format resembling the common gdb |
-|           |simulators' --trace-core output:                                        |
-|           |                                                                        |
-|           |[LABEL:] MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where LABEL is an   |
-|           |optional label identifying the probe component. MODE is an encoding of  |
-|           |the access type: zzz where le and be represent little- or               |
-|           |big-endianness, and 1-8 represent the number of bytes transferred. ARROW|
-|           |is a redundant encoding of direction: {->,<-} for {read,write} ADDRESS  |
-|           |and DATA are hex-encoded host-endian values, LATENCY is a string        |
-|           |encoding of the bus access latency, though 0 is ommited STATUS is a     |
-|           |string encoding of the bus::status, though ok is omitted Examples:      |
-|           |                                                                        |
-|           |      write-be-2:0xa002001c <- 0x3442                                   |
-|           |      read-le-8:0x807fff30 -> 0xffffffff807fff68 l:10                   |
-|           |      write-be-4:0xfeedface <- 0xdeadbeef unmapped!                     |
-+------------------------------------------------------------------------------------+
++--------------------------------------------------------------------------------------+
+|                                      Behaviors                                       |
+|--------------------------------------------------------------------------------------|
+|bus traffic|When the downstream accessor is configured, all incoming bus API calls to |
+|passthrough|the upstream bus are passed through verbatim. Without the downstream      |
+|           |accessor configured, the upstream bus will return bus::unmapped for all   |
+|           |calls. Still, the sampling and tracing functions are still active.        |
+|-----------+--------------------------------------------------------------------------|
+|bus traffic|Every now and then (at an interval configured by the sample-interval      |
+|   sampling|attribute), a transaction is also reported via a collection of output     |
+|           |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              |
+|           |  * "data-low" - bottom 32 bits of same                                   |
+|           |  * "status" - bus::status value returned from downstream                 |
+|           |  * "type" - an encoded value identifying the size, endianness, and       |
+|           |    direction of the data transfer. Specifically, in C lingo,             |
+|           |                                                                          |
+|           |         (type & 0x00F): log2 of access size (0/1/2/3 for *_int_1/2/4/8)  |
+|           |         (type & 0x010): 0x10 (little-endian) or 0x00 (big-endian)        |
+|           |         (type & 0x100): 0x100 (read) or 0x00 (write)                     |
+|           |                                                                          |
+|           |This sampling function is disabled if sample-interval is zero. The        |
+|           |read-only interval-counter attribute indicates the current value of the   |
+|           |modular transaction counter.                                              |
+|-----------+--------------------------------------------------------------------------|
+|bus traffic|If the trace? attribute is set, sampled bus traffic is traced to stdout in|
+|    tracing|a compact format. The sampling counter is shared with the traffic probing |
+|           |behavior above.                                                           |
+|           |                                                                          |
+|           |One line per transaction is shown in a format resembling the common gdb   |
+|           |simulators' --trace-core output:                                          |
+|           |                                                                          |
+|           |[LABEL:] MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where LABEL is an     |
+|           |optional label identifying the probe component. MODE is an encoding of the|
+|           |access type: zzz where le and be represent little- or big-endianness, and |
+|           |1-8 represent the number of bytes transferred. ARROW is a redundant       |
+|           |encoding of direction: {->,<-} for {read,write} ADDRESS and DATA are      |
+|           |hex-encoded host-endian values, LATENCY is a string encoding of the bus   |
+|           |access latency, though 0 is ommited STATUS is a string encoding of the    |
+|           |bus::status, though ok is omitted Examples:                               |
+|           |                                                                          |
+|           |      write-be-2:0xa002001c <- 0x3442                                     |
+|           |      read-le-8:0x807fff30 -> 0xffffffff807fff68 l:10                     |
+|           |      write-be-4:0xfeedface <- 0xdeadbeef unmapped!                       |
++--------------------------------------------------------------------------------------+
 
    +-------------------------------------------------+
    |                 SID Conventions                 |
@@ -137,57 +138,49 @@ Component Reference:
    |           |           |             | sampling  |
    +-------------------------------------------------+
 
-   +---------------------------------------------------+
-   |                       buses                       |
-   |---------------------------------------------------|
-   |  name  | addresses  |  accesses  |   behaviors    |
-   |--------+------------+------------+----------------|
-   |upstream|unrestricted|unrestricted|bus traffic     |
-   |        |            |            |passthrough/etc.|
-   +---------------------------------------------------+
-
-   +----------------------------------------------------+
-   |                     attributes                     |
-   |----------------------------------------------------|
-   |      name      |category| legal |default|behaviors||
-   |                |        |values | value |         ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |trace?          |setting |boolean|0      |traffic  ||
-   |                |        |       |       |tracing  ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |sample-interval |setting |numeric|1      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |interval-counter|register|numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |address         |pin     |numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |data-high       |pin     |numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |data-low        |pin     |numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |status          |pin     |numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |       |       |bus      ||
-   |type            |pin     |numeric|-      |traffic  ||
-   |                |        |       |       |sampling ||
-   |----------------+--------+-------+-------+---------||
-   |                |        |any    |       |bus      ||
-   |label           |setting |string |-      |traffic  ||
-   |                |        |       |       |sampling ||
-   +----------------------------------------------------+
+   +-----------------------------------------------------------+
+   |                           buses                           |
+   |-----------------------------------------------------------|
+   |  name  | addresses  |  accesses  |       behaviors        |
+   |--------+------------+------------+------------------------|
+   |upstream|unrestricted|unrestricted|bus traffic             |
+   |        |            |            |passthrough/etc.        |
+   +-----------------------------------------------------------+
+
+   +--------------------------------------------------------------+
+   |                          attributes                          |
+   |--------------------------------------------------------------|
+   |      name      |category| legal |default|     behaviors     ||
+   |                |        |values | value |                   ||
+   |----------------+--------+-------+-------+-------------------||
+   |base-address    |setting |numeric|0      |bus traffic tracing||
+   |----------------+--------+-------+-------+-------------------||
+   |trace?          |setting |boolean|0      |bus traffic tracing||
+   |----------------+--------+-------+-------+-------------------||
+   |sample-interval |setting |numeric|1      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |interval-counter|register|numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |address         |pin     |numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |data-high       |pin     |numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |data-low        |pin     |numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |status          |pin     |numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |type            |pin     |numeric|-      |bus traffic        ||
+   |                |        |       |       |sampling           ||
+   |----------------+--------+-------+-------+-------------------||
+   |label           |setting |any    |-      |bus traffic        ||
+   |                |        |string |       |sampling           ||
+   +--------------------------------------------------------------+
 
    +-------------------------------------------------+
    |                    accessors                    |
index 52d494d..64812ea 100644 (file)
@@ -18,6 +18,7 @@
     <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" />
@@ -54,7 +55,7 @@
          pins.  In sequence, the following output pins are driven:</p>
        <ul>
          <li>
-           <name>address</name> - address parameter</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>
index 40253dc..576fdb3 100644 (file)
@@ -96,32 +96,33 @@ Component Reference:
 
   Component: hw-glue-sequence (Abstract)
 
-   +-------------------------------------------------+
-   |                      pins                       |
-   |-------------------------------------------------|
-   |   name    |direction|legalvalues|   behaviors   |
-   |-----------+---------+-----------+---------------|
-   |input      |in       |any        |data forwarding|
-   |-----------+---------+-----------+---------------|
-   |output-NNN |out      |any        |data forwarding|
-   +-------------------------------------------------+
-
-   +--------------------------------------------------------+
-   |                       attributes                       |
-   |--------------------------------------------------------|
-   |     name     |category | legal  |default|  behaviors  ||
-   |              |         | values | value |             ||
-   |--------------+---------+--------+-------+-------------||
-   |state-snapshot|no       |opaque  |-      |state        ||
-   |              |category |string  |       |save/restore ||
-   |--------------+---------+--------+-------+-------------||
-   |              |setting, |small   |       |             ||
-   |num-outputs   |watchable|positive|0      |configuration||
-   |              |         |number  |       |             ||
-   |--------------+---------+--------+-------+-------------||
-   |input         |pin,     |-       |-      |data         ||
-   |              |watchable|        |       |forwarding   ||
-   +--------------------------------------------------------+
+   +---------------------------------------------------+
+   |                       pins                        |
+   |---------------------------------------------------|
+   |    name    | direction | legalvalues | behaviors  |
+   |------------+-----------+-------------+------------|
+   |input       |in         |any          |data        |
+   |            |           |             |forwarding  |
+   |------------+-----------+-------------+------------|
+   |output-NNN  |out        |any          |data        |
+   |            |           |             |forwarding  |
+   +---------------------------------------------------+
+
+   +------------------------------------------------------------------+
+   |                            attributes                            |
+   |------------------------------------------------------------------|
+   |     name     | category  | legal values |default|   behaviors   ||
+   |              |           |              | value |               ||
+   |--------------+-----------+--------------+-------+---------------||
+   |state-snapshot|no category|opaque string |-      |state          ||
+   |              |           |              |       |save/restore   ||
+   |--------------+-----------+--------------+-------+---------------||
+   |num-outputs   |setting,   |small positive|0      |configuration  ||
+   |              |watchable  |number        |       |               ||
+   |--------------+-----------+--------------+-------+---------------||
+   |input         |pin,       |-             |-      |data forwarding||
+   |              |watchable  |              |       |               ||
+   +------------------------------------------------------------------+
 
   Variant: hw-glue-sequence-1