Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
FPGA と CPU のシステムを まるごと Elixir で
Search
GeekMasahiro
November 22, 2026
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
FPGA と CPU のシステムを まるごと Elixir で
2026-11-21 RTLを語る会 (19) のLT発表資料
GeekMasahiro
November 22, 2026
Transcript
8 slides
RTL を語る会 (19) LT · 2026 -11 -21 FPGA と
CPU のシステムを まるごと Elixir で 2026/11/20 Elixir HLS を公開しました X: @GeekMasahiro
FPGA と CPU 処理が混在するシステム 【現状】 • 人的な理由で境界ができ開発が分断される • 開発言語も異なる •
メジャーな事例の多い言語で開発 【私のロマン】 • システム全体を統一した言語で記述が理想 • AIで開発でも、作るものに集中でき有利 • Elixir はマイナーだが、AIは完全に使いこなして記述できる
Elixir は関数型言語 内部状態をもたない(持てない)のでテストが明確。 CPU で実行 Elixir として計算 → 期待値 照合
回路にしてシミュレーション 一致した回路だけを使う。 不一致ならコンパイルが止ま る defhls の関数 これが仕様 SystemVerilog を生成 → iverilog 例: 2011 ベクタ、 不一致 0、レイテンシ 2
パイプ演算子の活用 Elixir のパイプ演算子 |> を使うことでデータ処理の流れを記述できる。 FMラジオの受信機からのデータを I2Sでスピーカに出力するまでを記述したもの definstance radio do
usb_bulk_in() |> transform({0, 0}, &iq_pair/2) |> channel() |> discriminator() |> mpx() |> stereo(blend_hw(:value)) |> transform(0, &level/2, name: :level) |> map(&volume(&1, gain_hw(:value))) |> i2s_out() end
FPGA と CPU のあいだ DMA 、値、イベント CPU ( Elixir )
の扱い DMA · 割り込み · レジスタ(自動生成) CPU 側の Elixir で書くこと FPGA との間に自動で付くもの many_hw(list) DMA エンジン EHLS.PubSub.subscribe(:presses) 割り込み → {:presses, n} メッセージ gain_hw(12) 回路が読むレジスタ FPGA (回路)
回路も CPU の処理も、同じ Elixir で FPGA側でボタンが押されたら、割り込みを発生させて、 CPU側のElixir で受ける CPU側から関数を呼び出す形で、 FPGA側の処理を実行できる
FPGA に置く回路( definstance ) definstance presses do changes(:button0, :rising) |> transform(0, &count/2) |> EHLS.PubSub.broadcast(:presses) end CPU 側( AtomVM 上の普通の Elixir ) EHLS.PubSub.subscribe(:presses) def handle_info({:presses, n}, st), do: ... out = many_hw(samples) # 関数呼び出し
実例: FM ラジオ Sipeed Tang Primer 25K ( Gowin GW5A
) 復調器はすべて FPGA の回路 CPU 側も Elixir ( AtomVM )
OSS で公開しています github.com/elixir-hls/elixir-hls Apache -2.0 実用的なプラットフォームへの移植に 興味のある方、ぜひご連絡ください X: @GeekMasahiro
More Decks by GeekMasahiro
See All by GeekMasahiro
EXLAでcudaが動作する環境の構築と実際にNxで動かしたデモ
geekmasahiro
0
320
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
The Cult of Friendly URLs
andyhume
79
7.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Facilitating Awesome Meetings
lara
57
7.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
WENDY [Excerpt]
tessaabrams
15
41k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Thoughts on Productivity
jonyablonski
76
5.5k
Making Projects Easy
brettharned
120
6.9k
Making the Leap to Tech Lead
cromwellryan
135
10k