diff --git a/GPIO/iCE40/README.md b/GPIO/iCE40/README.md index 08bc585256f6d90e07fb8803bbeb937d3f9f9d4c..5a8c15dbb121aa82ac57307affbd5ba8cd0dda6a 100644 --- a/GPIO/iCE40/README.md +++ b/GPIO/iCE40/README.md @@ -1,4 +1,4 @@ -# iCE40 Ring Test +# iCE40 Ring Oscillator Test ## Dependencies diff --git a/comm/iCE40/README.md b/comm/iCE40/README.md new file mode 100644 index 0000000000000000000000000000000000000000..035ecd69380a723e5fc0b6ae83b2818f4606dff2 --- /dev/null +++ b/comm/iCE40/README.md @@ -0,0 +1,35 @@ +# iCE40 Communication Ring Test + +## Dependencies + +- [IceStorm tools](https://github.com/YosysHQ/icestorm) +- [yosys](http://www.clifford.at/yosys/download.html) +- [nextpnr](https://github.com/YosysHQ/nextpnr) + +Install instructions for all of the above tools can be found on the [IceStorm +website](http://bygone.clairexen.net/icestorm/). + +## Building + +The default `make` target synthesizes the design and runs a timing analysis. The target `prog` +programs an available iCEBreaker via USB. + +## Running + +I used two iCEBreaker boards. Each board's P1A1 is connected to the other's P1A2. (If you connect +the two P1A1 pins together, the drivers will fight each other until one burns out.) I monitored P1A4 +on one of the boards with an oscilloscope. By triggering on this signal, I can time how long it +takes to send 256 packets round trip. (The result of the test is thus the frequency the oscilloscope +reports times 256.) + +## Results + +The fastest I can clock the FPGA while passing `icetime`'s analysis is 39.75MHz. This lets us use a +baud rate of nearly 5Mbit (we want to use 8x oversampling when receiving data since the two FPGAs +clocks aren't synchronized). At this speed, we see groups of 256 round trips happening at a rate of +978Hz. So overall this means the individual round trip frequency is 250kHz. + + + +Out of curiosity, I tried running at 48MHz as well and it seemed to work. At 60MHz however it +quickly drops a byte. So here it seems prudent to stay within `icetime`'s limits. diff --git a/comm/iCE40/img/comm_ring_40mhz.PNG b/comm/iCE40/img/comm_ring_40mhz.PNG new file mode 100644 index 0000000000000000000000000000000000000000..2496ffc09ad521af3d8b87023b02c9b37aecf6ec Binary files /dev/null and b/comm/iCE40/img/comm_ring_40mhz.PNG differ diff --git a/index.html b/index.html index 708cac401afc4fc11e59ae2fa736304fdbbf3dee..990d5789e96fa3210415de4c8e3eb009438937f7 100644 --- a/index.html +++ b/index.html @@ -203,12 +203,20 @@ The communication test measures how quickly two nodes can exchange messages; thi <th>date</th> </tr> +<tr> +<td>0.250</td> +<td><a href=comm/iCE40/ring.v>iCE40, Verilog</a> (<a href=comm/iCE40/README.md>notes</a>)</td> +<td>two 22 gauge jumpers (tx/rx)</td> +<td><a href=comm/iCE40/ring.v>iCE40, Verilog</a></td> +<td>September 2021</td> +</tr> + <tr> <td>0.010</td> <td><a href=comm/termios/ring.termios.c>i7-8700T, C, termios</a></td> <td>USB 2.1</td> <td><a href=comm/SerialUSB/ring.SerialUSB.ino>ATSAMD11C, Arduino, SerialUSB</a></td> -<td>April2021</td> +<td>April 2021</td> </tr> <tr>