linux-mips
[Top] [All Lists]

Re MIPS-DSP-ASE Instructions

To: linux-mips@linux-mips.org
Subject: Re MIPS-DSP-ASE Instructions
From: Asutosh Das <das.asutosh@gmail.com>
Date: Sun, 12 Dec 2010 18:34:26 +0530
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=CGOkekYRzU8rSMcVyzD4qicQ4V+UW6oJBOYgDlx1Vfs=; b=oMM9tkUGaYLZtKluPa5VGWAhXPx+e7oYfdJDYweCpsiIISrVn28bWd1/sy+VksRAtf qIew5Q2U0pyBEbNrpkLgyHXK2CGicyqOQfd4FZo0J3qApeJT2SnLoSxBcw+SnaNBouYv GNNgI7nwj85UI6cPcGBtew5O+QGLefqpGilxw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=G7IjUIw6pN+7VfFgpw/PWu0H3r2Fbxnt1d/pFjqPDgnU8jwZWHVqFTbRxDov/xP/7/ VsNc2wTU+2K38GH26gGaEjf+tUsApVGW4ljecBBqmMjTXB+Cn1f17EAJ8Zm9oHyqpGUs A+7eBS8ouF1kKjzW3eu2YmycEM58vCduRp6xY=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi ,
We are trying to use the MIPS-DSP-ASE instructions to extract bits
from a bit-stream.
The version is MIPS-32 rev 1. (Little Endian) (Linux 2.6.30.9)
The problem is that, the extp and its variants extract the bits from
left-most i.e. MSB.
So each time we have to load to the accumulator, we have to reverse
the stream and then load,
and extract and then reverse. This in-turn is reducing the perfomance
rather than increasing it.

For instance,
Stream -> 111011011
extract 3-bits in C code => 011 (x = (unsigned) stream& ((1<<3 )-1) )
Load this stream to accumulator and extract 3 bits => 111

====
Now reverse the stream and load to accumulator => 110110111
extract 3 bits from accumulator => 110
Now reverse the extracted bits =>011

So we have to reverse the stream before loading to the accumulator and
reverse it again after extracting from
accumulator which reduces the performance drastically.
we guess the MIPS engineers would definitely have thought about it but
we are unable to figure out a way to use these
instructions without reversing the bit-streams.

Please can you let us know a way to use these instructions without reversing.

-- 
Thank you,
Warm Regards,
Asutosh Das
# (91) 9818 4494 69

<Prev in Thread] Current Thread [Next in Thread>
  • Re MIPS-DSP-ASE Instructions, Asutosh Das <=