HELP ! WHY doesn't SHL multiply by two ??

J

Jam

Guest
I don't get it:

I use the libraries:
Library IEEE;
Use IEEE.Std_logic_1164.all;
Use IEEE.Std_logic_unsigned.all;

I have a one compl ADC

temp(11 downto 0) <= (not FOCADCd(11) & FOCADCd(10 downto 0));

SAin(11 downto 0) <= SHL(temp,"10");

should this do the same as SAin(11 downto 0) <= SAin(11 downto 0) <=
(Temp(10 downto 0) & '0');
 
Jam wrote:
I don't get it:

I use the libraries:
Library IEEE;
Use IEEE.Std_logic_1164.all;
Use IEEE.Std_logic_unsigned.all;

I have a one compl ADC

temp(11 downto 0) <= (not FOCADCd(11) & FOCADCd(10 downto 0));

SAin(11 downto 0) <= SHL(temp,"10");

should this do the same as SAin(11 downto 0) <= SAin(11 downto 0) <=
(Temp(10 downto 0) & '0');
I am not totally clear on what you want to do in the above code. You
invert the msbit of your ADC input and then shift it left by two in the
same size word. This drops the top two bits of the original data.
Perhaps you need to define temp as 14 bits before you do the shift?
Also, it seems you think you are shifting by 1 bit while "10" specifies
two bit positions for the shift. I would do it this way.

temp(13 downto 0) <= (not FOCADCd(11) & FOCADCd(10 downto 0) & "00");

--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design URL http://www.arius.com
4 King Ave 301-682-7772 Voice
Frederick, MD 21701-3110 301-682-7666 FAX
 
Hi Pl tell me what do u want to do with this line

SAin(11 downto 0) <= SHL(temp,"10");

Anupam
 
"anupam" <anupam@coraltele.com> writes:

Hi Pl tell me what do u want to do with this line

SAin(11 downto 0) <= SHL(temp,"10");
Are you trying to do
SAin(11 downto 0) <= temp(10 downto 0) & '0';

?

Martin

--
martin.j.thompson@trw.com
TRW Conekt, Solihull, UK
http://www.trw.com/conekt
 

Welcome to EDABoard.com

Sponsor

Back
Top