LoginSignup
0
0

More than 3 years have passed since last update.

vistaでquartus その15

Last updated at Posted at 2020-07-06

概要

vistaでquartusやってみた。
polyphonyでserialしてみた。

環境

windows vista 32bit
quartus ii v13.0
polyphony v0.3.6
ep2c5t144ボード

写真

image

サンプルコード

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

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0