Added GPIO example and block design docs.

This commit is contained in:
imi415 2021-04-12 01:37:44 +08:00
parent 2fbd318615
commit 3983d934c9
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
4 changed files with 3938 additions and 1 deletions

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# Hello world example for Flute
This project contains a working project for Bluespec's open source 'Flute' processor.
## How to build?
```bash
mkdir build && cd build
TOOLCHAIN_PATH=${MY_RV_TOOLCHAIN_PATH} cmake DCMAKE_TOOLCHAIN_FILE=riscv64-unknown-eabi.cmake ..
make
```
## Hardware
The Vivado project and bluespec bsv sources will be uploaded in a few days.
![Vivado block design](assets/images/block_design.png)

3916
assets/block_design.pdf Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@ -22,10 +22,13 @@ int main(int argc, char *argv[]) {
printf("System clock frequency: %luHz\r\n", SYS_CLK_FREQ);
xilinx_gpio_pinmode(&soc_gpio, 0, 1);
for(;;) {
System_Delay(10000);
System_Delay(500);
__csrr("mcycle", csr);
printf("mcycle: 0x%016llx\r\n", csr);
xilinx_gpio_toggle(&soc_gpio, 0);
}
return 0;