A
ashu
dear all,
my problem is regarding optimization of the code. i have written a top
level code which is calling say three components....problem is that
seprately all the components are giving me a max. opreating freq.
somewhere near to say 200 Mhz but as soon as i used them in a top level
its comes down to say 30-40 Mhz. what could be the reason ....i m using
quartus and i also tested the same on synplicity.....
thanks
ashwani
---------------------------------
---------------------------------------
Library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_unsigned.all ;
use ieee.std_logic_arith.all ;
entity top_level is
port(
pclk,start_in,y_sel: in std_logic ;
q_sel : in std_logic_vector(2 downto 0) ;
u1_rom_data : out std_logic_vector(11 downto 0);
u1_start_out : out std_logic;
u2_st_qntsig : out std_logic ;
u2_data_qntsig : out integer range -127 to 127 ;
st_zzout : out std_logic ;
zz_out : out std_logic_vector(7 downto 0)
);
end top_level ;
architecture a of top_level is
------------- intermediate signals ---------
signal st_romsig, st_qntsig,st_zzs : std_logic ;
signal data_int : integer range -2047 to 2047 ;
signal data_qnt,data_zzs : std_logic_vector(7 downto 0);
signal data_romsig : std_logic_vector(11 downto 0);
signal data_qntsig : integer range -127 to 127 ;
-----------------------------------------------------------------------
component rom
port (
clk,rst : in std_logic ;
rom_stout : out std_logic ;
dct_out : out std_logic_vector(11 downto 0)
) ;
end component ;
-------------------------------------------------------------------------
component qnt
port (
clk,startin : in std_logic ;
a : in integer range 2047 downto -2047;
sel : in std_logic_vector ( 2 downto 0);
sel_Y_cr : in std_logic;
z : out integer range 127 downto -127;
startout : out std_logic
);
end component ;
-------------------------------------------------------------------------------
component zz is
port
(
pclk,start_in : in std_logic ;
start_out : out std_logic ;
data_in : in std_logic_vector(7 downto 0) ;
data_out : out std_logic_vector(7 downto 0)
) ;
end component ;
------------------------------------------------------------------------------------------
begin
data_int <= conv_integer ( signed(data_romsig) ) ;
data_qnt <= conv_std_logic_vector (data_qntsig,8) ;
U1 : rom port map( pclk,start_in,st_romsig,data_romsig);
U2 : qnt port map(
pclk,st_romsig,data_int,q_sel,y_sel,data_qntsig,st_qntsig);
U3 : zz port map( pclk,st_qntsig,st_zzs,data_qnt,data_zzs);
---------- output ports to tap the signals -----------------
u1_rom_data <= data_romsig ;
u1_start_out <= st_romsig ;
u2_st_qntsig <= st_qntsig ;
u2_data_qntsig <= data_qntsig ;
zz_out <= data_zzs ;
end a ;
my problem is regarding optimization of the code. i have written a top
level code which is calling say three components....problem is that
seprately all the components are giving me a max. opreating freq.
somewhere near to say 200 Mhz but as soon as i used them in a top level
its comes down to say 30-40 Mhz. what could be the reason ....i m using
quartus and i also tested the same on synplicity.....
thanks
ashwani
---------------------------------
---------------------------------------
Library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_unsigned.all ;
use ieee.std_logic_arith.all ;
entity top_level is
port(
pclk,start_in,y_sel: in std_logic ;
q_sel : in std_logic_vector(2 downto 0) ;
u1_rom_data : out std_logic_vector(11 downto 0);
u1_start_out : out std_logic;
u2_st_qntsig : out std_logic ;
u2_data_qntsig : out integer range -127 to 127 ;
st_zzout : out std_logic ;
zz_out : out std_logic_vector(7 downto 0)
);
end top_level ;
architecture a of top_level is
------------- intermediate signals ---------
signal st_romsig, st_qntsig,st_zzs : std_logic ;
signal data_int : integer range -2047 to 2047 ;
signal data_qnt,data_zzs : std_logic_vector(7 downto 0);
signal data_romsig : std_logic_vector(11 downto 0);
signal data_qntsig : integer range -127 to 127 ;
-----------------------------------------------------------------------
component rom
port (
clk,rst : in std_logic ;
rom_stout : out std_logic ;
dct_out : out std_logic_vector(11 downto 0)
) ;
end component ;
-------------------------------------------------------------------------
component qnt
port (
clk,startin : in std_logic ;
a : in integer range 2047 downto -2047;
sel : in std_logic_vector ( 2 downto 0);
sel_Y_cr : in std_logic;
z : out integer range 127 downto -127;
startout : out std_logic
);
end component ;
-------------------------------------------------------------------------------
component zz is
port
(
pclk,start_in : in std_logic ;
start_out : out std_logic ;
data_in : in std_logic_vector(7 downto 0) ;
data_out : out std_logic_vector(7 downto 0)
) ;
end component ;
------------------------------------------------------------------------------------------
begin
data_int <= conv_integer ( signed(data_romsig) ) ;
data_qnt <= conv_std_logic_vector (data_qntsig,8) ;
U1 : rom port map( pclk,start_in,st_romsig,data_romsig);
U2 : qnt port map(
pclk,st_romsig,data_int,q_sel,y_sel,data_qntsig,st_qntsig);
U3 : zz port map( pclk,st_qntsig,st_zzs,data_qnt,data_zzs);
---------- output ports to tap the signals -----------------
u1_rom_data <= data_romsig ;
u1_start_out <= st_romsig ;
u2_st_qntsig <= st_qntsig ;
u2_data_qntsig <= data_qntsig ;
zz_out <= data_zzs ;
end a ;