[myhdl-list] dff
Brought to you by:
jandecaluwe
From: Amway I. <i....@ya...> - 2009-07-10 19:15:46
|
Hello Everybody To day tried to run dff model from myhdl documentation and it is giving some errors which are enclosed. I wrote two files 1.dff.py and 2. test_dff.py: dff.py from myhdl import * def dff(q, d, clk): @always(clk.posedge) def logic(): q.next = d return logic test_dff.py from random import randrange def test_dff(): q, d, clk = [Signal(bool(0)) for i in range(3)] dff_inst = dff(q, d, clk) @always(delay(10)) def clkgen(): clk.next = not clk @always(clk.negedge) def stimulus(): d.next = randrange(2) return dff_inst, clkgen, stimulus def simulate(timesteps): tb = traceSignals(test_dff) sim = Simulation(tb) sim.run(timesteps) simulate(2000) When i run $python test_dff.py gives traceSignal not defined What is the reason? Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com |