Reply by Vladimir Vassilevsky September 12, 20062006-09-12

megawoody wrote:

> Hi seasoned users
Why messing up with the outdated ADSP21xx misery? Use Blackfin, it is much better processor.
> io_read:
Why IO is in the program memory space? Is it the access through the external bus?
> m4=0; > l4=0;
sr1 = 0; You should initialize sr1 if the upper 8 bits of the 24 bit result are required.
> si = pm(i4,m4); > sr0 = px; > sr = sr or lshift si by 8 (lo); > ax0 = sr0; > rts; > > Is my description rite or wrong!! > > bit23 to bit8 is loaded into the si register. > px which contains bit7 to bit0 si loaded into sr0. > si is ored with sr0 and then it is shifted left 8 positions.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ No. si is shifted left and then ored with sr1:sr0
> ax0 is loaded with sr0 and it is used by calling routine. > this means that the bits inside sr1 which were shifted from > sr0 will be disregarded. >
Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by Al Clark September 12, 20062006-09-12
"megawoody" <johann.wood@axcelis.com> wrote in 
news:5bmdnacepOVfl5vYnZ2dnUVZ_q-dnZ2d@giganews.com:

> Hi seasoned users > > io_read: > m4=0; > l4=0; > si = pm(i4,m4); > sr0 = px; > sr = sr or lshift si by 8 (lo); > ax0 = sr0; > rts; > > Is my description rite or wrong!! > > bit23 to bit8 is loaded into the si register.
OK
> px which contains bit7 to bit0 si loaded into sr0.
OK
> si is ored with sr0 and then it is shifted left 8 positions.
No, the shift will be first and the result is going to overwrite sr0
> ax0 is loaded with sr0 and it is used by calling routine. > this means that the bits inside sr1 which were shifted from > sr0 will be disregarded. > > Thanks from a new user > > >
If your goal is to place an instruction in SR such that SR = 0x00iiiiii then: sr = lshift si BY -8 (hi); // half of the upper instruction si = px; // grab the bottom byte sr = sr or si by 0 (lo); // the px portion isn't shifted but // it is or'd Why do you care about a ADSP-2101? This is about the most obsolete DSP still in existence. You probably don't even want to spend too much time with a 218x part anymore. Blackfin or Sharc are much better choices. I started using 21xx parts in 1992 and the 2101 was a bad choice then (I used a lot of 2105 parts at that time). If you really want to use a 21xx part, use one of the 100 pin 218x parts (not the 2181). -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Reply by megawoody September 11, 20062006-09-11
Hi seasoned users

io_read:
m4=0;
l4=0;
si = pm(i4,m4);
sr0 = px;
sr = sr or lshift si by 8 (lo);
ax0 = sr0;
rts;

Is my description rite or wrong!!

bit23 to bit8 is loaded into the si register.
px which contains bit7 to bit0 si loaded into sr0.
si is ored with sr0 and then it is shifted left 8 positions.
ax0 is loaded with sr0 and it is used by calling routine.
this means that the bits inside sr1 which were shifted from
sr0 will be disregarded.

Thanks from a new user