FPGA vs RaspberryPI
• FPGA • Raspberry PI
ARM SoCARM SoC FPGA
u-boot & Linuxu-boot & Linux
Linux Driver Linux Driver
Python Python
やりたいこと やりたいこと
値段とか消費電力とか入手性とかを無視して、ソフト的にざっくりと比較
コミュニティの大きさ(情報の入りやすさ)もだいぶ違うけど、、、
VHDL を使った問題
signal x:std_logic
…
process (clk)
variable y : std_logic;
begin
if clk’event and clk = 1 then
y := x + 1
x <= x + 1
end if;
end process;
Q: x はいま 3 とします。
左辺にある y と x は
いくつになるでしょう?
14.
VHDL を使った問題
signal x:std_logic
…
process (clk)
variable y : std_logic;
begin
if clk’event and clk = 1 then
y := x + 1
x <= x + 1
end if;
end process;
A:
y は 4、
x は 3のまま。
次のクロックで 4。
何を意味してい
るのか?
15.
FPGA でパイプライン処理
処理 処理処理 処理 処理
処理を細分化することで高速化が可能
x + 1
x
x + 1
x
頭の中でオーバラップする時間を
考えながら設計する!!
何を意味してい
るのか?
What is Polyphony?(2/3)
PythonPolyphony
Verilog HDL
(synthesizable)
● Bring higher level of abstraction to your design
● Allow designers to focus on developing the algorithm
● Reduce costs for program maintenance
● Open Source (https://github.com/ktok07b6/polyphony)
ちょっと脱線
@polyphony.pure
def bitonic_indices(size, blocks,offset):
for i in range(0, size):
if (i % (offset << 1)) >= offset:
continue
direction = ASCENDING if (i // blocks) % 2 == 0 else DESCENDING
ii = i + offset
yield i, ii, direction
• bitonic_sort : バイトニックソートのサンプル
特別なデコレータ
Python により“動的に”回路図を自動生成