vista에서 quartus 그 21
개요
vista에서 quartus 해 보았다.
7seg led, 빛나게 해 보았다.
polyphony로 써 보았다.
0을 표시해 보았다.
환경
windows vista 32bit
quartus ii v13.0
polyphony v0.3.6
ep2c5t144 보드
qyf-tm1638 보드
사진
연결
vcc -- 5v
dio -- pin25
clk -- pin24
stb -- pin8
gnd -- gnd
샘플 코드
from polyphony import module, testbench, is_worker_running
from polyphony.io import Port
from polyphony.typing import bit, bit8
from polyphony.timing import clksleep, clkfence, wait_value
@module
class boss:
def __init__(self):
self.busy = Port(bit, 'in')
self.stb = Port(bit, 'out', 1)
self.start = Port(bit, 'out', 0)
self.data = Port(bit8, 'out', 1)
self.h = [0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00]
self.append_worker(self.main_worker)
def main_worker(self):
i = 0
while is_worker_running():
self.start.wr(0)
if (i < 1):
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x40)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0xc0)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[0])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[1])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[2])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[3])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[4])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[5])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[6])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[7])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
i = i + 1
m = boss()
@testbench
def test(m):
m.busy.wr(0)
for i in range(20):
wait_value(1, m.start)
m.busy.wr(1)
data = m.data.rd()
print(data)
m.busy.wr(0)
test(m)
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 21), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/2af67312f4d237aec573
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
windows vista 32bit
quartus ii v13.0
polyphony v0.3.6
ep2c5t144 보드
qyf-tm1638 보드
사진
연결
vcc -- 5v
dio -- pin25
clk -- pin24
stb -- pin8
gnd -- gnd
샘플 코드
from polyphony import module, testbench, is_worker_running
from polyphony.io import Port
from polyphony.typing import bit, bit8
from polyphony.timing import clksleep, clkfence, wait_value
@module
class boss:
def __init__(self):
self.busy = Port(bit, 'in')
self.stb = Port(bit, 'out', 1)
self.start = Port(bit, 'out', 0)
self.data = Port(bit8, 'out', 1)
self.h = [0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00]
self.append_worker(self.main_worker)
def main_worker(self):
i = 0
while is_worker_running():
self.start.wr(0)
if (i < 1):
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x40)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0xc0)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[0])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[1])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[2])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[3])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[4])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[5])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[6])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[7])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
i = i + 1
m = boss()
@testbench
def test(m):
m.busy.wr(0)
for i in range(20):
wait_value(1, m.start)
m.busy.wr(1)
data = m.data.rd()
print(data)
m.busy.wr(0)
test(m)
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 21), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/2af67312f4d237aec573
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
vcc -- 5v
dio -- pin25
clk -- pin24
stb -- pin8
gnd -- gnd
샘플 코드
from polyphony import module, testbench, is_worker_running
from polyphony.io import Port
from polyphony.typing import bit, bit8
from polyphony.timing import clksleep, clkfence, wait_value
@module
class boss:
def __init__(self):
self.busy = Port(bit, 'in')
self.stb = Port(bit, 'out', 1)
self.start = Port(bit, 'out', 0)
self.data = Port(bit8, 'out', 1)
self.h = [0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00]
self.append_worker(self.main_worker)
def main_worker(self):
i = 0
while is_worker_running():
self.start.wr(0)
if (i < 1):
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x40)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0xc0)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[0])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[1])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[2])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[3])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[4])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[5])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[6])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[7])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
i = i + 1
m = boss()
@testbench
def test(m):
m.busy.wr(0)
for i in range(20):
wait_value(1, m.start)
m.busy.wr(1)
data = m.data.rd()
print(data)
m.busy.wr(0)
test(m)
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 21), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/2af67312f4d237aec573
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
from polyphony import module, testbench, is_worker_running
from polyphony.io import Port
from polyphony.typing import bit, bit8
from polyphony.timing import clksleep, clkfence, wait_value
@module
class boss:
def __init__(self):
self.busy = Port(bit, 'in')
self.stb = Port(bit, 'out', 1)
self.start = Port(bit, 'out', 0)
self.data = Port(bit8, 'out', 1)
self.h = [0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00]
self.append_worker(self.main_worker)
def main_worker(self):
i = 0
while is_worker_running():
self.start.wr(0)
if (i < 1):
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0x40)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.stb.wr(1)
self.data(0xc0)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[0])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[1])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[2])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[3])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[4])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[5])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[6])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(self.h[7])
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.start.wr(0)
self.data(0x01)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
self.data(0x88)
self.stb.wr(0)
self.start.wr(1)
clksleep(3)
wait_value(0, self.busy)
self.stb.wr(1)
self.start.wr(0)
i = i + 1
m = boss()
@testbench
def test(m):
m.busy.wr(0)
for i in range(20):
wait_value(1, m.start)
m.busy.wr(1)
data = m.data.rd()
print(data)
m.busy.wr(0)
test(m)
Reference
이 문제에 관하여(vista에서 quartus 그 21), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ohisama@github/items/2af67312f4d237aec573텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)