[myhdl-list] Activation list problem along with list of signals
Brought to you by:
jandecaluwe
|
From: Andrew L. <bs...@al...> - 2008-08-23 20:45:05
|
I think it's been reported before, but placing a list of signals in an
activation list doesn't seem to work.
However, I've got a more interesting issue. Since I can't put the list
into an activation list, I have to explicitly name every signal.
Annoying, but doable. Unfortunately, I can't seem to find a way to
split the line that Python likes. Since everything was inside a ()
pair, I assumed that would work, but it doesn't seem to. Then I tried a
\ line extension operator, but that didn't work.
How do I split an activation list across multiple lines?
Thanks,
-a
Here's the code:
def RegisterFile(gclk, grst,
readPort0, readPort1, readPort2,
readAddress0, readAddress1, readAddress2,
writeData0, writeAddress0, writeEnable0):
registerData = [Signal(intbv(0)[32:]) for ii in range(32)]
# How do I split the following line?
@always(readAddress0, readAddress1, readAddress2, registerData[0x00], registerData[0x01], registerData[0x02], registerData[0x03])
def read():
readPort0.next = registerData[int(readAddress0)]
readPort1.next = registerData[int(readAddress1)]
readPort2.next = registerData[int(readAddress2)]
@always(gclk.posedge)
def write():
if writeEnable0:
if writeAddress0 != 0:
registerData[int(writeAddress0)].next = writeData0
return instances()
|