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.

help regarding error in dct

Status
Not open for further replies.

kakarala

Member level 1
Joined
Jun 22, 2010
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,801
hii i am writing a code for 8x8 dct and wrote following code. i am getting the following errors


RROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 45. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 45. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 45. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 45. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 45. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 46. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 46. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 46. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 47. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 48. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 48. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 48. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 49. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 50. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 50. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 50. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 51. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 56. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 56. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 56. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 56. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 56. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 57. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 57. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 57. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 58. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 59. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 59. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 59. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 60. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 61. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 61. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 61. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .
ERROR:HDLParsers:164 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. parse error, unexpected IDENTIFIER, expecting COMMA or CLOSEPAR
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .
ERROR:HDLParsers:163 - "C:/Downloads/Motionestimation/dct.vhd" Line 62. Unexpected symbol read: .


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.sad.all;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity dct is
port(
x : in img_array_t(0 to 7,0 to 7);
y : out img_array_t(0 to 7,0 to 7));

end dct;

architecture Behavioral of dct is
signal z :img_array_t(0 to 7,0 to 7);
begin
dct : process
begin
for k in 1 to 7 loop
Z(k,0) <= 23170*(x(k,0)+x(k,1)+x(k,2)+x(k,3)+x(k,4)+x(k,5)+x(k,6)+x(k,7));
Z(k,1) <= 32138*(x(k,0)– x(k,7)) + 27246*(x(k,1) – x(k,6)) + 18205*(x(k,2) – x(k,5)) + 6393*(x(k,3) – x(k,4));
Z(k,2) <= 30274*(x(k,0) + x(k,7)) + 12540*(x(k,1) + x(k,6)) – 12540*(x(k,2) + x(k,5)) – 30274*(x(k,3) + x(k,4));
Z(k,3) <= 27246*(x(k,0) – x(k,7)) – 6393*(x(k,1) – x(k,6)) – 32138*(x(k,2) – x(k,5)) – 18205*(x(k,3) – x(k,4));
Z(k,4) <= 23170*(x(k,0) + x(k,7)) – 2317*(x(k,1) + x(k,6)) – 23170*(x(k,2) + x(k,5)) + 23170*(x(k,3) + x(k,4));
Z(k,5) <= 18205*(x(k,0) – x(k,7)) – 32138*(x(k,1) – x(k,6)) + 6393*(x(k,2) – x(k,5)) + 27246*(x(k,3) – x(k,4));
Z(k,6) <= 12540*(x(k,0) + x(k,7)) – 30274*(x(k,1) + x(k,6)) + 30274*(x(k,2) + x(k,5)) – 12540*(x(k,3) + x(k,4));
Z(k,7) <= 6393*(x(k,0) – x(k,7)) – 18205*(x(k,1) – x(k,6)) + 27246*(x(k,2) – x(k,5)) – 32138*(x(k,3) – x(k,4));

end loop;
for k in 1 to 7 loop
Y(k,0) <= 23170*(z(k,0)+z(k,1)+z(k,2)+z(k,3)+z(k,4)+z(k,5)+z(k,6)+z(k,7));
Y(k,1) <= 32138*(z(k,0) – z(k,7)) + 27246*(z(k,1) – z(k,6)) + 18205*(z(k,2) – z(k,5)) + 6393*(z(k,3) – z(k,4));
Y(k,2) <= 30274*(z(k,0) + z(k,7)) + 12540*(z(k,1) + z(k,6)) – 12540*(z(k,2) + z(k,5)) – 30274*(z(k,3) + z(k,4));
Y(k,3) <= 27246*(z(k,0) – z(k,7)) – 6393*(z(k,1) – z(k,6)) – 32138*(z(k,2) – z(k,5)) – 18205*(z(k,3) – z(k,4));
Y(k,4) <= 23170*(z(k,0) + z(k,7)) – 2317*(z(k,1) + z(k,6)) – 23170*(z(k,2) + z(k,5)) + 23170*(z(k,3) + z(k,4));
y(k,5) <= 18205*(z(k,0) – z(k,7)) – 32138*(z(k,1) – z(k,6)) + 6393*(z(k,2) – z(k,5)) + 27246*(z(k,3) – z(k,4));
y(k,6) <= 12540*(z(k,0) + z(k,7)) – 30274*(z(k,1) + z(k,6)) + 30274*(z(k,2) + z(k,5)) – 12540*(z(k,3) + z(k,4));
y(k,7) <= 6393*(z(k,0) – z(k,7)) – 18205*(z(k,1) – z(k,6)) + 27246*(z(k,2) – z(k,5)) – 32138*(z(k,3) – z(k,4));

end loop;
end process;
end Behavioral;
 

Are you sure that you can access the array using the x(k,0) statement. Make sure that it works. If it doesnt work you can use x(k)(0), I think. But right now I am not sure.

Also you can remove the process statement which doesnt have any sensitivity list.

--vipin
https://vhdlguru.blogspot.com/
 

vipinlal said:
Are you sure that you can access the array using the x(k,0) statement. Make sure that it works. If it doesnt work you can use x(k)(0), I think. But right now I am not sure.

x(a,b) is the correct syntax for a 2d array type, as is posted in the code. x(a)(b) is the syntax to index into an array of arrays.

As for your other problems:

1. Dont put so much on one line.
2. Get rid of the process. Simulation will loop forever with no results.
2. Go and learn about digital circuits - ie. use a clock. You have no chance of doing what you are trying to do.
 

TrickDick is right, because mentality is different in FPGA.. This is not the way what you want to do..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top