1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00
myhdl/cosimulation/test/dff_clkout.py

19 lines
301 B
Python
Raw Normal View History

2005-12-14 14:41:53 +00:00
from myhdl import *
2003-05-12 16:57:17 +00:00
from dff import dff
ACTIVE_LOW, INACTIVE_HIGH = 0, 1
def dff_clkout(clkout, q, d, clk, reset):
DFF_1 = dff(q, d, clkout, reset)
2005-12-14 14:41:53 +00:00
@instance
2003-05-12 16:57:17 +00:00
def assign():
while 1:
yield clk
clkout.next = clk
2005-12-14 14:41:53 +00:00
return DFF_1, assign
2003-05-12 16:57:17 +00:00