Caravel Analog User

License CI Caravan Build


:exclamation: Important Note

This is the second test chip from the Chipalooza challenge 2024. 14 designs made it on the September tapeout, although many of those were Efabless designs filling in gaps for IP not provided through the Chipalooza challenge.

The projects on this tapeout and their source URLs are as follows:

1.	Power-on-reset
	sky130_sw_ip__bgrref_por
	https://github.com/efabless/sky130_sw_ip__bgrref_por (forked)
	https://github.com/openicdesign/sky130_sw_ip__bgrref_por
	Stephen Wu

2.	Ultra-low-power comparator
	sky130_icrg_ip__ulpcomp
	https://github.com/efabless/sky130_icrg_ip__ulpcomp (forked)
	https://github.com/JYSquare2/sky130_ef_ip__ulpcomp
	ICRG (Lee Jun Yan and team)

3.	MOSFET voltage reference
	sky130_ak_ip__cmos_vref
	https://github.com/efabless/sky130_ak_ip__cmos_vref (forked)
	https://gihub.com/adankvitschal/sky130_ak_ip__cmos_vref
	Adan Kvitschal

4.	LDO
	sky130_am_ip__ldo_01v8
	https://github.com/efabless/sky130_am_ip__ldo_01v8 (forked)
	https://github.com/AlexMenu/sky130_am_ip__ldo_01v8
	Alexandre Menu

5.	Programmable PLL
	sky130_aa_ip__programmable_pll
	https://github.com/efabless/sky130_aa_ip__programmable_pll (forked)
	https://github.com/Azeem-Abbas/Sky130_ef_ip__Programmable_PLL
	Hafiz Azeem Abbas and team

6.	Audio sigma-delta ADC output driver
	sky130_iic_ip__audiodac_v1
	https://github.com/efabless/sky130_iic_ip__audiodac_v1 (forked)
	https://github.com/iic-jku/iic-audiodac-v1
	IIC-JKU (Harald Pretl)

7.	16MHz R-C oscillator
	sky130_ef_ip__rc_osc_16M
	https://github.com/RTimothyEdwards/sky130_ef_ip__rc_osc_16M
	Tim Edwards/Efabless

8.	500MHz R-C oscillator
	sky130_ef_ip__rc_osc_500k
	https://github.com/RTimothyEdwards/sky130_ef_ip__rc_osc_500k
	Tim Edwards/Efabless

9.	8-bit rheostat
	sky130_ef_ip__rheostat_8bit
	https://github.com/RTimothyEdwards/sky130_ef_ip__rheostat_8bit
	Tim Edwards/Efabless

10.	8-bit IDAC
	sky130_ef_ip__biasgen
	https://github.com/RTimothyEdwards/sky130_ef_ip__biasgen
	Tim Edwards/Efabless

11.	8-bit RDAC
	sky130_ef_ip__rdac3v_8bit
	https://github.com/RTimothyEdwards/sky130_ef_ip__rdac3v_8bit
	Tim Edwards/Efabless

12.	Comparator for ADC
	sky130_ef_ip__ccomp3v
	https://github.com/RTimothyEdwards/sky130_ef_ip__ccomp3v
	Tim Edwards/Efabless

13.	Sample-and-hold
	sky130_ef_ip__samplehold
	https://github.com/RTimothyEdwards/sky130_ef_ip__samplehold
	Tim Edwards/Efabless

14.	12-bit CDAC
	sky130_ef_ip__cdac3v_12bit
	https://github.com/RTimothyEdwards/sky130_ef_ip__cdac3v_12bit
	Tim Edwards/Efabless

(Documentation, including test instructions, still needs to be completed)

:---: | :---

Building:

Get the dependencies above by doing "make get_ip_blocks" in the top level directory. This will clone all of the IP blocks from various github repository sources into the "dependencies" directory.

The test chip is generated in magic by running magic in the mag/ directory and issuing the command "source construct_testchip.tcl".

Verifying:

In the top level directory, do "make run-precheck". This requires at least setting environment variables PDK_ROOT, PDK, and PRECHECK_ROOT. If the PDK is installed with open_pdks, then PRECHECK_ROOT can be set to open_pdks/sources/precheck_sky130.

Testing:

All projects are connected either to the logic analyzer (256 I/O bits) or the GPIO pins. Generally speaking, static control bits (enable and trim, for example) are logic analyzer outputs. Dynamic digital bits are routed to GPIO digital outputs, while analog I/O are routed to the analog connections of the GPIO. Each GPIO will need to be configured for digital input, digital output, or analog operation by the program running the test. Because the number of digital outputs exceeds the 128-bit width of the logic analyzer, both "la_data_in" and "la_oenb" lines (which are effectively just additional output bits) have been used.

Unlike the first test chip, this one has a standardized set of multiplexers on the GPIO analog pins, allowing each GPIO pin to access one of two internal analog signals (otherwise, there would not be enough GPIO pins to accommodate all of the test points needed for every analog block). Each multiplexer consists of two isolated switches, each with two control bits, one of which makes the connection and the other of which grounds the center. These bits should never both be enabled (value 1) at the same time; otherwise, the analog signal gets shorted to ground. These are not, strictly speaking, multiplexers; they are two independent switches connected to the same pin. For that reason, both switches should not be enabled at the same time. In the list of analog blocks and their control signals, below, both the controls for the output of the block in question, and the controls for the other analog block connected to the same GPIO.

Each power supply is routed through gated power pFETs so each project can be powered individually. Each power supply connection internally is routed to a bare analog pin for monitoring the supply voltage of the project, for 11 of the 14 projects (because only 11 bare-analog pins are available). Be aware that these are ESD-sensitive points!

Project circuit blocks are described below, starting at the top left corner of the chip and working counterclockwise around the chip perimeter.

8-bit IDAC (Tim Edwards) Enable: la_oenb[35] Bias: Internally self-biased when Reference select = 0 Bias: gpio_analog[17] (pin GPIO 24) set externally to 1.2V nominal when Reference select = 1 Reference select: la_data_in[35] (0 = internal self-bias, 1 = external bias) Upstream analog power supply: vdda2/vssa2 Upstream digital power supply: vccd2/vssd2 Power supply monitor: (none) Power supply enable: la_data_in[47] Digital input: 8-bit value vector is: la_data_in[31], la_oenb[31], la_data_in[32], la_oenb[32], la_data_in[33], la_oenb[33], la_data_in[34], la_oenb[34], Analog output: source out = gpio_noesd[7] (pin GPIO 14) when la_data_in[18] = 0 (no ground shunt) la_oeb[18] = 1 (connect channel) la_data_in[19] = 1 (ground shunt on other channel) la_oeb[19] = 0 (disconnect other channel) sink out = gpio_noesd[8] (pin GPIO 15) when la_data_in[16] = 0 (no ground shunt) la_oeb[16] = 1 (connect channel) la_data_in[17] = 1 (ground shunt on other channel) la_oeb[17] = 0 (disconnect other channel) Analog input: IDAC reference trim: gpio_noesd[10] (pin GPIO 17) when la_data_in[12] = 0 (no ground shunt) la_oeb[12] = 1 (connect channel) la_data_in[13] = 1 (ground shunt on other channel) la_oeb[13] = 0 (disconnect other channel)


LDO (Alexandre Menu)

Enable: la_oenb[30] Bias: Internally self-biased when Reference select = 0 Bias: gpio_analog[17] (pin GPIO 24) set externally to 1.2V nominal when Reference select = 1 Reference select: la_data_in[30] (0 = internal self-bias, 1 = external bias) Upstream analog power supply: vdda2/vssa2 Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[10] (pin GPIO 24) Power supply enable: la_data_in[46] Analog output: voltage out = gpio_noesd[9] (pin GPIO 16) when la_data_in[14] = 0 (no ground shunt) la_oeb[14] = 1 (connect channel) la_data_in[15] = 1 (ground shunt on other channel) la_oeb[15] = 0 (disconnect other channel)


MOSFET voltage reference (Adan Kvitschal)

Enable: la_oenb[27] Upstream analog power supply: vccd2/vssd2 (note this is a 1.8V supply) Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[9] (pin GPIO 23) Power supply enable: la_data_in[45] Trim: la_data_in[28], la_oenb[28], la_data_in[29], la_oenb[29] Analog outputs: vbg reference out = gpio_noesd[8] (pin GPIO 15) when la_data_in[17] = 0 (no ground shunt) la_oeb[17] = 1 (connect channel) la_data_in[16] = 1 (ground shunt on other channel) la_oeb[16] = 0 (disconnect other channel) vbgsc reference out = gpio_noesd[9] (pin GPIO 16) when la_data_in[15] = 0 (no ground shunt) la_oeb[15] = 1 (connect channel) la_data_in[14] = 1 (ground shunt on other channel) la_oeb[14] = 0 (disconnect other channel) vbgtg reference out = gpio_noesd[10] (pin GPIO 17) when la_data_in[13] = 0 (no ground shunt) la_oeb[13] = 1 (connect channel) la_data_in[12] = 1 (ground shunt on other channel) la_oeb[12] = 0 (disconnect other channel) vptat reference out = gpio_noesd[11] (pin GPIO 18) when la_data_in[19] = 0 (no ground shunt) la_oeb[19] = 1 (connect channel) la_data_in[18] = 1 (ground shunt on other channel) la_oeb[18] = 0 (disconnect other channel)


Comparator for ADC (Tim Edwards)

Enable: la_data_in[27] Upstream analog power supply: vdda2/vssa2 Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[8] (pin GPIO 22) Power supply enable: la_data_in[44] Analog output: io_out[17] (pin GPIO 28) Analog inputs: in positive = gpio_noesd[11] (pin GPIO 18) when la_data_in[10] = 0 (no ground shunt) la_oeb[10] = 1 (connect channel) la_data_in[11] = 1 (ground shunt on other channel) la_oeb[11] = 0 (disconnect other channel) in negative = gpio_noesd[12] (pin GPIO 19) when la_data_in[8] = 0 (no ground shunt) la_oeb[8] = 1 (connect channel) la_data_in[9] = 1 (ground shunt on other channel) la_oeb[9] = 0 (disconnect other channel)


12-bit CDAC (Tim Edwards)

Enable: N/A Upstream analog power supply: vdda2/vssa2 Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[7] (pin GPIO 21) Power supply enable: la_data_in[43] Analog inputs: reference high = gpio_noesd[11] (pin GPIO 18) when la_data_in[11] = 0 (no ground shunt) la_oeb[11] = 1 (connect channel) la_data_in[10] = 1 (ground shunt on other channel) la_oeb[10] = 0 (disconnect other channel) reference low = gpio_noesd[12] (pin GPIO 19) when la_data_in[9] = 0 (no ground shunt) la_oeb[9] = 1 (connect channel) la_data_in[8] = 1 (ground shunt on other channel) la_oeb[8] = 0 (disconnect other channel) Analog output: CDAC out = gpio_noesd[13] (pin GPIO 20) when la_data_in[7] = 0 (no ground shunt) la_oeb[7] = 1 (connect channel) la_data_in[6] = 1 (ground shunt on other channel) la_oeb[6] = 0 (disconnect other channel) Digital inputs: reset = la_oenb[26] 12-bit value = la_oenb[20], la_data_in[21], la_oenb[21], la_data_in[22], la_oenb[22], la_data_in[23], la_oenb[23], la_data_in[24], la_oenb[24], la_data_in[25], la_oenb[25], la_data_in[26]


16MHz R-C oscillator (Tim Edwards)

Enable: la_data_in[20] Upstream analog power supply: vdda2/vssa2 Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[6] (pin GPIO 20) Power supply enable: la_data_in[42] Output: io_out[21] (GPIO 21)


Audio sigma-delta ADC output driver (Harald Pretl)

Enable: N/A (As a digital driver, it does not consume power unless driven.) Upstream analog power supply: vccd2/vccd2 (note this is a 1.8V supply) Upstream digital power supply: vccd2/vssd2 Power supply monitor: io_analog[5] (pin GPIO 19) Power supply enable: la_data_in[41] Digital inputs: positive: io_in[26] (GPIO 37) negative: io_in[25] (GPIO 36) Analog outputs: positive: gpio_noesd[16] (pin GPIO 23) when la_data_in[1] = 0 (no ground shunt) la_oeb[1] = 1 (connect channel) la_data_in[0] = 1 (ground shunt on other channel) la_oeb[0] = 0 (disconnect other channel) negative: gpio_noesd[15] (pin GPIO 22) when la_data_in[3] = 0 (no ground shunt) la_oeb[3] = 1 (connect channel) la_data_in[2] = 1 (ground shunt on other channel) la_oeb[2] = 0 (disconnect other channel)


8-bit RDAC (Tim Edwards)

Enable: la_oenb[115] Upstream analog power supply: vdda1/vdda1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: io_analog[0] (pin GPIO 14) Power supply enable: la_data_in[54]

Analog inputs: reference high = gpio_noesd[3] (pin GPIO 18) when la_oeb[123] = 0 (no ground shunt) la_data_in[123] = 1 (connect channel) la_oeb[122] = 1 (ground shunt on other channel) la_data_in[122] = 0 (disconnect other channel) reference low = gpio_noesd[1] (pin GPIO 19) when la_oeb[125] = 0 (no ground shunt) la_data_in[125] = 1 (connect channel) la_oeb[124] = 1 (ground shunt on other channel) la_data_in[124] = 0 (disconnect other channel)

Analog output: RDAC out = gpio_noesd[0] (pin GPIO 16) when la_oeb[126] = 0 (no ground shunt) la_data_in[126] = 1 (connect channel) la_oeb[127] = 1 (ground shunt on other channel) la_data_in[127] = 0 (disconnect other channel) Digital input: la_data_in[115], la_oenb[114], la_data_in[114], la_oenb[113], la_data_in[113], la_oenb[112], la_data_in[112], la_oenb[111]


8-bit rheostat (Tim Edwards)

Enable: N/A Upstream analog power supply: vdda1/vdda1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: io_analog[1] (pin GPIO 15) Power supply enable: la_data_in[53]

Analog inputs: reference high = gpio_noesd[3] (pin GPIO 18) when la_oeb[122] = 0 (no ground shunt) la_data_in[122] = 1 (connect channel) la_oeb[123] = 1 (ground shunt on other channel) la_data_in[123] = 0 (disconnect other channel) reference low = gpio_noesd[1] (pin GPIO 19) when la_oeb[124] = 0 (no ground shunt) la_data_in[124] = 1 (connect channel) la_oeb[125] = 1 (ground shunt on other channel) la_data_in[125] = 0 (disconnect other channel)

Analog output: RDAC out = gpio_noesd[0] (pin GPIO 16) when la_oeb[127] = 0 (no ground shunt) la_data_in[127] = 1 (connect channel) la_oeb[126] = 1 (ground shunt on other channel) la_data_in[126] = 0 (disconnect other channel) Digital input: la_data_in[111], la_oenb[110], la_data_in[110], la_oenb[109], la_data_in[109], la_oenb[108], la_data_in[108], la_oenb[107]


Power-on-reset (Stephen Wu)

Enable: N/A Bias: gpio_analog[17] (pin GPIO 24) set externally to 1.2V nominal Upstream analog power supply: vdda1/vdda1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: io_analog[2] (pin GPIO 16) Power supply enable: la_data_in[52] Digital outputs: por: io_out[7] (GPIO 7) porb: io_out[8] (GPIO 8) porb_h: gpio_noesd[5] (pin GPIO 21) when la_oeb[118] = 0 (no ground shunt) la_data_in[118] = 1 (connect channel) la_oeb[119] = 1 (ground shunt on other channel) la_data_in[119] = 0 (disconnect other channel)


Programmable PLL (Azeem Abbas)

Upstream analog power supply: vccd1/vccd1 (note this is a 1.8V supply) Upstream digital power supply: N/A (single supply) Power supply monitor: N/A Power supply enable: la_data_in[51] Analog I/O: lowpass filter = gpio_noesd[4] (pin GPIO 11) when la_oeb[120] = 0 (no ground shunt) la_data_in[120] = 1 (connect channel) la_oeb[121] = 1 (ground shunt on other channel) la_data_in[121] = 0 (disconnect other channel) fin = gpio_noesd[13] (pin GPIO 20) when la_data_in[6] = 0 (no ground shunt) la_oeb[6] = 1 (connect channel) la_data_in[7] = 1 (ground shunt on other channel) la_oeb[7] = 0 (disconnect other channel) ibias = gpio_noesd[14] (pin GPIO 21) when la_data_in[5] = 0 (no ground shunt) la_oeb[5] = 1 (connect channel) la_data_in[4] = 1 (ground shunt on other channel) la_oeb[4] = 0 (disconnect other channel) vctrl_in = gpio_noesd[15] (pin GPIO 22) when la_data_in[2] = 0 (no ground shunt) la_oeb[2] = 1 (connect channel) la_data_in[3] = 1 (ground shunt on other channel) la_oeb[3] = 0 (disconnect other channel) Digital inputs: S7-S1: la_data_in[100], la_data_in[103], la_oenb[100], la_data_in[101], la_oenb[101], la_data_in[102], la_data_in[104] D19-D12: la_data_in[92], la_oenb[92], la_data_in[93], la_oenb[93], la_data_in[94], la_oenb[94], la_data_in[95], la_oenb[95] D10-D0: la_data_in[106], la_oenb[105], la_data_in[105], la_oenb[104], la_data_in[99], la_oenb[98], la_data_in[98], la_oenb[97], la_data_in[97], la_oenb[96], la_data_in[96] Digital outputs: prescaler: io_out[20] (GPIO 31) up_out: io_out[11] (GPIO 11) dn_out: io_out[12] (GPIO 12) div_out: io_out[15] (GPIO 26) out: io_out[16] (GPIO 27) outb: io_out[14] (GPIO 25) out_usb: io_out[19] (GPIO 30) out_core: io_out[18] (GPIO 29)

Warning: system runs at 1.8V supply but analog pins are not limited; make sure applied voltage does not exceed the 1.8V rail on lowpass filter, fin, ibias, and vctrl_in.


Ultra-low-power comparator (Yun Jan Lee)

Enable: la_data_in[107] Upstream analog power supply: vdda1/vssa1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: io_analog[3] (pin GPIO 17) Power supply enable: la_data_in[50] Analog output: io_out[10] (pin GPIO 10) Analog inputs: in positive = gpio_noesd[4] (pin GPIO 11) when la_oeb[121] = 0 (no ground shunt) la_data_in[121] = 1 (connect channel) la_oeb[120] = 1 (ground shunt on other channel) la_data_in[120] = 0 (disconnect other channel) in negative = gpio_noesd[6] (pin GPIO 13) when la_oeb[116] = 0 (no ground shunt) la_data_in[116] = 1 (connect channel) la_oeb[117] = 1 (ground shunt on other channel) la_data_in[117] = 0 (disconnect other channel) Digital clock: la_oenb[106]


Sample-and-hold (Tim Edwards)

Enable: la_data_in[91] Upstream analog power supply: vdda1/vssa1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: N/A Power supply enable: la_data_in[50] Analog input: sample in = gpio_noesd[5] (pin GPIO 12) when la_oeb[119] = 0 (no ground shunt) la_data_in[119] = 1 (connect channel) la_oeb[118] = 1 (ground shunt on other channel) la_data_in[118] = 0 (disconnect other channel) Analog output: sample out = gpio_noesd[6] (pin GPIO 13) when la_oeb[117] = 0 (no ground shunt) la_data_in[117] = 1 (connect channel) la_oeb[116] = 1 (ground shunt on other channel) la_data_in[116] = 0 (disconnect other channel) Digital hold: la_oenb[91]


500MHz R-C oscillator (Tim Edwards)

Enable: la_oenb[90] Upstream analog power supply: vdda1/vssa1 Upstream digital power supply: vccd1/vssd1 Power supply monitor: io_analog[4] (pin GPIO 18) Power supply enable: la_data_in[48] Output: io_out[13] (GPIO 13)


Loopback test

There is a loopback test connecting two switches that allows the switch resistance (specifically, the resistance of two switches in series), and to measure coupling across a switch when the ground isolation is enabled or disabled.

Analog I/O: loopback 1 = gpio_noesd[14] (pin GPIO 25) when la_data_in[5] = 0 (no ground shunt) la_oeb[5] = 1 (connect channel) la_data_in[4] = 1 (ground shunt on other channel) la_oeb[4] = 0 (disconnect other channel) loopback 2 = gpio_noesd[16] (pin GPIO 27) when la_data_in[0] = 0 (no ground shunt) la_oeb[0] = 1 (connect channel) la_data_in[1] = 1 (ground shunt on other channel) la_oeb[1] = 0 (disconnect other channel)


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.