Re: [myhdl-list] Unable to get a counter working
Brought to you by:
jandecaluwe
|
From: Günter D. <dan...@we...> - 2008-08-16 20:12:59
|
Andrew Lentvorski wrote: > Could someone please explain to me what I'm doing wrong? pcTemp is a signal. When you assign to a signal you need to use the .next property. See my modification below. ... > > def PCStage(gclk, pc): > > pcTemp = Signal(intbv(0)[32:]) > flgPCValidTemp = Signal(bool(0)) > > @always_comb > def pc_logic(): > # WTF? If you uncomment the next line, you get an unbound > # local error. Why not in pc_flops(), too? > # print "pc:pcTemp: 0x%08x:0x%08x" % (int(pc), int(pcTemp)) > pcTemp = pc + 4 pcTemp.next = pc + 4 > print "pc:pcTemp: 0x%08x:0x%08x" % (int(pc), int(pcTemp)) I tried that an was able to comment out the print line above. Guenter |