Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Problem in design

 
Thread Tools Search this Thread
Old 06-24-2005, 03:41 AM   #1
Default Problem in design


Hello there!
I want to read a memory containing 4096 words(altsyncram named R,G,B.
used a MIF file to store the data) and convert them to YUV. I have
checked yuv conversion. It works. But in Quartus the Analysis and
Synthesis hangs at 10%. I will be happy if anybody helps me out.

ENTITY PRO1 IS
PORT(START,CLK:IN STD_LOGIC;
FIN_STEP1:OUT STD_LOGIC;
FIN_STEP2: OUT STD_LOGIC);
END ENTITY PRO1;
------------------------------------------
ARCHITECTURE A OF PRO1 IS
------------------------------------------
TYPE YUVARRAY IS ARRAY(0 TO 4095) OF STD_LOGIC_VECTOR(7 DOWNTO 0);
SHARED VARIABLE Y1,U1,V1 : YUVARRAY;
SIGNAL RDATA,GDATA,BDATA,ROUT,BOUT,GOUT,Y,U,V: STD_LOGIC_VECTOR(7
DOWNTO 0);
SIGNAL RW,GW,BW: STD_LOGIC;
SIGNAL STEP1,FINRGB:STD_LOGIC;
SIGNAL RWAD,BWAD,GWAD,RRAD,GRAD,BRAD:STD_LOGIC_VECTOR(11 DOWNTO 0);
SHARED VARIABLE I,RED,GREEN,BLUE : INTEGER;
-------------------------------------------
COMPONENT RGB2YUV IS
port(START_CONV:in std_logic;
RED,GREEN,BLUE: in std_logic_vector(7 downto 0);
Y,U,V: out std_logic_vector(7 downto 0);
FIN_CONV: out std_logic);
END COMPONENT RGB2YUV;
-------------------------------------------
COMPONENT B IS
PORT
(
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
wren : IN STD_LOGIC := '1';
wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
clock : IN STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
);
END COMPONENT B;
-------------------------------------------
COMPONENT G IS
PORT
(
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
wren : IN STD_LOGIC := '1';
wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
clock : IN STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
);
END COMPONENT G;
-------------------------------------------
COMPONENT R IS
PORT
(
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
wren : IN STD_LOGIC := '1';
wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
clock : IN STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
);
END COMPONENT R;
-------------------------------------------
BEGIN
STAGE1: RGB2YUV PORT MAP(STEP1,ROUT,GOUT,BOUT,Y,U,V,FINRGB);
RROM: R PORT MAP(RDATA,RW,RWAD,RRAD,CLK,ROUT);
GROM: G PORT MAP(GDATA,GW,GWAD,GRAD,CLK,GOUT);
BROM: B PORT MAP(BDATA,BW,BWAD,BRAD,CLK,BOUT);
-------------------------------------------
S1ROCESS(START,FINRGB)
BEGIN
RED:=0;GREEN:=0;BLUE:=0;
STEP1<='0';FIN_STEP1<='0';
IF(START = '1') THEN
RW<='0';GW<='0';BW<='0';

CONVRGB:FOR I IN 0 TO 4095 LOOP
RRAD<=INT2SLVECT(I,12);GRAD<=INT2SLVECT(I,12);BRAD <=INT2SLVECT(I,12);

-- RED:=SLVECT2INT(ROUT,;GREEN:=SLVECT2INT(GOUT,; BLUE:=SLVECT2INT(BOUT,;
STEP1<='1';
--RWAD<=RRAD;BWAD<=BRAD;GWAD<=BRAD;
--RW<='1';GW<='1';BW<='1';
--RDATA<=Y;GDATA<=U;BDATA<=V;
--Y1(I):=SLVECT2INT(Y,;Y2(I):=SLVECT2INT(U,;Y3(I ):=SLVECT2INT(V,;
--STEP1<='0';
Y1(I):=Y;U1(I):=U;V1(I):=V;
END LOOP CONVRGB;
FIN_STEP1<='1';
END IF;
END PROCESS S1;
END ARCHITECTURE A;



Deepa
  Reply With Quote
Old 06-24-2005, 05:22 AM   #2
raghurash@rediffmail.com
 
Posts: n/a
Default Re: Problem in design

Deepa,
Shared variables are not synthesizable.Functions
INT2SLVECT,SLVECT2INT are not visible. The code is more of like C prog
code. Statements in the procees construct seem to be hardware
intensive. Better consult who knows RTL coding in your office/college.
Cheers,
Raghavendra.

Deepa wrote:
> Hello there!
> I want to read a memory containing 4096 words(altsyncram named R,G,B.
> used a MIF file to store the data) and convert them to YUV. I have
> checked yuv conversion. It works. But in Quartus the Analysis and
> Synthesis hangs at 10%. I will be happy if anybody helps me out.
>
> ENTITY PRO1 IS
> PORT(START,CLK:IN STD_LOGIC;
> FIN_STEP1:OUT STD_LOGIC;
> FIN_STEP2: OUT STD_LOGIC);
> END ENTITY PRO1;
> ------------------------------------------
> ARCHITECTURE A OF PRO1 IS
> ------------------------------------------
> TYPE YUVARRAY IS ARRAY(0 TO 4095) OF STD_LOGIC_VECTOR(7 DOWNTO 0);
> SHARED VARIABLE Y1,U1,V1 : YUVARRAY;
> SIGNAL RDATA,GDATA,BDATA,ROUT,BOUT,GOUT,Y,U,V: STD_LOGIC_VECTOR(7
> DOWNTO 0);
> SIGNAL RW,GW,BW: STD_LOGIC;
> SIGNAL STEP1,FINRGB:STD_LOGIC;
> SIGNAL RWAD,BWAD,GWAD,RRAD,GRAD,BRAD:STD_LOGIC_VECTOR(11 DOWNTO 0);
> SHARED VARIABLE I,RED,GREEN,BLUE : INTEGER;
> -------------------------------------------
> COMPONENT RGB2YUV IS
> port(START_CONV:in std_logic;
> RED,GREEN,BLUE: in std_logic_vector(7 downto 0);
> Y,U,V: out std_logic_vector(7 downto 0);
> FIN_CONV: out std_logic);
> END COMPONENT RGB2YUV;
> -------------------------------------------
> COMPONENT B IS
> PORT
> (
> data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
> wren : IN STD_LOGIC := '1';
> wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> clock : IN STD_LOGIC ;
> q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
> );
> END COMPONENT B;
> -------------------------------------------
> COMPONENT G IS
> PORT
> (
> data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
> wren : IN STD_LOGIC := '1';
> wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> clock : IN STD_LOGIC ;
> q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
> );
> END COMPONENT G;
> -------------------------------------------
> COMPONENT R IS
> PORT
> (
> data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
> wren : IN STD_LOGIC := '1';
> wraddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> rdaddress : IN STD_LOGIC_VECTOR (11 DOWNTO 0);
> clock : IN STD_LOGIC ;
> q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
> );
> END COMPONENT R;
> -------------------------------------------
> BEGIN
> STAGE1: RGB2YUV PORT MAP(STEP1,ROUT,GOUT,BOUT,Y,U,V,FINRGB);
> RROM: R PORT MAP(RDATA,RW,RWAD,RRAD,CLK,ROUT);
> GROM: G PORT MAP(GDATA,GW,GWAD,GRAD,CLK,GOUT);
> BROM: B PORT MAP(BDATA,BW,BWAD,BRAD,CLK,BOUT);
> -------------------------------------------
> S1ROCESS(START,FINRGB)
> BEGIN
> RED:=0;GREEN:=0;BLUE:=0;
> STEP1<='0';FIN_STEP1<='0';
> IF(START = '1') THEN
> RW<='0';GW<='0';BW<='0';
>
> CONVRGB:FOR I IN 0 TO 4095 LOOP
> RRAD<=INT2SLVECT(I,12);GRAD<=INT2SLVECT(I,12);BRAD <=INT2SLVECT(I,12);
>
> -- RED:=SLVECT2INT(ROUT,;GREEN:=SLVECT2INT(GOUT,; BLUE:=SLVECT2INT(BOUT,;
> STEP1<='1';
> --RWAD<=RRAD;BWAD<=BRAD;GWAD<=BRAD;
> --RW<='1';GW<='1';BW<='1';
> --RDATA<=Y;GDATA<=U;BDATA<=V;
> --Y1(I):=SLVECT2INT(Y,;Y2(I):=SLVECT2INT(U,;Y3(I ):=SLVECT2INT(V,;
> --STEP1<='0';
> Y1(I):=Y;U1(I):=U;V1(I):=V;
> END LOOP CONVRGB;
> FIN_STEP1<='1';
> END IF;
> END PROCESS S1;
> END ARCHITECTURE A;




raghurash@rediffmail.com
  Reply With Quote
Old 06-24-2005, 07:03 AM   #3
Neo
 
Posts: n/a
Default Re: Problem in design
There is as such nothing wrong with your code except that it is very
unwieldy. You have got a huge array and a lot of conversion in loops.
So it is going to take plenty of time or if not enough memory it will
hang. But I dont see the need for shared variables.



Neo
  Reply With Quote
Old 06-27-2005, 08:52 AM   #4
Deepa
 
Posts: n/a
Default Re: Problem in design
Thanks for your replies. I have another doubt. I can't see the value of
variables using quartus II. I have stored the YUV values in the RAM
itself. So will the mif file be updated by those values? How can I see
the RAM data after the simulation?



Deepa
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Physical sythesis tool PALAC is not supported by Formal Verification tool Conf bbiandov Software 0 12-22-2008 05:25 AM
Dial Up Problem smackedass A+ Certification 3 02-02-2007 11:59 PM
Problem accessing query in the design mode MS access shieldguy Software 0 11-07-2006 02:45 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46