Re: [myhdl-list] dff
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2009-07-10 20:05:16
|
Amway India wrote: > 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? traceSignal is indeed not defined in package myhdl. traceSignals should be. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |