1 of 104

Tim hastoo manyprojects

RISC-V Edition!

@mithro

2 of 104

Tim hastoo manyslides!

RISC-V Edition!

@mithro

3 of 104

Thank you!

I owe you all many beers!

Sébastien Bourdeauducq

m-labs.hk

Florent Kermarrec

enjoy-digital.fr

Andrew "bunnie" Huang

www.bunniestudios.com

Sean "xobs" Cross

xobs.io

William D. Jones

www.wdj-consulting.com

Ewen McNeill

ewen.mcneill.gen.nz/blog

and many more!

@mithro

4 of 104

Tim hastoo manyprojects

RISC-V Edition!

@mithro

5 of 104

Hi

I'm Tim!

@mithro

6 of 104

@mithro

7 of 104

@mithro

8 of 104

I have a secret...

@mithro

9 of 104

Impending Menace�| Credit: sagesolar

@mithro

10 of 104

I'm human inside…

@mithro

11 of 104

I'm human inside…

@mithro

12 of 104

Bug generator…

@mithro

13 of 104

@mithro

14 of 104

@mithro

15 of 104

@mithro

16 of 104

@mithro

17 of 104

@mithro

18 of 104

I'm a�Software Developer

@mithro

19 of 104

I

attend conferences

@mithro

20 of 104

@mithro

21 of 104

@mithro

22 of 104

@mithro

23 of 104

@mithro

24 of 104

@mithro

25 of 104

I'm human inside…

@mithro

26 of 104

I'm human inside…

@mithro

27 of 104

It's near nothing!

@mithro

28 of 104

@mithro

29 of 104

TimVideos.us

Conference + User Groups Recording + Live Streaming

@mithro

30 of 104

@mithro

31 of 104

@mithro

32 of 104

@mithro

33 of 104

"How hard could hardware be?"�

  • Past Tim

@mithro

34 of 104

@mithro

35 of 104

@mithro

36 of 104

Bug generator…

@mithro

37 of 104

"I hate hardware"�

  • Current Tim

@mithro

38 of 104

@mithro

39 of 104

NeTV

HDMI "man in the middle"

@mithro

40 of 104

@mithro

41 of 104

@mithro

42 of 104

@mithro

43 of 104

I'm a�Software Developer

@mithro

44 of 104

@mithro

45 of 104

NeTV

HDMI "man in the middle"

@mithro

46 of 104

@mithro

47 of 104

Lets change it up!

HDMI "man in the middle"

@mithro

48 of 104

I'm a�Software Developer

@mithro

49 of 104

"I've done PHP!"�

  • Past Tim

@mithro

50 of 104

"How bad could a programming language be?"�

  • Past Tim

@mithro

51 of 104

Two major languages

Verilog

VHDL

@mithro

52 of 104

@mithro

53 of 104

Progress was slow….

After ~3 years...

  • Only basic features working
  • Lots of features still to be done
    • Ethernet Support
    • Buffering
  • Licensing complicated

@mithro

54 of 104

Then new hardware..

We created some open hardware…..

@mithro

55 of 104

@mithro

56 of 104

Migen & MiSoC & LiteX

m-labs.hk/migen

  • Python based
  • FPGA HDL
  • System on Chip
  • Soft CPU
  • Peripherals

@mithro

57 of 104

Migen & MiSoC & LiteX

m-labs.hk/migen

  • Python based
  • FPGA HDL
  • System on Chip
  • Soft CPU
  • Peripherals

Python!!!

@mithro

58 of 104

Why is this important?

  • Python is a powerful language
  • Python is a productive language

@mithro

59 of 104

Why is this important?

  • Python is a powerful language
  • Python is a productive language
  • Python is a programming language

@mithro

60 of 104

@mithro

61 of 104

Still not enough?

  • While Python, still writing hardware
  • Writing hardware is hard

@mithro

62 of 104

Migen & MiSoC & LiteX

  • Python based
  • FPGA HDL
  • System on Chip
  • Soft CPU
  • Peripherals

SoftCPU

@mithro

63 of 104

LiteX Firmware

github.com/timvideos/HDMI2USB-litex-firmware

  • Funded Enjoy Digital
  • Rewrite in ~4 weeks
  • Lots more features

@mithro

64 of 104

Lots more features...

github.com/timvideos/HDMI2USB-litex-firmware

  • Buffering!
  • Opsis and Atlys
  • SoftCore
  • Ethernet

@mithro

65 of 104

FOSS Firmware + Hardware for

Conference Capture

@mithro

66 of 104

Used @ PyCons, Linux.conf.au, DebConf

@mithro

67 of 104

?

@mithro

68 of 104

Migen & MiSoC & LiteX

  • Python based
  • FPGA HDL
  • System on Chip
  • Soft CPU
  • Peripherals

SoftCPU

@mithro

69 of 104

Migen & MiSoC & LiteX

LiteX gives you choice of�soft CPU

    • LatticeMico32
    • OpenRISC1000

@mithro

70 of 104

Migen & MiSoC & LiteX

LiteX gives you choice of�soft CPU

    • LatticeMico32
    • OpenRISC1000
    • PicoRV32 or VexRISCV

@mithro

71 of 104

!

!

@mithro

72 of 104

Yay!

@mithro

73 of 104

Software for soft CPU?

  • Write software on soft CPU

  • Software needs cross compiler
  • Needs C library, etc...

@mithro

74 of 104

LiteX BuildEnv

Makes LiteX easy

github.com/timvideos/litex-buildenv/wiki

    • Python environment
    • Cross compilers
    • Firmware building
    • Board programming

@mithro

75 of 104

LiteX BuildEnv

Makes LiteX easy

github.com/timvideos/litex-buildenv/wiki

      • Bare metal
      • Linux
      • XXXXXX
      • Zephyr soon?

@mithro

76 of 104

LiteX BuildEnv

Makes LiteX easy

github.com/timvideos/litex-buildenv/wiki

      • Supports many boards!
      • Always supporting more boards!

@mithro

77 of 104

LiteX BuildEnv - MimasV2

$49.95 USD

Peripherals

  • Works: Button + Switches
  • Works: 7 Segments
  • Works: SPI
  • TODO: SD Card
  • TODO: VGA
  • TODO: Audio
  • TODO: PMOD Expansion

78 of 104

LiteX BuildEnv - Arty A7

$119.00 USD

Peripherals

  • Works: Button + Switches
  • Works: LEDs
  • Works: SPI
  • TODO: Ethernet
  • TODO: RGB LEDs
  • TODO: PMOD + Arduino Expansion

79 of 104

LiteX BuildEnv - TinyFPGA BX

$38.00 USD

Peripherals

  • Works: CPU
  • Works: LED
  • Works: SPI
  • TODO: Expansion?

iCE40HX8K

80 of 104

LiteX BuildEnv - ICE40HX8K-B-EVN

$49.00 USD

Peripherals

  • Works: CPU
  • Works: LED
  • Works: SPI
  • TODO: Expansion?

iCE40HX8K

81 of 104

LiteX BuildEnv - iCE40UP5K-B-EVN

$49.00 USD

Peripherals

  • Works: CPU
  • Works: RGB LED
  • Works: SPI
  • TODO: Expansion?

iCE40UP5K

82 of 104

LiteX BuildEnv - icebreaker

$??.00 USD

Peripherals

  • Works: CPU
  • Works: LEDs, Buttons
  • Works: SPI
  • TODO: Expansion?

iCE40UP5K

83 of 104

LiteX BuildEnv - Your board?

Easy

Lattice iCE40, iCE40UP5K

Xilinx Spartan 6

Xilinx Artix 7, Spartan 7, Kintex 7

Harder (But possible)

All Altera / Intel, Lattice ECP5

84 of 104

Yay!

@mithro

85 of 104

Software for soft CPU?

  • Write software on soft CPU

  • Software needs cross compiler
  • Needs C library, etc...

@mithro

86 of 104

Software for soft CPU?

  • Write software on soft CPU

  • Software needs cross compiler
  • Needs C library, etc...

Not Python

@mithro

87 of 104

@mithro

88 of 104

@mithro

89 of 104

Run MicroPython on soft CPU!

@mithro

90 of 104

FuPy - Python + FPGAs

Python describing hardware

Running MicroPython

fupy.github.io

@mithro

91 of 104

FuPy - Python + FPGAs

Python describing hardware

Running MicroPython

fupy.github.io

Python!!!

@mithro

92 of 104

FuPy - Python + FPGAs

Python describing hardware

Running MicroPython

fupy.github.io

Python!!!

Python!!!

@mithro

93 of 104

LiteX BuildEnv

Makes LiteX easy

github.com/timvideos/litex-buildenv/wiki

      • Bare metal
      • Linux
      • MicroPython
      • Zephyr?

@mithro

94 of 104

FuPy - Python + FPGAs

We need your help!

fupy.github.io

@mithro

95 of 104

@mithro

96 of 104

A distraction!

@mithro

@mithro

97 of 104

U2F Hardware

@mithro

98 of 104

YubiKey Nano - U2F inside USB Port

@mithro

99 of 104

My family!

@mithro

100 of 104

$50 USD!

€?? EUR!

@mithro

101 of 104

I'm Tomu

  • 25MHz ARM Cortex-M0+
  • 8kb^ RAM
  • 64kb^ Flash
  • USB 2.0

  • 2 different color LEDs
  • 2 touch buttons

  • Literally 12 Parts
  • ~$10 USD from Digikey�In individual quantities
  • Hand solderable

^kilobytes

102 of 104

LiteX BuildEnv - Tomu FPGA

$??.00 USD

Peripherals

  • Works: CPU
  • Works: LEDs, Buttons
  • Works: SPI
  • TODO: Expansion?

iCE40UP5K

103 of 104

Tomu FPGA

  • LiteX BuildEnv supported!
  • RISC-V inside your USB port!
  • MicroPython!
  • Zephyr?
  • more!?

  • iCE40UP5K
  • 5K LUTs
  • 128kbyte RAM
  • SPI Flash
  • RGB LED + Captouch

@mithro

104 of 104

Original Tomu

FPGA Tomu

TinyFPGA BX

@mithro