documentation: add readme and license file

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2018-12-17 22:09:00 +08:00
parent a8de1b56dc
commit 3beccf1b03
2 changed files with 60 additions and 0 deletions

11
LICENSE Executable file
View File

@ -0,0 +1,11 @@
Copyright 2018 Sean Cross
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

49
README.md Executable file
View File

@ -0,0 +1,49 @@
# Fomu FPGA Tools
The EVT version of Fomu is a "stretch" PCB with a Raspberry Pi header. Additionally, the factory test jig for production versions of Fomu has pins that match up with a test jig with the same pinout.
These tools can be used to control an FPGA and its accompanying SPI flash chip.
## Building
To build this repository, simply run `make`.
## Loading a Bitstream
The most basic usecase is to load a program into configuration RAM. This is a very quick process, and can be used for rapid prototyping.
To load `top.bin`, use the `-f` argument:
```sh
# ./fomu-flash -f top.bin
```
This will reset the FPGA, reset the SPI flash, load the bitstream into the FPGA, and then start running the program.
## Programming SPI Flash
To write a binary file to SPI flash, use `-w`:
```sh
# ./fomu-flash -w top.bin # Write top.bin to SPI Flash
# ./fomu-flash -r # Reset the FPGA
```
This will erase just enough of the SPI to hold the new binary file, then flash the binary to SPI.
It will not reset the FPGA. To do that, you must re-run with `-r`.
## Verifying SPI flash
You can verify the SPI flash was programmered with the `-v` command:
```sh
# ./tomu-flash -v top.bin
```
## Checking SPI Flash was Written
You can "peek" at 256 bytes of SPI with `-p [offset]`. This can be used to quickly verify that something was written.
numbers seen in https://elinux.org/File:Pi-GPIO-header.png