diff --git a/img/fomu-memory-layout.png b/img/fomu-memory-layout.png new file mode 100644 index 0000000..8ee48d6 Binary files /dev/null and b/img/fomu-memory-layout.png differ diff --git a/img/ice40-ledd.png b/img/ice40-ledd.png new file mode 100644 index 0000000..13c2984 Binary files /dev/null and b/img/ice40-ledd.png differ diff --git a/img/ice40-lut.png b/img/ice40-lut.png new file mode 100644 index 0000000..0ad62cf Binary files /dev/null and b/img/ice40-lut.png differ diff --git a/img/tomu-fpga-evt-1-small.jpg b/img/tomu-fpga-evt-1-small.jpg new file mode 100644 index 0000000..47e049e Binary files /dev/null and b/img/tomu-fpga-evt-1-small.jpg differ diff --git a/index.html b/index.html index b2a222b..e436e4e 100644 --- a/index.html +++ b/index.html @@ -89,43 +89,37 @@

Fomu: an FPGA in your USB Port

- Fomu (with case): an FPGA in your USB port. Crowdfunding now! One week to go. t.xobs.io/fomu + Pre-order now on Crowd Supply! t.xobs.io/fomu

Fomu: An FPGA in your USB Port

-

A whirlwind introduction to Fomu and FPGAs

+

A whirlwind introduction to Fomu; a workshop in three levels

Sean Cross - https://xobs.io/ - @xobs

-

Outline

-
    -
  1. Fomu Firmware Layout
  2. -
  3. -
      -
    1. Bootloader
    2. -
    3. Recovery
    4. -
    5. Magic constants
    6. -
    7. Interpreters
    8. -
    9. Updates
    10. -
    -
  4. -
  5. Loading firmware onto Fomu
  6. -
  7. Blinkenlights
  8. -
+

Levels of Fomu

+

+ Fomu aims to be accessable on three levels: +

    +
  1. Python / Interpreted
  2. +
  3. RISC-V
  4. +
  5. Verilog / FPGA
  6. +
+

Workshop Outline

  1. What do I need to get started?
  2. -
  3. What is Fomu, and what is an FPGA?
  4. -
  5. What can I do with Fomu?
  6. +
  7. What is an FPGA, and what is Fomu?
  8. What makes Fomu special?
  9. +
  10. What can I do with Fomu?
@@ -133,9 +127,13 @@

What do I need to get started?

    +
  1. DFU utilities
  2. +
  3. Serial console
  4. +
  5. RISC-V toolchain
  6. Synthesis
  7. Place-and-Route
  8. Packer
  9. +
  10. Python 3
@@ -143,34 +141,65 @@

What is an FPGA?

-

- An FPGA is like a hardware emulator. It can change itself so that it can take on the characteristics of any other digital logic. -

-

- FPGAs are measured in resources called LUTs or LCs. -

+ SB_LUT4 +
+
+

What is an FPGA?

+

+							module DFF (output reg Q, input C, D, R);
+								always @(posedge C)
+								if (~R) begin
+									Q <= 1'b0;
+								end else begin
+									Q <= D;
+								end
+							endmodule						  
+						
+
+ +
+

About the ICE40UP5K

+
    +
  1. 5280 4-input LUTs (LC)
  2. +
  3. 16 kilobytes BRAM
  4. +
  5. 128 kilobytes "SPRAM"
  6. +
  7. Current-limited 3-channel LED
  8. +
  9. 2x I2C and 2x SPI
  10. +
  11. 8 16-bit DSP units
  12. +
  13. Warmboot capability
  14. +
+
+

What is Fomu?

-

+

+

What is this PCB?

-

+ Fomu EVT1 +

Fomu EVT1

+

What modifications does it have?

+ +
+

Fomu Block Design Diagram

+
+ +
+

Fomu SPI Flash Layout

+ Fomu memory layout + +
@@ -214,70 +259,17 @@

Updating Fomu

- - sean@PAZUZU  ~\Code\Fomu\foboot\releases\v1.8.1   master ≢  [10:45] -❯ dfu-util -l -dfu-util 0.9 - -Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. -Copyright 2010-2016 Tormod Volden and Stefan Schmidt -This program is Free Software and has ABSOLUTELY NO WARRANTY -Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ - -Found DFU: [1209:5bf0] ver=0101, devnum=16, cfg=1, intf=0, path="1-1.1.2", alt=0, name="Fomu DFU Bootloader v1.7.2", serial="UNKNOWN" -sean@PAZUZU  ~\Code\Fomu\foboot\releases\v1.8.1   master ≢  [10:45] -❯ dfu-util -D .\pvt-installable.dfu -dfu-util 0.9 - -Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. -Copyright 2010-2016 Tormod Volden and Stefan Schmidt -This program is Free Software and has ABSOLUTELY NO WARRANTY -Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ - -Match vendor ID from file: 1209 -Match product ID from file: 5bf0 -Opening DFU capable USB device... -ID 1209:5bf0 -Run-time device DFU version 0101 -Claiming USB DFU Interface... -Setting Alternate Setting #0 ... -Determining device status: state = dfuIDLE, status = 0 -dfuIDLE, continuing -DFU mode device DFU version 0101 -Device returned transfer size 1024 -Copying data from PC to DFU device -Download [========= ] 36% 38912 bytes +
$ dfu-util -l
+Found DFU: [1209:5bf0] name="Fomu DFU Bootloader v1.7.2"
+$ dfu-util -D evt-installable.dfu
+Download        [=========                ]  36%   38912 bytes
 Download done.
-state(7) = dfuMANIFEST, status(0) = No error condition is present
-state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
-Done!
-sean@PAZUZU  ~\Code\Fomu\foboot\releases\v1.8.1   master ≢                                                                 [10:45]
-❯ dfu-util -l
-dfu-util 0.9
-
-Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
-Copyright 2010-2016 Tormod Volden and Stefan Schmidt
-This program is Free Software and has ABSOLUTELY NO WARRANTY
-Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
-
-Found DFU: [1209:5bf0] ver=0101, devnum=14, cfg=1, intf=0, path="1-1.1.2", alt=0, name="Fomu DFU Bootloader v1.8.1", serial="UNKNOWN"
-sean@PAZUZU  ~\Code\Fomu\foboot\releases\v1.8.1   master ≢                                                                 [10:47]
-❯
-					
+$ dfu-util -l
+Found DFU: [1209:5bf0] name="Fomu DFU Bootloader v1.8.1"
+$
-
-

Levels of Fomu

-

- Fomu aims to be accessable on three levels: -

    -
  1. Python / Interpreted
  2. -
  3. RISC-V
  4. -
  5. Verilog / FPGA
  6. -
-

-

Python / Interpreted

@@ -289,25 +281,46 @@ sean@PAZUZU  ~\Code\Fomu\foboot\releases\v1.8.1   master ≢ 

Loading Programs onto Fomu

- dfu-util -l - dfu-util -D update.bin +

+$ dfu-util -l
+Found DFU: [1209:5bf0] name="Fomu DFU Bootloader v1.8.1"
+$ dfu-util -e                  # Boot current program
+$ dfu-util -D new-image.dfu    # Load new program
+

u5b f0mu

Loading MicroPython

- dfu-util -D micropython.dfu +
$ dfu-util -D micropython-fomu.dfu

Connecting via serial

+
screen /dev/cu.usbserial*
+
screen /dev/ttyACM*
+
Teraterm
+
MicroPython v1.10-296-g0a5a77a on 2019-06-18; fomu with vexriscv
+>>>

Interacting with Fomu

+

+							>>> import fomu
+							>>> rgb = fomu.rgb()
+							>>> rgb.mode("error")
+							>>> 
+					

RGB LEDD reference

+ ICE40 LEDD registers +
>>> rgb.write_raw(0b0001, 255)
+>>> rgb.write_raw(0b1010, 14)
+>>> rgb.write_raw(0b1011, 1)
+>>> 
+