vistaでquartus その15
概要
vistaでquartusやってみた。
polyphonyでserialしてみた。
環境
windows vista 32bit
quartus ii v13.0
polyphony v0.3.6
ep2c5t144ボード
写真
サンプルコード
from polyphony import testbench, module, is_worker_running
from polyphony.timing import clksleep
from polyphony.io import Port
from polyphony.typing import bit, uint8
@module
class a2z:
def __init__(self):
self.send = Port(bit, 'out', init=0)
self.data = Port(uint8, 'out', init=0)
self.append_worker(self.worker)
def _wait(self):
for i in range(100000):
pass
def worker(self):
i = 97
while is_worker_running():
if (i < 122):
self.data(i)
self.send(1)
clksleep(1)
self.send(0)
i = i + 1
self._wait()
m = a2z()
verilogコード
module test2(input clk, input rst, output tx);
wire [7:0] data;
wire send;
tx2 tx2(.clk(clk), .rst(rst), .start(send), .data(data), .tx(tx), .busy(busy), .get(get));
a2z_m m(.clk(clk), .rst(rst), .data(data), .send(send));
endmodule
from polyphony import testbench, module, is_worker_running
from polyphony.timing import clksleep
from polyphony.io import Port
from polyphony.typing import bit, uint8
@module
class a2z:
def __init__(self):
self.send = Port(bit, 'out', init=0)
self.data = Port(uint8, 'out', init=0)
self.append_worker(self.worker)
def _wait(self):
for i in range(100000):
pass
def worker(self):
i = 97
while is_worker_running():
if (i < 122):
self.data(i)
self.send(1)
clksleep(1)
self.send(0)
i = i + 1
self._wait()
m = a2z()
module test2(input clk, input rst, output tx);
wire [7:0] data;
wire send;
tx2 tx2(.clk(clk), .rst(rst), .start(send), .data(data), .tx(tx), .busy(busy), .get(get));
a2z_m m(.clk(clk), .rst(rst), .data(data), .send(send));
endmodule
以上。
Author And Source
この問題について(vistaでquartus その15), 我々は、より多くの情報をここで見つけました https://qiita.com/ohisama@github/items/57d656552a3526c932b0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .