R
Rama
Guest
I have a question for the synthesis experts out there. I am a novice in
this area and am more of a functional verification person.
However, here is a piece pf VHDL code - that i have and works fine in
the simulation world.
However, when I program this same code onto thr FPGA - Xilinix ISE - I
don't see what I should be seeing ( was expecting the clock to turn off
)
The point of this piece of code was --
at time 0 --- have a default setup
wait for certain clock cycles -- reset the PLL
wait for some more clock cycles -- Reset the DSP
wait for some more clock cycles -- Then Shut the CLOCK off - the DSP
clock here.
I tried doing the above -- in the code below.
This works in the simulation -- I do see the expected result i.e
I want to see the FPGA_MIZER_CLK - shut down after certain clock cycles
and after the DSP is reset. So i tried doing the sequence I need to
like this..
The question is ----- Is this synthesizable ?
What are the pitfalls ?
(if you see I also have a counter and it is just counting
continuously....)
I would like suggestions if there's different ways of doing the same
here.
Thanks,
RC
=============================
I/O's declaration...
FPGA_PLL_RESETN : out std_logic;
FPGA_PLL_SCLK : out std_logic;
FPGA_PLL_SCLK_SEL : out std_logic;
FPGA_MIZER_CLK : out std_logic;
FPGA_PLL_SIN : out std_logic;
FPGA_PLL_SEN : out std_logic;
FPGA_PLL_LD : out std_logic;
FPGA_TRSTN : out std_logic;
FPGA_SCAN_EN : out std_logic;
FPGA_DSP_N : out std_logic;
......
......CLK26MHZ : in std_logic;
architecture behavioral ...
begin
signal MISER_PLL_RESETN : std_logic := '0' ;
signal MIZER_CLK : std_logic := '0' ;
signal MISER_DSP_N : std_logic := '0';
signal MISER_CLKOFF : std_logic :='0';
signal COUNT1 : integer :=0;
....
....
...
miser_control : process ( CLK26MHZ )
begin
MIZER_CLK <= CLK26MHZ;
if rising_edge ( CLK26MHZ ) then
COUNT1 <= COUNT1 + 1 ; --- internal counter counting clk cycles
end if;
end process;
process ( COUNT1 )
begin
if ( COUNT1 >= 50 ) THEN -- e_pll_resetn - goes high after 50 clk
cycles
MISER_PLL_RESETN<='1';
end if;
if ( COUNT1 >= 100 ) THEN
MISER_PLL_RESETN <='0';
end if;
if ( COUNT1 >= 150 ) THEN
MISER_DSP_N <= '1';
end if;
end process;
process ( MISER_DSP_N, COUNT1)
begin
-- enabling Clock Off
if ( MISER_DSP_N = '1' ) THEN
if ( COUNT1 >= 200 ) THEN
MISER_CLKOFF <= '1';
end if;
if ( COUNT1 <= 250 ) THEN
MISER_CLKOFF <= '0';
end if;
end if;
end process;
FPGA_MIZER_CLK <= MIZER_CLK when ( MISER_CLKOFF = '0' ) else
'0' when ( MISER_CLKOFF = '1' ) else
'0';
FPGA_PLL_RESETN<= MISER_PLL_RESETN ;
FPGA_DSP_N <= MISER_DSP_N ;
end behavioral;
this area and am more of a functional verification person.
However, here is a piece pf VHDL code - that i have and works fine in
the simulation world.
However, when I program this same code onto thr FPGA - Xilinix ISE - I
don't see what I should be seeing ( was expecting the clock to turn off
)
The point of this piece of code was --
at time 0 --- have a default setup
wait for certain clock cycles -- reset the PLL
wait for some more clock cycles -- Reset the DSP
wait for some more clock cycles -- Then Shut the CLOCK off - the DSP
clock here.
I tried doing the above -- in the code below.
This works in the simulation -- I do see the expected result i.e
I want to see the FPGA_MIZER_CLK - shut down after certain clock cycles
and after the DSP is reset. So i tried doing the sequence I need to
like this..
The question is ----- Is this synthesizable ?
What are the pitfalls ?
(if you see I also have a counter and it is just counting
continuously....)
I would like suggestions if there's different ways of doing the same
here.
Thanks,
RC
=============================
I/O's declaration...
FPGA_PLL_RESETN : out std_logic;
FPGA_PLL_SCLK : out std_logic;
FPGA_PLL_SCLK_SEL : out std_logic;
FPGA_MIZER_CLK : out std_logic;
FPGA_PLL_SIN : out std_logic;
FPGA_PLL_SEN : out std_logic;
FPGA_PLL_LD : out std_logic;
FPGA_TRSTN : out std_logic;
FPGA_SCAN_EN : out std_logic;
FPGA_DSP_N : out std_logic;
......
......CLK26MHZ : in std_logic;
architecture behavioral ...
begin
signal MISER_PLL_RESETN : std_logic := '0' ;
signal MIZER_CLK : std_logic := '0' ;
signal MISER_DSP_N : std_logic := '0';
signal MISER_CLKOFF : std_logic :='0';
signal COUNT1 : integer :=0;
....
....
...
miser_control : process ( CLK26MHZ )
begin
MIZER_CLK <= CLK26MHZ;
if rising_edge ( CLK26MHZ ) then
COUNT1 <= COUNT1 + 1 ; --- internal counter counting clk cycles
end if;
end process;
process ( COUNT1 )
begin
if ( COUNT1 >= 50 ) THEN -- e_pll_resetn - goes high after 50 clk
cycles
MISER_PLL_RESETN<='1';
end if;
if ( COUNT1 >= 100 ) THEN
MISER_PLL_RESETN <='0';
end if;
if ( COUNT1 >= 150 ) THEN
MISER_DSP_N <= '1';
end if;
end process;
process ( MISER_DSP_N, COUNT1)
begin
-- enabling Clock Off
if ( MISER_DSP_N = '1' ) THEN
if ( COUNT1 >= 200 ) THEN
MISER_CLKOFF <= '1';
end if;
if ( COUNT1 <= 250 ) THEN
MISER_CLKOFF <= '0';
end if;
end if;
end process;
FPGA_MIZER_CLK <= MIZER_CLK when ( MISER_CLKOFF = '0' ) else
'0' when ( MISER_CLKOFF = '1' ) else
'0';
FPGA_PLL_RESETN<= MISER_PLL_RESETN ;
FPGA_DSP_N <= MISER_DSP_N ;
end behavioral;