E
ekavirsrikanth@gmail.com
Guest
hi i have a problem while using arrays.......
i have a situation where i should convert serial data into parllel
data of 8bits each..ie serial bits are converted to i bytes like that i
need alltogether 90bytes.
i can able to convert serila dat to parllel data of 1byte each but i am
facing a problem while converting data of each bytes into array of 90
bytes... and then i have to do the xor operation on each and every bit
of the 90 bytes and store in one bye.
how can i avoide this error which i got while i am coding" type error
resolving index expression
code look like this:
********************************************* serila to parllel data
conversion*****************************
process(reset,clk)
begin
if (reset= '1') then
dataout <= '0';
temp_pout <= (others =>'0');
elsif(clk'event and clk ='1')then
if (cntr_frame >=0 and cntr_frame<719) then
temp_pout <= temp_pout(6 downto 0) & dataout;
elsif(cntr_frame = 719)then
temp_pout <= (others =>'0');
-- cntr_frame <= 0;
else
temp_pout <= (others =>'0');
-- cntr_frame <= 0;
end if;
else
temp_pout <= (others =>'0');
end if;
end process;
dataout_prll <= temp_pout;
***************************************
process(reset, clk)
begin
if(reset ='1') then
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
elsif(clk'event and clk = '1') then
if(cnt_bytes>=0 and cnt_bytes<90) then
data_out(cnt_bytes) <= dataout_prll; -- error-- //
incomplete type of assignment
cnt_bytes1 <= cnt_bytes+1;
data_out(cnt_bytes1) <= data_out(cnt_bytes1) xor
data_out(cnt_bytes);
cnt_bytes <= cnt_bytes1;
elsif(cnt_bytes = 90) then
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
else
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
end if;
else
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
end if;
end process;
dataout_b1 <= data_out(90); -- error --
what should i use for this code to work ..........................
i have a situation where i should convert serial data into parllel
data of 8bits each..ie serial bits are converted to i bytes like that i
need alltogether 90bytes.
i can able to convert serila dat to parllel data of 1byte each but i am
facing a problem while converting data of each bytes into array of 90
bytes... and then i have to do the xor operation on each and every bit
of the 90 bytes and store in one bye.
how can i avoide this error which i got while i am coding" type error
resolving index expression
code look like this:
********************************************* serila to parllel data
conversion*****************************
process(reset,clk)
begin
if (reset= '1') then
dataout <= '0';
temp_pout <= (others =>'0');
elsif(clk'event and clk ='1')then
if (cntr_frame >=0 and cntr_frame<719) then
temp_pout <= temp_pout(6 downto 0) & dataout;
elsif(cntr_frame = 719)then
temp_pout <= (others =>'0');
-- cntr_frame <= 0;
else
temp_pout <= (others =>'0');
-- cntr_frame <= 0;
end if;
else
temp_pout <= (others =>'0');
end if;
end process;
dataout_prll <= temp_pout;
***************************************
process(reset, clk)
begin
if(reset ='1') then
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
elsif(clk'event and clk = '1') then
if(cnt_bytes>=0 and cnt_bytes<90) then
data_out(cnt_bytes) <= dataout_prll; -- error-- //
incomplete type of assignment
cnt_bytes1 <= cnt_bytes+1;
data_out(cnt_bytes1) <= data_out(cnt_bytes1) xor
data_out(cnt_bytes);
cnt_bytes <= cnt_bytes1;
elsif(cnt_bytes = 90) then
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
else
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
end if;
else
data_out <= (others => '0');
cnt_bytes <= 0;
cnt_bytes1 <= 0;
end if;
end process;
dataout_b1 <= data_out(90); -- error --
what should i use for this code to work ..........................