ソースを参照

Build instruction documentation update

bartpleiter 4 ヶ月 前
コミット
8074ec0f67

+ 3 - 3
Documentation/deploy.sh

@@ -4,6 +4,6 @@ python3 -m mkdocs build --clean
 
 # Obviously I use public key authentication to login.
 # No secret server information is displayed here :P
-ssh 192.168.0.200 'rm -rf /var/www/b4rt.nl/html/fpgc/'
-rsync -r site/ 192.168.0.200:/var/www/b4rt.nl/html/fpgc/
-ssh 192.168.0.200 'chown bart:www-data -R /var/www/b4rt.nl/html/fpgc/'
+ssh 192.168.0.222 'rm -rf /var/www/b4rt.nl/html/fpgc/'
+rsync -r site/ 192.168.0.222:/var/www/b4rt.nl/html/fpgc/
+ssh 192.168.0.222 'chown bart:www-data -R /var/www/b4rt.nl/html/fpgc/'

+ 0 - 1
Documentation/docs/Build-instructions/.pages

@@ -1,7 +1,6 @@
 nav:
     - verilog.md
     - quartus.md
-    - programmer.md
     - asm.md
     - bcc.md
     - wiki.md

+ 13 - 1
Documentation/docs/Build-instructions/asm.md

@@ -1,3 +1,15 @@
 # ASM build instructions
 
-TODO: write this page
+## Assembling a program
+
+To assemble a program, run `python3 Assembler.py > {outfile.list}`. The code is always stored in `code.asm`. The assembler will produce a text file with 32 1's and 0's and some comments for each line. To convert this into a binary, run `compileROM.sh` from the `Programmer` directory.
+
+The arguments `os` or `bdos {offset}` can be used when assembling BDOS and a bdos user program. More details can be found in the Assembler wiki page.
+
+## Assembling a userBDOS program from FPGC
+
+A user program can also be assembled from the FPGC itself using the `asm` userBDOS program found in `BCC/FPGCbuildTools/asm/`. Within BDOS, run `asm {code.asm} {out.bin}`. This assembler will directly assemble to an output binary that can be run from BDOS.
+
+## Assembling a program for simulation in Verilog
+
+See `buildToVerilog.sh` and `simulate.sh` for examples on what is needed to assemble a program into the simulated rom/flash of the FPGC. This is useful for testing very small programs or individual instructions in simulation without having to write binary manually.

+ 21 - 1
Documentation/docs/Build-instructions/bcc.md

@@ -1,3 +1,23 @@
 # BCC build instructions
 
-TODO: write this page
+This page shows how to build C written software for the FPGC using BCC
+
+## Compiling BCC using GCC
+
+To compile the compiler, run `make` in the `BCC/` directory. This will build the `bcc` binary which can then be used to compile C code into ASM code.
+
+## Compile bare metal C program
+
+To compile a C program to run directly on the FPGC, run `bcc {code.c} {file.asm}`. To also assemble and program the FPGC, a convenience script `compileBareMetal.sh` can be used.
+
+## Compile BDOS
+
+To compile the operating system BDOS, run `bcc --os {BDOS.c} {file.asm}`. To also assemble and program the FPGC, a convenience script `compileBDOS.sh` can be used.
+
+## Compile userBDOS program
+
+To compile a program to be run as a program within BDOS, run `bcc --bdos {program.c} {file.asm}`. To also assemble, send/upload and run the program on the FPGC, two convenience scripts can be used: `sendToBDOS.sh` to send the program over the network and run it directly from memory, and `uploadToBDOS.sh [filename to store]` to upload the program over the network to store it in the filesystem.
+
+## Compile userBDOS program from FPGC
+
+A user program can also be compiled from the FPGC itself using the `bcc` userBDOS program found in `BCC/FPGCbuildTools/bcc/`. Within BDOS, run `bcc {code.c} {file.asm}`. As of writing there is no scripting support, so no convenience script to also assemble the program exists.

+ 0 - 3
Documentation/docs/Build-instructions/programmer.md

@@ -1,3 +0,0 @@
-# Programmers
-
-TODO: write this page

+ 6 - 3
Documentation/docs/Build-instructions/quartus.md

@@ -1,7 +1,10 @@
 # Quartus build instructions
 
-TODO: write this page
+The Quartus folder contains all files for actually implementing the FPGC into hardware on an FPGA using the Quartus Prime Lite edition software from Intel. The targeted development board is the QMTECH 5CEF_A5_F23_I7N core board with 64MiB SDRAM.
 
-The Quartus folder contains all files for actually implementing the FPGC into hardware on an FPGA. The targeted development board is the QMTECH EP4CE15 core board with 32MiB SDRAM.
+!!! info
+    There are some slight changes between the code in the Verilog folder and the code in the Quartus folder. For example, the Verilog folder contains simulation files for the SPI flash and SDRAM memory. The Quartus project is on the top level somewhat modified to work on an actual FPGA. This also includes the use of PLLs for creating clocks.
 
-There are some slight changes between the code in the Verilog folder and the code in the Quartus folder. For example, the Verilog folder contains simulation files for the SPI flash and SDRAM memory. The Quartus project is on the top level slightly modified to work on an actual FPGA. This also includes the use of PLLs for creating clocks.
+## Flashing configuation to FPGA
+
+To flash the FPGA design, a very cheap Altera USB Blaster from Aliexpress can be used, although they require some work to get working (libusb issues).

+ 13 - 1
Documentation/docs/Build-instructions/verilog.md

@@ -1,3 +1,15 @@
 # Verilog build/simulate instructions
 
-TODO: write this page
+To simulate the design, iverilog is used. You might need to compile the latest version yourself.
+
+To run the simulation (in this case a testbench of the entire FPGC), run 
+
+```bash
+iverilog -o /home/bart/Documents/FPGA/FPGC6/Verilog/output/output \
+  /home/bart/Documents/FPGA/FPGC6/Verilog/testbench/FPGC_tb.v \
+  && vvp /home/bart/Documents/FPGA/FPGC6/Verilog/output/output
+```
+
+Assuming the testbench generates a `wave.vcd`, run `GTKWave` with this file as argument (or open the file within the program).
+
+Tip: use `ctrl+shft+b` to reload the waveform when overwritten by a new simulation.

+ 5 - 3
Documentation/docs/Build-instructions/wiki.md

@@ -1,4 +1,5 @@
 # Wiki build instructions
+
 This wiki is built using mkdocs, which runs on Python3
 
 ## Installation
@@ -6,17 +7,18 @@ This wiki is built using mkdocs, which runs on Python3
 ```bash
 pip3 install mkdocs mkdocs-material mkdocs-awesome-pages-plugin
 ```
+These packages are also included in the `requirements.txt` of this repo.
 
 ## Run site (development)
 
-Run `./run.sh` to host a local version on localhost:8088.
+Run `./run.sh` to host a local version on `localhost:8088`.
 
-When a file is changed, the website should refresh automatically
+When a file is changed, the website should refresh automatically.
 
 
 ## Deploy site
 
-To deploy the website on my server (only I can do this), run `./deploy.sh`. Just make sure you use public key authentication to the server.
+To deploy the website on my server (only I can do this ofc), run `./deploy.sh`. Just make sure you use public key authentication to the server.
 
 This will: