1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00

Making front page table links to README files

-Every folder should be more or less self contained
-Hopefully one day this repo will look more like parallella-examples
This commit is contained in:
Andreas Olofsson 2016-03-10 07:38:06 -05:00
parent 8c350eed91
commit f60f3515e6
11 changed files with 152 additions and 31 deletions

View File

@ -1,9 +1,9 @@
=======
# OH! Open hardware for Chips and FPGAs
# OH! Open Hardware
![alt tag](common/docs/lego.jpg)
## CONTENT
## Content
1. [Philosophy](#philosophy)
2. [Modules](#modules)
@ -18,7 +18,7 @@
----
## PHILOSOPHY
## Philosophy
1. Make it work
2. Make it simple
@ -28,26 +28,25 @@
## Modules
| FOLDER | STATUS| DESCRIPTION |
|--------------------------|-------|---------------------------------------|
|[accelerator](accelerator)| FPGA | Accelerator tutorial |
|[axi](axi) | FPGA | AXI master and slave interfaces |
|[c2c](c2c) | HH | Protocol agnostic chip to chip link |
|[chip](chip) | SI | Chip design reference flow |
|[common](common) | SI | Library of basic components |
|[elink](elink) | SI | Point to point LVDS link |
|[emailbox](emailbox) | FPGA | Mailbox with interrupt output |
|[emesh](emesh) | SI | Emesh interface utility circuits |
|[emmu](emmu) | FPGA | Memory transaction translation unit |
|[etrace](etrace) | HH | Logic Analyzer |
|[gpio](gpio) | HH | General Purpose IO |
|[mio](mio) | HH | Mini-IO: lightweight parallel link |
|[pic](pic) | SI | Programmable interrupt controller |
|[parallella](parallella) | FPGA | Parallella FPGA logic |
|[risc-v](risc-v) | HH | RISC-V implementation |
|[spi](spi) | HH | SPI master/slave |
|[verilog](verilog) | HH | Verilog referenca material |
|[xilibs](xilibs) | FPGA | Xilinx simulation models |
| FOLDER | STATUS| DESCRIPTION |
|------------------------------------|-------|--------------------------------|
|[accelerator](accelerator/README.md)| FPGA | Accelerator tutorial |
|[axi](axi/README.md) | FPGA | AXI master and slave interfaces|
|[chip](chip/README.md) | SI | Chip design reference flow |
|[common](common/README.md) | SI | Library of basic components |
|[elink](elink/README.md) | SI | Point to point LVDS link |
|[emailbox](emailbox/README.md) | FPGA | Mailbox with interrupt output |
|[emesh](emesh/README.md) | SI | Emesh interface circuits |
|[emmu](emmu/README.md) | FPGA | Memory translation unit |
|[etrace](etrace/README.md) | HH | Logic Analyzer |
|[gpio](gpio/README.md) | HH | General Purpose IO |
|[mio](mio/README.md) | HH | Lightweight parallel link |
|[pic](pic/README.md) | SI | Interrupt controller |
|[parallella](parallella/README.md) | FPGA | Parallella FPGA logic |
|[risc-v](risc-v/README.md) | HH | RISC-V implementation |
|[spi](spi/README.md) | HH | SPI master/slave |
|[verilog](verilog/README.md) | HH | Verilog referenca material |
|[xilibs](xilibs/README.md) | FPGA | Xilinx simulation models |
**NOTES:**
* "SI"= Silicon validated
@ -56,7 +55,7 @@
----
## HOW TO SIMULATE
## How to simulate
```sh
./build.sh gpio/dv/dut_gpio.v # compile gpio testbench (example)
@ -81,13 +80,13 @@
----
## HOW TO BUILD
## How to build
TBD
----
## DESIGN GUIDE
## Design Guide
* Separate control from the datapath
* Separate configuration from design
@ -101,7 +100,7 @@ TBD
----
# CODING GUIDE
# Coding Guide
* Max 80 chars per line
* One input/output statement per line
@ -155,7 +154,7 @@ TBD
----
## DOCUMENTATION GUIDE
## Documentation Guide
* Write docs in markdown
* Specify which registers are reset
@ -179,7 +178,7 @@ TBD
----
## DESIGN CHECKLIST
## Design Checklist
* Is the block datasheet complete and accurate?
* Is there a user guide?
@ -192,7 +191,7 @@ TBD
----
## RECOMMENDED READING
## Recommended Reading
* [Verilog Reference](verilog/verilog_reference.md)
* [Glossary](chip/docs/glossary.md)
@ -204,7 +203,7 @@ TBD
* [Wavedrom](http://wavedrom.com/editor.html)
* [FuseSoC](https://github.com/olofk/fusesoc)
## LICENSE
## License
The OH! repository source code is licensed under the MIT license unless otherwise specified. See [LICENSE](LICENSE) for MIT copyright terms. Design specific licenses can be found in the folder root (eg: aes/LICENSE)
----

5
axi/README.md Normal file
View File

@ -0,0 +1,5 @@
AXI : AXI master and slave interface
====================================
* axi_master
* axi_slave

2
emesh/README.md Normal file
View File

@ -0,0 +1,2 @@
EMESH: Various emesh interface circuits
==========================================

2
emmu/README.md Normal file
View File

@ -0,0 +1,2 @@
EMMU: Memory translation Unit
=================================

4
gpio/firmware/README.md Normal file
View File

@ -0,0 +1,4 @@
Driver layer for GPIO
* Don't hard code, initialize correctly
* uctions?

48
gpio/firmware/gpio.c Normal file
View File

@ -0,0 +1,48 @@
#include "gpio.h"
int gpio_init(int offset){
}
void gpio_mode(int dev, int pin, int val){
}
void gpio_write(int dev, int pin, int val){
}
void gpio_toggle(int dev, int pin){
}
int gpio_read(int dev, int pin){
}
void gpio_regwrite(int dev, const reg, uint64 val){
}
uint64 gpio_regread(int dev, const reg, uint64 val){
}
int gpio_spi_init(int dev, int pins){
}
char gpio_spi_transfer (int handle, char byte){
int count;
for (count = 8; count > 0; count--){
//sclk=1;
//mosi=byte & 0x80
//byte=byte<<1
//sclk=0
//byte|=miso
}
return (byte);
}

42
gpio/firmware/gpio.h Normal file
View File

@ -0,0 +1,42 @@
#define GPIO_OFFSET 0
#define GPIO_OEN 0
#define GPIO_OUT 1
#define GPIO_IEN 2
#define GPIO_IN 3
#define GPIO_OUTAND 4
#define GPIO_OUTORR 5
#define GPIO_OUTXOR 6
#define GPIO_IMASK 7
#include <stdint.h>
// Provide pointer to GPIO module
int gpio_init(int offset);
// Set pin mode
void gpio_mode(int dev, int pin, int val);
// Write to a pin
void gpio_write(int dev, int pin, int val);
// Toggle a pin
void gpio_toggle(int dev, int pin);
// Read from a pin
int gpio_read(int dev, int pin);
// Write register
void gpio_regwrite(int dev, const reg, uint64 val);
// Read register
uint64 gpio_regread(int dev, const reg, uint64 val);
// Set up SPI
int gpio_spi_init(int dev, int pins);
// SPI transfer (byte)
char gpio_spi_transfer(int handle, char data);

View File

@ -0,0 +1,13 @@
#include "gpio.h"
void main(){
int led = 0;
gpio_mode(led,GPIO_OUTPUT);
while(1){
gpio_write(led,1);
usleep(1e6);
gpio_write(led,0);
usleep(1e6);
}
}

2
parallella/README.md Normal file
View File

@ -0,0 +1,2 @@
PARALLELLA: FPGA logic for the parallella boards
=================================================

2
spi/README.md Normal file
View File

@ -0,0 +1,2 @@
SPI: Serial Peripheral Interface
=======================================

2
verilog/README.md Normal file
View File

@ -0,0 +1,2 @@
VERILOG: Reference material
================================================