Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

unable to understand code in vhdl please help

Status
Not open for further replies.

s3034585

Full Member level 4
Full Member level 4
Joined
May 24, 2004
Messages
226
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,087
hi guys
i am trying to understand a code segment in a vhdl example program
can any one please explain the exact operation of these lines

for i in 0 to 15 loop
Reference( 128-1)<= Reference_Temp(128-1) xor Result(i) ;
Mask ( Ks_Width-1)<= Mask_temp ( Ks_Width-1) and Reference( 128-1);

Comparison_Result_Temp(i) <= Comparison_Result_Temp(i) or ( Mask_Temp(128-1) and ( Reference_Temp(128-1) xor Result(i) ) );

end loop;

in this for loop i am not able to understad the xor operation as result is one bit and it is being xored with a 128 bit array. so my question is that wether this single bit is xored with all the 128 bits or just a single bit


please help
thank
tama
 

I think it will be xored with all the bits.

:|

Added after 2 minutes:



I think it will be xored with all the bits.

:|
 

Are you sure that is (128-1) and (KsWidth-1) instead of (128-i) and (KsWidth-i)?

As written, Reference_Temp(128-1) is a single bit, not a bit vector. A bit vector slice would be written as Reference_Temp(128 downto 1).
 

I think it was confusion on 1 or i.....
you should try again with 1 replaced by i
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top