Re: [myhdl-list] Assignment to arbitrary bits of an intbv
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2013-05-23 12:20:22
|
On 5/23/2013 5:37 AM, Alastair McKinley wrote: > Hi all, > > I have just started looking in myHDL and am quite excited about it's > potential. > > I have a short question about assignment to intbv objects. I want to model > closely a reference VHDL implementation which has a 128 bit input from a > DMA engine. > <snip> > > The input signal to my module doesn't change in this case. > > What is the right way to do this in myHDL? > > Best regards, > > Alastair > Alastair, Your example is incomplete, you don't show how you define (instantiate) /inData/. If inData is simply, (as you imply): inData = Signal(intbv(0)[128:]) Then you have a small syntax error: inData[32:0].next = ... inData[64:32].next = ... should be, inData.next[32:0] = ... inData.next[64:32] = ... The syntax /inData[].next/ and /inData.next[]/ is the difference between a list of signal item selection and the bit vector bit selection. Hope that helps, Chris |