Re: [myhdl-list] Starting with MyHDL and trying to do my Cordic Module
Brought to you by:
jandecaluwe
From: André P. <and...@gm...> - 2014-07-10 22:06:22
|
Just to give a feedback. It was working, just that it is faster than my old module and that was causing me trouble. Cheers Em 09/07/2014 07:35, "Jan Coombs" <jen...@mu...> escreveu: > On 04/07/14 13:33, Christopher Felton wrote: > > . . . > > > > > > What is the difference between assigning a value with [:] and > > without it? All the intbv values need a [:] ? > > > > > > In Python everything is a reference > > > > x = intbv(0, min=-4, max=4) > > y = intbv(0, min=-8, max=8) > > # ... > > x = 2 > > y[:] = 4 > > assert isinstance(x, intbv) # will fail > > assert isinstance(y, intbv) # will pass > > > > The [:] indicates you are updating the value of the intbv type > > (updating all the bits). If you didn't do this you would loose > > the to > > intbv information, because the reference would be assigned to > > will start > > another type. But in our HDL we need to know the types we are > > dealing with (we remove some of the dynamicism :) > > > > Yes, all "variable" intbv need "[:] = <new value>". > > Thanks, I'd completely missed this point, even though I've paid > close attention to discussions about the use of signals and variables. > > If I had known this three years ago I might well have finished my > novel processor project by now, and would not be living in a house > in which all the walls are decorated with skull impressions. > > Jan Coombs. > > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |