| 1 |
57 |
Revanth |
## NOTE: This project was designed by me as a part of a student design contest. It is no longer actively supported.
|
| 2 |
58 |
Revanth |
## This project's files are hosted on GitHub.
|
| 3 |
|
|
## The ZAP ARM Processor (ARMv5T Compatible, FPGA Synthesizable Soft Processor) @ https://github.com/krevanth/ZAP.git
|
| 4 |
57 |
Revanth |
|
| 5 |
47 |
Revanth |
### Author : Revanth Kamaraj (revanth91kamaraj@gmail.com)
|
| 6 |
26 |
Revanth |
|
| 7 |
43 |
Revanth |
### Introduction
|
| 8 |
26 |
Revanth |
|
| 9 |
43 |
Revanth |
The ZAP processor is a 10 stage pipelined processor for FPGA with support for cache and MMU (ARMv5T compliant).
|
| 10 |
26 |
Revanth |
|
| 11 |
52 |
Revanth |
Please note that the processor is *not* an ARM clone but a completely different RTL design, written from scratch (in FPGA compliant Verilog-2001), that can run ARM v5T binaries (both user and kernel code), hence, no particular ARMX number is specified.
|
| 12 |
48 |
Revanth |
|
| 13 |
52 |
Revanth |
This project was originally created for the ORCONF-2016 Student Design Contest.
|
| 14 |
48 |
Revanth |
|
| 15 |
52 |
Revanth |
ZAP is specifically designed to work with FPGAs. To keep the code generic across FPGA vendors, inference based coding style is followed.
|
| 16 |
51 |
Revanth |
|
| 17 |
45 |
Revanth |

|
| 18 |
|
|
|
| 19 |
49 |
Revanth |
#### Repos
|
| 20 |
|
|
|
| 21 |
58 |
Revanth |
This project is hosted on Github.
|
| 22 |
52 |
Revanth |
|
| 23 |
49 |
Revanth |
GIT: https://github.com/krevanth/ZAP
|
| 24 |
|
|
|
| 25 |
43 |
Revanth |
#### Features
|
| 26 |
26 |
Revanth |
|
| 27 |
43 |
Revanth |
##### ZAP Processor (zap_top.v)
|
| 28 |
26 |
Revanth |
|
| 29 |
43 |
Revanth |
The ZAP core is a pipelined ATMv5T processor for FPGA.
|
| 30 |
26 |
Revanth |
|
| 31 |
43 |
Revanth |
| Property | Description |
|
| 32 |
|
|
|-----------------------|-------------------------|
|
| 33 |
|
|
|HDL | Verilog-2001 |
|
| 34 |
|
|
|Author | Revanth Kamaraj |
|
| 35 |
|
|
|ARM v5T ISA Support | Fully compatible |
|
| 36 |
|
|
|Branch Predictor | Direct mapped bimodal |
|
| 37 |
|
|
|Write Buffer | Yes |
|
| 38 |
|
|
|Abort Model | Base Restored |
|
| 39 |
|
|
|Integrated v5T CP15 | Yes |
|
| 40 |
|
|
|External Coproc. Bus | No |
|
| 41 |
|
|
|Cache Interface | 128-Bit custom interface|
|
| 42 |
|
|
|26-Bit Support | No |
|
| 43 |
|
|
|L1 Code Cache | Direct mapped virtual |
|
| 44 |
|
|
|L1 Data Cache | Direct mapped virtual |
|
| 45 |
|
|
|Cache Write Policy | Writeback |
|
| 46 |
|
|
|L1 Code TLB | Direct mapped |
|
| 47 |
|
|
|L1 Data TLB | Direct mapped |
|
| 48 |
|
|
|Bus Interface | 32-bit Wishbone B3 Linear incrementing burst |
|
| 49 |
|
|
|Cache/TLB Lock Support | No |
|
| 50 |
|
|
|CP15 Compliance | v5T (No fine pages) |
|
| 51 |
|
|
|FCSE Support | Yes |
|
| 52 |
52 |
Revanth |
|Cache Read Speed (Hit) | 320MB/s @ 80MHz CLK |
|
| 53 |
|
|
|Cache Write Speed(Hit) | 160MB/s @ 80MHz CLK |
|
| 54 |
|
|
|Cache Line Size | 16B |
|
| 55 |
26 |
Revanth |
|
| 56 |
51 |
Revanth |
* 10-stage pipeline design. Pipeline has extensive bypass network to resolve dependencies. Most operations execute at a rate of 1 operation per clock.
|
| 57 |
43 |
Revanth |
* 2 write ports for the register file to allow LDR/STR with writeback to execute as a single instruction.
|
| 58 |
51 |
Revanth |
* Instructions of ALU + Shift can allow execution of subsequent commands with dependencies if the subsequent command doesn't use the shifter. This is done by having a dual feedback network.
|
| 59 |
|
|
* The core is specifically designed for use in FGPA and relies on FGPA inference to allow portability across FPGA vendors.
|
| 60 |
26 |
Revanth |
|
| 61 |
43 |
Revanth |
#### CPU Configuration (zap_top.v)
|
| 62 |
|
|
|
| 63 |
|
|
| Parameter | Default| Description |
|
| 64 |
|
|
|--------------------------|--------|-------------|
|
| 65 |
|
|
| BP_ENTRIES | 1024 | Branch Predictor Settings. Predictor RAM depth. Must be 2^n and > 2 |
|
| 66 |
|
|
| FIFO_DEPTH | 4 | Branch Predictor Settings. Command FIFO depth. Must be 2^n and > 2 |
|
| 67 |
|
|
| STORE_BUFFER_DEPTH | 16 | Branch Predictor Settings. Depth of the store buffer. Must be 2^n and > 2 |
|
| 68 |
|
|
| DATA_SECTION_TLB_ENTRIES | 4 | Data Cache/MMU Configuration. Section TLB entries. Must be 2^n (n > 0) |
|
| 69 |
|
|
| DATA_LPAGE_TLB_ENTRIES | 8 | Data Cache/MMU Configuration. Large page TLB entries. Must be 2^n (n > 0) |
|
| 70 |
|
|
| DATA_SPAGE_TLB_ENTRIES | 16 | Data Cache/MMU Configuration. Small page TLB entries. Must be 2^n (n > 0) |
|
| 71 |
|
|
| DATA_CACHE_SIZE | 1024 | Data Cache/MMU Configuration. Cache size in bytes. Must be at least 256B and 2^n |
|
| 72 |
|
|
| CODE_SECTION_TLB_ENTRIES | 4 | Instruction Cache/MMU Configuration. Section TLB entries. Must be 2^n (n > 0) |
|
| 73 |
|
|
| CODE_LPAGE_TLB_ENTRIES | 8 | Instruction Cache/MMU Configuration. Large page TLB entries. Must be 2^n (n > 0) |
|
| 74 |
|
|
| CODE_SPAGE_TLB_ENTRIES | 16 | Instruction Cache/MMU Configuration. Small page TLB entries. Must be 2^n (n > 0) |
|
| 75 |
|
|
| CODE_CACHE_SIZE | 1024 | Instruction Cache/MMU Configuration. Cache size in bytes. Must be at least 256B and 2^n |
|
| 76 |
|
|
|
| 77 |
|
|
#### CPU IO Interface (zap_top.v)
|
| 78 |
26 |
Revanth |
|
| 79 |
|
|
Wishbone B3 compatible 32-bit bus.
|
| 80 |
|
|
|
| 81 |
43 |
Revanth |
| Dir | Size | Port | Description |
|
| 82 |
|
|
|---------------|----------|--------------------|----------------------------------|
|
| 83 |
|
|
| input | | i_clk | Clock |
|
| 84 |
|
|
| input | | i_reset | Reset |
|
| 85 |
|
|
| input | | i_irq | Interrupt. Level Sensitive. |
|
| 86 |
|
|
| input | | i_fiq | Fast Interrupt. Level Sensitive.|
|
| 87 |
|
|
| output | | o_wb_cyc | Wishbone B3 Signal |
|
| 88 |
|
|
| output | | o_wb_stb | WIshbone B3 signal |
|
| 89 |
|
|
| output | [31:0] | o_wb_adr | Wishbone B3 signal. |
|
| 90 |
|
|
| output | | o_wb_we | Wishbone B3 signal. |
|
| 91 |
|
|
| output | [31:0] | o_wb_dat | Wishbone B3 signal. |
|
| 92 |
|
|
| output | [3:0] | o_wb_sel | Wishbone B3 signal. |
|
| 93 |
52 |
Revanth |
| output | [2:0] | o_wb_cti | Wishbone B3 signal. Cycle Type Indicator (Supported modes: Incrementing Burst, End of Burst) |
|
| 94 |
|
|
| output | [1:0] | o_wb_bte | Wishbone B3 signal. Burst Type Indicator (Supported modes: Linear) |
|
| 95 |
43 |
Revanth |
| input | | i_wb_ack | Wishbone B3 signal. |
|
| 96 |
|
|
| input | [31:0] | i_wb_dat | Wishbone B3 signal. |
|
| 97 |
|
|
| output | | o_wb_stb_nxt | IGNORE THIS PORT. LEAVE OPEN. |
|
| 98 |
|
|
| output | | o_wb_cyc_nxt | IGNORE THIS PORT. LEAVE OPEN. |
|
| 99 |
|
|
| output | [31:0] | o_wb_adr_nxt | IGNORE THIS PORT. LEAVE OPEN. |
|
| 100 |
26 |
Revanth |
|
| 101 |
58 |
Revanth |
### Installation and Directory Structure (GIT)
|
| 102 |
26 |
Revanth |
|
| 103 |
58 |
Revanth |
To get the files of the ZAP processor, please execute:
|
| 104 |
52 |
Revanth |
|
| 105 |
58 |
Revanth |
```bash
|
| 106 |
|
|
git pull https://github.com/krevanth/ZAP.git
|
| 107 |
|
|
```
|
| 108 |
52 |
Revanth |
|
| 109 |
58 |
Revanth |
This should provide the following file structure:
|
| 110 |
|
|
|
| 111 |
|
|
|
| 112 |
|
|
|
| 113 |
53 |
Revanth |
├── LICENSE
|
| 114 |
|
|
├── makefile
|
| 115 |
|
|
├── README.md
|
| 116 |
|
|
└── src
|
| 117 |
|
|
|
| 118 |
|
|
├── rtl
|
| 119 |
|
|
│  └── cpu
|
| 120 |
|
|
│  ├── zap_alu_main.v
|
| 121 |
|
|
│  ├── zap_cache_fsm.v
|
| 122 |
|
|
│  ├── zap_cache_tag_ram.v
|
| 123 |
|
|
│  ├── zap_cache.v
|
| 124 |
|
|
│  ├── zap_core.v
|
| 125 |
|
|
│  ├── zap_cp15_cb.v
|
| 126 |
|
|
│  ├── zap_decode_main.v
|
| 127 |
|
|
│  ├── zap_decode.v
|
| 128 |
|
|
│  ├── zap_decompile.v
|
| 129 |
|
|
│  ├── zap_defines.vh
|
| 130 |
|
|
│  ├── zap_fetch_main.v
|
| 131 |
|
|
│  ├── zap_fifo.v
|
| 132 |
|
|
│  ├── zap_functions.vh
|
| 133 |
|
|
│  ├── zap_issue_main.v
|
| 134 |
|
|
│  ├── zap_localparams.vh
|
| 135 |
|
|
│  ├── zap_mem_inv_block.v
|
| 136 |
|
|
│  ├── zap_memory_main.v
|
| 137 |
|
|
│  ├── zap_predecode_compress.v
|
| 138 |
|
|
│  ├── zap_predecode_coproc.v
|
| 139 |
|
|
│  ├── zap_predecode_main.v
|
| 140 |
|
|
│  ├── zap_predecode_mem_fsm.v
|
| 141 |
|
|
│  ├── zap_ram_simple.v
|
| 142 |
|
|
│  ├── zap_register_file.v
|
| 143 |
|
|
│  ├── zap_shifter_main.v
|
| 144 |
|
|
│  ├── zap_shifter_multiply.v
|
| 145 |
|
|
│  ├── zap_shift_shifter.v
|
| 146 |
|
|
│  ├── zap_sync_fifo.v
|
| 147 |
|
|
│  ├── zap_thumb_decoder.v
|
| 148 |
|
|
│  ├── zap_tlb_check.v
|
| 149 |
|
|
│  ├── zap_tlb_fsm.v
|
| 150 |
|
|
│  ├── zap_tlb.v
|
| 151 |
|
|
│  ├── zap_top.v
|
| 152 |
|
|
│  ├── zap_wb_adapter.v
|
| 153 |
|
|
│  ├── zap_wb_merger.v
|
| 154 |
|
|
│  └── zap_writeback.v
|
| 155 |
|
|
├── scripts
|
| 156 |
|
|
│  ├── bin2vlog.pl
|
| 157 |
|
|
│  ├── Config.cfg_template
|
| 158 |
|
|
│  ├── makefile
|
| 159 |
|
|
│  ├── run_sim.pl
|
| 160 |
57 |
Revanth |
│  └── uart_input.pl
|
| 161 |
53 |
Revanth |
├── testbench
|
| 162 |
|
|
│  ├── chip_top.v
|
| 163 |
|
|
│  ├── External_IP
|
| 164 |
|
|
│  │  └── uart16550
|
| 165 |
|
|
│  │  ├── doc
|
| 166 |
|
|
│  │  │  ├── CHANGES.txt
|
| 167 |
|
|
│  │  │  ├── src
|
| 168 |
|
|
│  │  │  │  └── UART_spec.doc
|
| 169 |
|
|
│  │  │  └── UART_spec.pdf
|
| 170 |
|
|
│  │  └── rtl
|
| 171 |
|
|
│  │  ├── raminfr.v
|
| 172 |
|
|
│  │  ├── uart_debug_if.v
|
| 173 |
|
|
│  │  ├── uart_defines.v
|
| 174 |
|
|
│  │  ├── uart_receiver.v
|
| 175 |
|
|
│  │  ├── uart_regs.v
|
| 176 |
|
|
│  │  ├── uart_rfifo.v
|
| 177 |
|
|
│  │  ├── uart_sync_flops.v
|
| 178 |
|
|
│  │  ├── uart_tfifo.v
|
| 179 |
|
|
│  │  ├── uart_top.v
|
| 180 |
|
|
│  │  ├── uart_transmitter.v
|
| 181 |
|
|
│  │  └── uart_wb.v
|
| 182 |
|
|
│  ├── ram.v
|
| 183 |
|
|
│  ├── timer.v
|
| 184 |
|
|
│  ├── uart_rx_logger.v
|
| 185 |
|
|
│  ├── uart_tx_dumper.v
|
| 186 |
|
|
│  ├── vic.v
|
| 187 |
|
|
│  └── zap_tb.v
|
| 188 |
|
|
└── ts
|
| 189 |
|
|
├── arm_test
|
| 190 |
|
|
│  ├── arm_test.c
|
| 191 |
|
|
│  ├── arm_test.ld
|
| 192 |
|
|
│  ├── arm_test.s
|
| 193 |
|
|
│  ├── Config.cfg
|
| 194 |
|
|
│  ├── Description.txt
|
| 195 |
|
|
│  └── makefile
|
| 196 |
|
|
├── factorial
|
| 197 |
|
|
│  ├── Config.cfg
|
| 198 |
|
|
│  ├── Description.txt
|
| 199 |
|
|
│  ├── factorial.c
|
| 200 |
|
|
│  ├── factorial.ld
|
| 201 |
|
|
│  ├── factorial.s
|
| 202 |
|
|
│  └── makefile
|
| 203 |
|
|
├── makefile
|
| 204 |
|
|
├── thumb_test
|
| 205 |
|
|
│  ├── Config.cfg
|
| 206 |
|
|
│  ├── Description.txt
|
| 207 |
|
|
│  ├── linker.ld
|
| 208 |
|
|
│  ├── main.c
|
| 209 |
|
|
│  ├── makefile
|
| 210 |
|
|
│  └── thumb.s
|
| 211 |
|
|
└── uart
|
| 212 |
|
|
├── Config.cfg
|
| 213 |
|
|
├── Description.txt
|
| 214 |
|
|
├── irq_handler.c
|
| 215 |
|
|
├── main.c
|
| 216 |
|
|
├── makefile
|
| 217 |
|
|
├── uart.c
|
| 218 |
|
|
├── uart.h
|
| 219 |
|
|
├── uart.ld
|
| 220 |
|
|
└── uart.s
|
| 221 |
52 |
Revanth |
|
| 222 |
51 |
Revanth |
### Run Sample Tests
|
| 223 |
|
|
|
| 224 |
43 |
Revanth |
*Tested on Ubuntu 16.04 LTS/18.04 LTS*
|
| 225 |
26 |
Revanth |
|
| 226 |
43 |
Revanth |
Let the variable $test_name hold the name of the test. See the src/ts directory for some basic tests pre-installed. Available test names are: factorial, arm_test, thumb_test, uart. New tests can be added using these as starting templates. Please note that these will be run on the SOC platform (chip_top) that consist of the ZAP processor, 2 x UARTs, a VIC and a timer.
|
| 227 |
42 |
Revanth |
|
| 228 |
43 |
Revanth |
```bash
|
| 229 |
52 |
Revanth |
sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb openocd
|
| 230 |
|
|
sudo apt-get install iverilog gtkwave make perl xterm
|
| 231 |
43 |
Revanth |
cd $PROJ_ROOT/src/ts/$test_name # $PROJ_ROOT is the project directory.
|
| 232 |
52 |
Revanth |
make # Runs the test using IVerilog.
|
| 233 |
43 |
Revanth |
cd $PROJ_ROOT/obj/ts/$test_name # Switch to object folder.
|
| 234 |
52 |
Revanth |
gvim zap.log.gz # View the log file
|
| 235 |
|
|
gtkwave zap.vcd.gz # Exists if selected by Config.cfg of that test case.
|
| 236 |
43 |
Revanth |
```
|
| 237 |
44 |
Revanth |
To use this processor in your SOC, instantiate this top level CPU module in your project: /src/rtl/cpu/zap_top.v
|
| 238 |
42 |
Revanth |
|
| 239 |
51 |
Revanth |
### FPGA Timing Performance (Vivado, Retime Enabled)
|
| 240 |
43 |
Revanth |
|
| 241 |
|
|
| FPGA Part | Speed | Critical Path |
|
| 242 |
|
|
|--------------------|-------|----------------|
|
| 243 |
|
|
| xc7a35tiftg256-1L | 80MHz | Cache access |
|
| 244 |
|
|
|
| 245 |
47 |
Revanth |
### License
|
| 246 |
|
|
|
| 247 |
|
|
|
| 248 |
|
|
GNU GENERAL PUBLIC LICENSE
|
| 249 |
|
|
Version 2, June 1991
|
| 250 |
|
|
|
| 251 |
|
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
| 252 |
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
| 253 |
|
|
Everyone is permitted to copy and distribute verbatim copies
|
| 254 |
|
|
of this license document, but changing it is not allowed.
|
| 255 |
|
|
|
| 256 |
|
|
Preamble
|
| 257 |
|
|
|
| 258 |
|
|
The licenses for most software are designed to take away your
|
| 259 |
|
|
freedom to share and change it. By contrast, the GNU General Public
|
| 260 |
|
|
License is intended to guarantee your freedom to share and change free
|
| 261 |
|
|
software--to make sure the software is free for all its users. This
|
| 262 |
|
|
General Public License applies to most of the Free Software
|
| 263 |
|
|
Foundation's software and to any other program whose authors commit to
|
| 264 |
|
|
using it. (Some other Free Software Foundation software is covered by
|
| 265 |
|
|
the GNU Lesser General Public License instead.) You can apply it to
|
| 266 |
|
|
your programs, too.
|
| 267 |
|
|
|
| 268 |
|
|
When we speak of free software, we are referring to freedom, not
|
| 269 |
|
|
price. Our General Public Licenses are designed to make sure that you
|
| 270 |
|
|
have the freedom to distribute copies of free software (and charge for
|
| 271 |
|
|
this service if you wish), that you receive source code or can get it
|
| 272 |
|
|
if you want it, that you can change the software or use pieces of it
|
| 273 |
|
|
in new free programs; and that you know you can do these things.
|
| 274 |
|
|
|
| 275 |
|
|
To protect your rights, we need to make restrictions that forbid
|
| 276 |
|
|
anyone to deny you these rights or to ask you to surrender the rights.
|
| 277 |
|
|
These restrictions translate to certain responsibilities for you if you
|
| 278 |
|
|
distribute copies of the software, or if you modify it.
|
| 279 |
|
|
|
| 280 |
|
|
For example, if you distribute copies of such a program, whether
|
| 281 |
|
|
gratis or for a fee, you must give the recipients all the rights that
|
| 282 |
|
|
you have. You must make sure that they, too, receive or can get the
|
| 283 |
|
|
source code. And you must show them these terms so they know their
|
| 284 |
|
|
rights.
|
| 285 |
|
|
|
| 286 |
|
|
We protect your rights with two steps: (1) copyright the software, and
|
| 287 |
|
|
(2) offer you this license which gives you legal permission to copy,
|
| 288 |
|
|
distribute and/or modify the software.
|
| 289 |
|
|
|
| 290 |
|
|
Also, for each author's protection and ours, we want to make certain
|
| 291 |
|
|
that everyone understands that there is no warranty for this free
|
| 292 |
|
|
software. If the software is modified by someone else and passed on, we
|
| 293 |
|
|
want its recipients to know that what they have is not the original, so
|
| 294 |
|
|
that any problems introduced by others will not reflect on the original
|
| 295 |
|
|
authors' reputations.
|
| 296 |
|
|
|
| 297 |
|
|
Finally, any free program is threatened constantly by software
|
| 298 |
|
|
patents. We wish to avoid the danger that redistributors of a free
|
| 299 |
|
|
program will individually obtain patent licenses, in effect making the
|
| 300 |
|
|
program proprietary. To prevent this, we have made it clear that any
|
| 301 |
|
|
patent must be licensed for everyone's free use or not licensed at all.
|
| 302 |
|
|
|
| 303 |
|
|
The precise terms and conditions for copying, distribution and
|
| 304 |
|
|
modification follow.
|
| 305 |
|
|
|
| 306 |
|
|
GNU GENERAL PUBLIC LICENSE
|
| 307 |
|
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
| 308 |
|
|
|
| 309 |
|
|
0. This License applies to any program or other work which contains
|
| 310 |
|
|
a notice placed by the copyright holder saying it may be distributed
|
| 311 |
|
|
under the terms of this General Public License. The "Program", below,
|
| 312 |
|
|
refers to any such program or work, and a "work based on the Program"
|
| 313 |
|
|
means either the Program or any derivative work under copyright law:
|
| 314 |
|
|
that is to say, a work containing the Program or a portion of it,
|
| 315 |
|
|
either verbatim or with modifications and/or translated into another
|
| 316 |
|
|
language. (Hereinafter, translation is included without limitation in
|
| 317 |
|
|
the term "modification".) Each licensee is addressed as "you".
|
| 318 |
|
|
|
| 319 |
|
|
Activities other than copying, distribution and modification are not
|
| 320 |
|
|
covered by this License; they are outside its scope. The act of
|
| 321 |
|
|
running the Program is not restricted, and the output from the Program
|
| 322 |
|
|
is covered only if its contents constitute a work based on the
|
| 323 |
|
|
Program (independent of having been made by running the Program).
|
| 324 |
|
|
Whether that is true depends on what the Program does.
|
| 325 |
|
|
|
| 326 |
|
|
1. You may copy and distribute verbatim copies of the Program's
|
| 327 |
|
|
source code as you receive it, in any medium, provided that you
|
| 328 |
|
|
conspicuously and appropriately publish on each copy an appropriate
|
| 329 |
|
|
copyright notice and disclaimer of warranty; keep intact all the
|
| 330 |
|
|
notices that refer to this License and to the absence of any warranty;
|
| 331 |
|
|
and give any other recipients of the Program a copy of this License
|
| 332 |
|
|
along with the Program.
|
| 333 |
|
|
|
| 334 |
|
|
You may charge a fee for the physical act of transferring a copy, and
|
| 335 |
|
|
you may at your option offer warranty protection in exchange for a fee.
|
| 336 |
|
|
|
| 337 |
|
|
2. You may modify your copy or copies of the Program or any portion
|
| 338 |
|
|
of it, thus forming a work based on the Program, and copy and
|
| 339 |
|
|
distribute such modifications or work under the terms of Section 1
|
| 340 |
|
|
above, provided that you also meet all of these conditions:
|
| 341 |
|
|
|
| 342 |
|
|
a) You must cause the modified files to carry prominent notices
|
| 343 |
|
|
stating that you changed the files and the date of any change.
|
| 344 |
|
|
|
| 345 |
|
|
b) You must cause any work that you distribute or publish, that in
|
| 346 |
|
|
whole or in part contains or is derived from the Program or any
|
| 347 |
|
|
part thereof, to be licensed as a whole at no charge to all third
|
| 348 |
|
|
parties under the terms of this License.
|
| 349 |
|
|
|
| 350 |
|
|
c) If the modified program normally reads commands interactively
|
| 351 |
|
|
when run, you must cause it, when started running for such
|
| 352 |
|
|
interactive use in the most ordinary way, to print or display an
|
| 353 |
|
|
announcement including an appropriate copyright notice and a
|
| 354 |
|
|
notice that there is no warranty (or else, saying that you provide
|
| 355 |
|
|
a warranty) and that users may redistribute the program under
|
| 356 |
|
|
these conditions, and telling the user how to view a copy of this
|
| 357 |
|
|
License. (Exception: if the Program itself is interactive but
|
| 358 |
|
|
does not normally print such an announcement, your work based on
|
| 359 |
|
|
the Program is not required to print an announcement.)
|
| 360 |
|
|
|
| 361 |
|
|
These requirements apply to the modified work as a whole. If
|
| 362 |
|
|
identifiable sections of that work are not derived from the Program,
|
| 363 |
|
|
and can be reasonably considered independent and separate works in
|
| 364 |
|
|
themselves, then this License, and its terms, do not apply to those
|
| 365 |
|
|
sections when you distribute them as separate works. But when you
|
| 366 |
|
|
distribute the same sections as part of a whole which is a work based
|
| 367 |
|
|
on the Program, the distribution of the whole must be on the terms of
|
| 368 |
|
|
this License, whose permissions for other licensees extend to the
|
| 369 |
|
|
entire whole, and thus to each and every part regardless of who wrote it.
|
| 370 |
|
|
|
| 371 |
|
|
Thus, it is not the intent of this section to claim rights or contest
|
| 372 |
|
|
your rights to work written entirely by you; rather, the intent is to
|
| 373 |
|
|
exercise the right to control the distribution of derivative or
|
| 374 |
|
|
collective works based on the Program.
|
| 375 |
|
|
|
| 376 |
|
|
In addition, mere aggregation of another work not based on the Program
|
| 377 |
|
|
with the Program (or with a work based on the Program) on a volume of
|
| 378 |
|
|
a storage or distribution medium does not bring the other work under
|
| 379 |
|
|
the scope of this License.
|
| 380 |
|
|
|
| 381 |
|
|
3. You may copy and distribute the Program (or a work based on it,
|
| 382 |
|
|
under Section 2) in object code or executable form under the terms of
|
| 383 |
|
|
Sections 1 and 2 above provided that you also do one of the following:
|
| 384 |
|
|
|
| 385 |
|
|
a) Accompany it with the complete corresponding machine-readable
|
| 386 |
|
|
source code, which must be distributed under the terms of Sections
|
| 387 |
|
|
1 and 2 above on a medium customarily used for software interchange; or,
|
| 388 |
|
|
|
| 389 |
|
|
b) Accompany it with a written offer, valid for at least three
|
| 390 |
|
|
years, to give any third party, for a charge no more than your
|
| 391 |
|
|
cost of physically performing source distribution, a complete
|
| 392 |
|
|
machine-readable copy of the corresponding source code, to be
|
| 393 |
|
|
distributed under the terms of Sections 1 and 2 above on a medium
|
| 394 |
|
|
customarily used for software interchange; or,
|
| 395 |
|
|
|
| 396 |
|
|
c) Accompany it with the information you received as to the offer
|
| 397 |
|
|
to distribute corresponding source code. (This alternative is
|
| 398 |
|
|
allowed only for noncommercial distribution and only if you
|
| 399 |
|
|
received the program in object code or executable form with such
|
| 400 |
|
|
an offer, in accord with Subsection b above.)
|
| 401 |
|
|
|
| 402 |
|
|
The source code for a work means the preferred form of the work for
|
| 403 |
|
|
making modifications to it. For an executable work, complete source
|
| 404 |
|
|
code means all the source code for all modules it contains, plus any
|
| 405 |
|
|
associated interface definition files, plus the scripts used to
|
| 406 |
|
|
control compilation and installation of the executable. However, as a
|
| 407 |
|
|
special exception, the source code distributed need not include
|
| 408 |
|
|
anything that is normally distributed (in either source or binary
|
| 409 |
|
|
form) with the major components (compiler, kernel, and so on) of the
|
| 410 |
|
|
operating system on which the executable runs, unless that component
|
| 411 |
|
|
itself accompanies the executable.
|
| 412 |
|
|
|
| 413 |
|
|
If distribution of executable or object code is made by offering
|
| 414 |
|
|
access to copy from a designated place, then offering equivalent
|
| 415 |
|
|
access to copy the source code from the same place counts as
|
| 416 |
|
|
distribution of the source code, even though third parties are not
|
| 417 |
|
|
compelled to copy the source along with the object code.
|
| 418 |
|
|
|
| 419 |
|
|
4. You may not copy, modify, sublicense, or distribute the Program
|
| 420 |
|
|
except as expressly provided under this License. Any attempt
|
| 421 |
|
|
otherwise to copy, modify, sublicense or distribute the Program is
|
| 422 |
|
|
void, and will automatically terminate your rights under this License.
|
| 423 |
|
|
However, parties who have received copies, or rights, from you under
|
| 424 |
|
|
this License will not have their licenses terminated so long as such
|
| 425 |
|
|
parties remain in full compliance.
|
| 426 |
|
|
|
| 427 |
|
|
5. You are not required to accept this License, since you have not
|
| 428 |
|
|
signed it. However, nothing else grants you permission to modify or
|
| 429 |
|
|
distribute the Program or its derivative works. These actions are
|
| 430 |
|
|
prohibited by law if you do not accept this License. Therefore, by
|
| 431 |
|
|
modifying or distributing the Program (or any work based on the
|
| 432 |
|
|
Program), you indicate your acceptance of this License to do so, and
|
| 433 |
|
|
all its terms and conditions for copying, distributing or modifying
|
| 434 |
|
|
the Program or works based on it.
|
| 435 |
|
|
|
| 436 |
|
|
6. Each time you redistribute the Program (or any work based on the
|
| 437 |
|
|
Program), the recipient automatically receives a license from the
|
| 438 |
|
|
original licensor to copy, distribute or modify the Program subject to
|
| 439 |
|
|
these terms and conditions. You may not impose any further
|
| 440 |
|
|
restrictions on the recipients' exercise of the rights granted herein.
|
| 441 |
|
|
You are not responsible for enforcing compliance by third parties to
|
| 442 |
|
|
this License.
|
| 443 |
|
|
|
| 444 |
|
|
7. If, as a consequence of a court judgment or allegation of patent
|
| 445 |
|
|
infringement or for any other reason (not limited to patent issues),
|
| 446 |
|
|
conditions are imposed on you (whether by court order, agreement or
|
| 447 |
|
|
otherwise) that contradict the conditions of this License, they do not
|
| 448 |
|
|
excuse you from the conditions of this License. If you cannot
|
| 449 |
|
|
distribute so as to satisfy simultaneously your obligations under this
|
| 450 |
|
|
License and any other pertinent obligations, then as a consequence you
|
| 451 |
|
|
may not distribute the Program at all. For example, if a patent
|
| 452 |
|
|
license would not permit royalty-free redistribution of the Program by
|
| 453 |
|
|
all those who receive copies directly or indirectly through you, then
|
| 454 |
|
|
the only way you could satisfy both it and this License would be to
|
| 455 |
|
|
refrain entirely from distribution of the Program.
|
| 456 |
|
|
|
| 457 |
|
|
If any portion of this section is held invalid or unenforceable under
|
| 458 |
|
|
any particular circumstance, the balance of the section is intended to
|
| 459 |
|
|
apply and the section as a whole is intended to apply in other
|
| 460 |
|
|
circumstances.
|
| 461 |
|
|
|
| 462 |
|
|
It is not the purpose of this section to induce you to infringe any
|
| 463 |
|
|
patents or other property right claims or to contest validity of any
|
| 464 |
|
|
such claims; this section has the sole purpose of protecting the
|
| 465 |
|
|
integrity of the free software distribution system, which is
|
| 466 |
|
|
implemented by public license practices. Many people have made
|
| 467 |
|
|
generous contributions to the wide range of software distributed
|
| 468 |
|
|
through that system in reliance on consistent application of that
|
| 469 |
|
|
system; it is up to the author/donor to decide if he or she is willing
|
| 470 |
|
|
to distribute software through any other system and a licensee cannot
|
| 471 |
|
|
impose that choice.
|
| 472 |
|
|
|
| 473 |
|
|
This section is intended to make thoroughly clear what is believed to
|
| 474 |
|
|
be a consequence of the rest of this License.
|
| 475 |
|
|
|
| 476 |
|
|
8. If the distribution and/or use of the Program is restricted in
|
| 477 |
|
|
certain countries either by patents or by copyrighted interfaces, the
|
| 478 |
|
|
original copyright holder who places the Program under this License
|
| 479 |
|
|
may add an explicit geographical distribution limitation excluding
|
| 480 |
|
|
those countries, so that distribution is permitted only in or among
|
| 481 |
|
|
countries not thus excluded. In such case, this License incorporates
|
| 482 |
|
|
the limitation as if written in the body of this License.
|
| 483 |
|
|
|
| 484 |
|
|
9. The Free Software Foundation may publish revised and/or new versions
|
| 485 |
|
|
of the General Public License from time to time. Such new versions will
|
| 486 |
|
|
be similar in spirit to the present version, but may differ in detail to
|
| 487 |
|
|
address new problems or concerns.
|
| 488 |
|
|
|
| 489 |
|
|
Each version is given a distinguishing version number. If the Program
|
| 490 |
|
|
specifies a version number of this License which applies to it and "any
|
| 491 |
|
|
later version", you have the option of following the terms and conditions
|
| 492 |
|
|
either of that version or of any later version published by the Free
|
| 493 |
|
|
Software Foundation. If the Program does not specify a version number of
|
| 494 |
|
|
this License, you may choose any version ever published by the Free Software
|
| 495 |
|
|
Foundation.
|
| 496 |
|
|
|
| 497 |
|
|
10. If you wish to incorporate parts of the Program into other free
|
| 498 |
|
|
programs whose distribution conditions are different, write to the author
|
| 499 |
|
|
to ask for permission. For software which is copyrighted by the Free
|
| 500 |
|
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
| 501 |
|
|
make exceptions for this. Our decision will be guided by the two goals
|
| 502 |
|
|
of preserving the free status of all derivatives of our free software and
|
| 503 |
|
|
of promoting the sharing and reuse of software generally.
|
| 504 |
|
|
|
| 505 |
|
|
NO WARRANTY
|
| 506 |
|
|
|
| 507 |
|
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
| 508 |
|
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
| 509 |
|
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
| 510 |
|
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
| 511 |
|
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 512 |
|
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
| 513 |
|
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
| 514 |
|
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
| 515 |
|
|
REPAIR OR CORRECTION.
|
| 516 |
|
|
|
| 517 |
|
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 518 |
|
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
| 519 |
|
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
| 520 |
|
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
| 521 |
|
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
| 522 |
|
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
| 523 |
|
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
| 524 |
|
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
| 525 |
|
|
POSSIBILITY OF SUCH DAMAGES.
|
| 526 |
|
|
|
| 527 |
|
|
END OF TERMS AND CONDITIONS
|
| 528 |
|
|
|
| 529 |
|
|
How to Apply These Terms to Your New Programs
|
| 530 |
|
|
|
| 531 |
|
|
If you develop a new program, and you want it to be of the greatest
|
| 532 |
|
|
possible use to the public, the best way to achieve this is to make it
|
| 533 |
|
|
free software which everyone can redistribute and change under these terms.
|
| 534 |
|
|
|
| 535 |
|
|
To do so, attach the following notices to the program. It is safest
|
| 536 |
|
|
to attach them to the start of each source file to most effectively
|
| 537 |
|
|
convey the exclusion of warranty; and each file should have at least
|
| 538 |
|
|
the "copyright" line and a pointer to where the full notice is found.
|
| 539 |
|
|
|
| 540 |
|
|
|
| 541 |
|
|
Copyright (C)
|
| 542 |
|
|
|
| 543 |
|
|
This program is free software; you can redistribute it and/or modify
|
| 544 |
|
|
it under the terms of the GNU General Public License as published by
|
| 545 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
| 546 |
|
|
(at your option) any later version.
|
| 547 |
|
|
|
| 548 |
|
|
This program is distributed in the hope that it will be useful,
|
| 549 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 550 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 551 |
|
|
GNU General Public License for more details.
|
| 552 |
|
|
|
| 553 |
|
|
You should have received a copy of the GNU General Public License along
|
| 554 |
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
| 555 |
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
| 556 |
|
|
|
| 557 |
|
|
Also add information on how to contact you by electronic and paper mail.
|
| 558 |
|
|
|
| 559 |
|
|
If the program is interactive, make it output a short notice like this
|
| 560 |
|
|
when it starts in an interactive mode:
|
| 561 |
|
|
|
| 562 |
|
|
Gnomovision version 69, Copyright (C) year name of author
|
| 563 |
|
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 564 |
|
|
This is free software, and you are welcome to redistribute it
|
| 565 |
|
|
under certain conditions; type `show c' for details.
|
| 566 |
|
|
|
| 567 |
|
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 568 |
|
|
parts of the General Public License. Of course, the commands you use may
|
| 569 |
|
|
be called something other than `show w' and `show c'; they could even be
|
| 570 |
|
|
mouse-clicks or menu items--whatever suits your program.
|
| 571 |
|
|
|
| 572 |
|
|
You should also get your employer (if you work as a programmer) or your
|
| 573 |
|
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
| 574 |
|
|
necessary. Here is a sample; alter the names:
|
| 575 |
|
|
|
| 576 |
|
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
| 577 |
|
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
| 578 |
|
|
|
| 579 |
|
|
, 1 April 1989
|
| 580 |
|
|
Ty Coon, President of Vice
|
| 581 |
|
|
|
| 582 |
|
|
This General Public License does not permit incorporating your program into
|
| 583 |
|
|
proprietary programs. If your program is a subroutine library, you may
|
| 584 |
|
|
consider it more useful to permit linking proprietary applications with the
|
| 585 |
|
|
library. If this is what you want to do, use the GNU Lesser General
|
| 586 |
|
|
Public License instead of this License.
|