Цитата(Postoroniy_V @ Sep 7 2005, 05:40)
что думаю у вас и есть, тоесть думаю что у вас не задан FALSE PATH
может в этом дело?
да и потот дался вам этот system clock? где пробелма то?

фалш путь это немного из другой оперы
зачем надо, глаза мозолит

и интересно где там есть третий клок
вот код того модуля
Цитата
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use IEEE.std_logic_arith.all;
library unisim;
library synplify;
use synplify.attributes.all;
entity usb_ctrl_dev is
generic (WIDTH : integer := 16; EPOUT : string := "EP2"; EPIN : string := "EP6");
port
(
in_reset_b : in std_logic;
--- usb interface
USB_IFCLK : in std_logic;
USB_RST_N : out std_logic;
USB_FD : inout std_logic_vector(WIDTH-1 downto 0);
USB_SLRD : out std_logic;
USB_SLWR : out std_logic;
USB_SLOE : out std_logic;
USB_FA0 : out std_logic;
USB_FA1 : out std_logic;
USB_PEND : out std_logic;
USB_SLCS_N : out std_logic;
USB_FLAGA : in std_logic;
USB_FLAGB : in std_logic;
USB_FLAGC : in std_logic;
--- ind interface
LED : out std_logic;
-- system interface --------------------------------
in_fifo_clock : in std_logic;
in_fifo_pend : in std_logic; -- äîëæåí ïîäàâàòüñÿ îäíîâðåìåííî ñ ñèãíàëîì in_fifo_wr_req
in_fifo_wr_req : in std_logic;
in_fifo_wr_data : in std_logic_vector(WIDTH-1 downto 0);
out_fifo_wr_full : out std_logic;
out_fifo_wr_empty : out std_logic;
in_fifo_rd_req : in std_logic;
out_fifo_rd_data : out std_logic_vector(WIDTH-1 downto 0);
out_fifo_rd_empty : out std_logic
);
end entity usb_ctrl_dev;
architecture usb_ctrl_dev of usb_ctrl_dev is
component fifo16
generic(
ALMOST_FULL_OFFSET : BIT_VECTOR := X"080";
ALMOST_EMPTY_OFFSET : BIT_VECTOR := X"080";
DATA_WIDTH : INTEGER := 36;
FIRST_WORD_FALL_THROUGH : BOOLEAN := false);
port(
ALMOSTEMPTY : out std_ulogic;
ALMOSTFULL : out std_ulogic;
DO : out std_logic_vector(31 downto 0);
DOP : out std_logic_vector(3 downto 0);
EMPTY : out std_ulogic;
FULL : out std_ulogic;
RDCOUNT : out std_logic_vector(11 downto 0);
RDERR : out std_ulogic;
WRCOUNT : out std_logic_vector(11 downto 0);
WRERR : out std_ulogic;
DI : in std_logic_vector(31 downto 0);
DIP : in std_logic_vector(3 downto 0);
RDCLK : in std_ulogic;
RDEN : in std_ulogic;
RST : in std_ulogic;
WRCLK : in std_ulogic;
WREN : in std_ulogic);
end component;
-- synthesis translate_off
for all: fifo16 use entity unisim.fifo16(fifo16_v);
-- synthesis translate_on
-------------------------------------------------------------------------------------------------------------------------------------
signal fifo_reset : std_logic;
signal wr_fifo_wr_clk : std_logic;
signal wr_fifo_wr_req : std_logic;
signal wr_fifo_wr_data : std_logic_vector(31 downto 0);
signal wr_fifo_wr_almos_full : std_logic;
signal wr_fifo_wr_pend_data : std_logic_vector(3 downto 0);
signal wr_fifo_rd_clk : std_logic;
signal wr_fifo_rd_req : std_logic;
signal wr_fifo_rd_data : std_logic_vector(31 downto 0);
signal wr_fifo_rd_err : std_logic;
signal wr_fifo_rd_empty : std_logic;
signal wr_fifo_rd_almos_empty : std_logic;
signal wr_fifo_rd_pend_data : std_logic_vector(3 downto 0);
-------------------------------------------------------------------------------------------------------------------------------------
signal rd_fifo_wr_clk : std_logic;
signal rd_fifo_wr_req : std_logic;
signal rd_fifo_wr_data : std_logic_vector(31 downto 0);
signal rd_fifo_wr_almos_full : std_logic;
signal rd_fifo_rd_clk : std_logic;
signal rd_fifo_rd_req : std_logic;
signal rd_fifo_rd_data : std_logic_vector(31 downto 0);
signal rd_fifo_rd_err : std_logic;
signal rd_fifo_rd_empty : std_logic;
signal rd_fifo_rd_almos_empty : std_logic;
--- usb signal ------------------------------------------------------------------------------------------------------------------
signal usb_clk : std_logic;
signal usb_sloe_int : std_logic;
signal usb_slcs_int : std_logic;
signal usb_pend_int : std_logic;
signal usb_slrd_int : std_logic;
signal usb_slwr_int : std_logic;
signal usb_rd_data : std_logic_vector(WIDTH-1 downto 0);
signal usb_wr_data : std_logic_vector(WIDTH-1 downto 0);
signal usb_rd_fifo_empty : std_logic;
signal usb_wr_fifo_full : std_logic;
signal usb_pend_need : std_logic;
-- FSM ---------------------------------------------------------
type t_state is (idle, set_rd_addr, set_rd_ctrl_signal, select_rd_ctrl, set_wr_addr, set_wr_ctrl_signal, select_wr_ctrl, set_pend_ctrl_signal);
signal state : t_state;
attribute SYN_ENCODING of state : signal is "onehot";
signal wr_ena : std_logic;
signal rd_ena : std_logic;
signal blinc : std_logic;
signal blinc_counter : std_logic_vector(20 downto 0);
begin
USB_RST_N <= '1';
USB_FD <= usb_wr_data when (usb_sloe_int = '0') else (others => 'Z');
usb_rd_data <= USB_FD;
USB_SLOE <= not usb_sloe_int;
USB_SLCS_N <= not usb_slcs_int;
USB_PEND <= not usb_pend_int;
USB_SLRD <= not usb_slrd_int;
USB_SLWR <= not usb_slwr_int;
usb_rd_fifo_empty <= not USB_FLAGA;
usb_wr_fifo_full <= not USB_FLAGC;
usb_clk <= USB_IFCLK;
fifo_reset <= not in_reset_b;
LED <= blinc;
--------- blinc --------------------------------------------------------------------------------------------------------------------------
process(usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
blinc_counter <= (others => '0');
blinc <= '0';
elsif (rising_edge(usb_clk)) then
blinc_counter <= blinc_counter + '1';
if (blinc_counter = conv_std_logic_vector(1250000, blinc_counter'length)) then
blinc <= not blinc;
end if;
end if;
end process;
---------------------------------------------------------------------------------------------------------------
-- write up level, read low level
wr_fifo : fifo16
generic map(
ALMOST_FULL_OFFSET => X"004", -- it's maximal
ALMOST_EMPTY_OFFSET => X"006", -- it's minimal
DATA_WIDTH => 18, -- + 1 for pend signal
FIRST_WORD_FALL_THROUGH => false)
port map(
ALMOSTEMPTY => wr_fifo_rd_almos_empty,
ALMOSTFULL => wr_fifo_wr_almos_full,
DO => wr_fifo_rd_data,
DOP => wr_fifo_rd_pend_data,
EMPTY => wr_fifo_rd_empty,
FULL => open,
RDCOUNT => open,
RDERR => wr_fifo_rd_err,
WRCOUNT => open,
WRERR => open,
DI => wr_fifo_wr_data,
DIP => wr_fifo_wr_pend_data,
RDCLK => wr_fifo_rd_clk,
RDEN => wr_fifo_rd_req,
RST => fifo_reset,
WRCLK => wr_fifo_wr_clk,
WREN => wr_fifo_wr_req
);
------------------------------------------------------------------------
-- read up level, write low level
rd_fifo : fifo16
generic map(
ALMOST_FULL_OFFSET => X"004", -- it's maximal
ALMOST_EMPTY_OFFSET => X"006", -- it's minimal
DATA_WIDTH => 18,
FIRST_WORD_FALL_THROUGH => false)
port map(
ALMOSTEMPTY => rd_fifo_rd_almos_empty,
ALMOSTFULL => rd_fifo_wr_almos_full,
DO => rd_fifo_rd_data,
DOP => open,
EMPTY => rd_fifo_rd_empty,
FULL => open,
RDCOUNT => open,
RDERR => rd_fifo_rd_err,
WRCOUNT => open,
WRERR => open,
DI => rd_fifo_wr_data,
DIP => (others => '0'),
RDCLK => rd_fifo_rd_clk,
RDEN => rd_fifo_rd_req,
RST => fifo_reset,
WRCLK => rd_fifo_wr_clk,
WREN => rd_fifo_wr_req
);
----- to up fifo interface -----------------------------------------------------------------------------------------------------
wr_fifo_wr_clk <= in_fifo_clock;
wr_fifo_wr_req <= in_fifo_wr_req;
out_fifo_wr_full <= wr_fifo_wr_almos_full;
out_fifo_wr_empty <= wr_fifo_rd_empty;
wr_fifo_wr_data(in_fifo_wr_data'range) <= in_fifo_wr_data;
wr_fifo_wr_data(31 downto in_fifo_wr_data'length) <= (others => '0');
wr_fifo_wr_pend_data(0) <= in_fifo_pend;
wr_fifo_wr_pend_data(3 downto 1) <= (others => '0');
rd_fifo_rd_clk <= in_fifo_clock;
rd_fifo_rd_req <= in_fifo_rd_req;
out_fifo_rd_data <= rd_fifo_rd_data(out_fifo_rd_data'range);
out_fifo_rd_empty <= rd_fifo_rd_empty;
----- to low fifo interface -----------------------------------------------------------------------------------------------------
wr_fifo_rd_clk <= usb_clk;
usb_pend_need <= wr_fifo_rd_pend_data(0);
rd_fifo_wr_clk <= usb_clk;
---------------------------------------------------------------------------------------------------------------------------------
wr_ena <= '1' when (wr_fifo_rd_empty /= '1')and(usb_wr_fifo_full /= '1') else '0';
rd_ena <= '1' when (usb_rd_fifo_empty /= '1')and(rd_fifo_wr_almos_full /= '1') else '0';
-- äâóõ òàêòíàÿ ìàøèíà ñîñòîÿíèé
fsm_jump_proc :
process (usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
state <= idle;
elsif (rising_edge(usb_clk)) then
state <= idle;
case (state) is
when idle =>
-- åñëè åñòü äàííûå íà çàïèñü è óñá ãîòîâ äàííûå ïðèíÿòü òî
if (wr_ena = '1') then
state <= set_wr_addr;
-- åñëè óñá ãîòîâ îòäàòü äàííûå è áóôåð íå çàïîëíåí òî
elsif (rd_ena = '1') then
state <= set_rd_addr;
end if;
when set_rd_addr => state <= set_rd_ctrl_signal; -- ñòàâèì àäðåññ
when set_rd_ctrl_signal => state <= select_rd_ctrl; -- ÷èòàåì ñ óñá
when select_rd_ctrl => -- ðàçáèðàåìñÿ ÷òî ýòî áûëî, ïèøåì â ôèôî
if (rd_ena = '1') then state <= set_rd_ctrl_signal;
end if;
when set_wr_addr => state <= select_wr_ctrl; -- ñòàâèì àäðåññ è ÷èòàåì ÷òî áûëî â ôèôî
when select_wr_ctrl => -- ðàçáèðàåìñÿ ÷òî æå ïðî÷èòàëè èç ôèôî
if (usb_pend_need = '1') then state <= set_pend_ctrl_signal;
elsif (wr_ena = '1') then state <= set_wr_ctrl_signal;
end if;
when set_wr_ctrl_signal => state <= select_wr_ctrl; -- ïèøåì â óñá äàííûå, åñëè åñòü ÷òî ÷èòàåì èç ôèôî
when set_pend_ctrl_signal => state <= idle; -- ïèøåì â óñá ïåíäû
when others => null;
end case;
end if;
end process fsm_jump_proc;
--------------- usb fifo addr -------------------------------------------------------------------
fifo_addr0 :
if (EPOUT = "EP4")and(EPIN = "EP8") generate
process (usb_clk) is
begin
if (rising_edge(usb_clk)) then
if (state = set_rd_addr) then
-- read addr EP4
USB_FA0 <= '1';
USB_FA1 <= '0';
elsif (state = set_wr_addr) then
-- write addr EP8
USB_FA0 <= '1';
USB_FA1 <= '1';
end if;
end if;
end process;
end generate fifo_addr0;
fifo_addr1 :
if (EPOUT = "EP2")and(EPIN = "EP6") generate
process (usb_clk) is
begin
if (rising_edge(usb_clk)) then
if (state = set_rd_addr) then
-- read addr EP2
USB_FA0 <= '0';
USB_FA1 <= '0';
elsif (state = set_wr_addr) then
-- write addr EP6
USB_FA0 <= '0';
USB_FA1 <= '1';
end if;
end if;
end process;
end generate fifo_addr1;
------------ usb cs -----------------------------------------------------------------------------------
-- sc_cs îì ðóëÿò 3 ïðîöåññà
cs_proc :
process (usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
usb_slcs_int <= '0';
elsif (rising_edge(usb_clk)) then
usb_slcs_int <= '0';
if (state = set_rd_ctrl_signal)or(state = set_wr_ctrl_signal)or(state = set_pend_ctrl_signal) then
usb_slcs_int <= '1';
end if;
end if;
end process cs_proc;
---------------------- usb read process ------------------------------------------------------
---------------------- usb read ctrl ------------------------------------------------------
rd_ctrl_proc :
process (usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
usb_sloe_int <= '0';
usb_slrd_int <= '0';
elsif (rising_edge(usb_clk)) then
usb_sloe_int <= '0';
usb_slrd_int <= '0';
if (state = set_rd_ctrl_signal) then
usb_sloe_int <= '1';
usb_slrd_int <= '1';
end if;
end if;
end process rd_ctrl_proc;
---------------------- usb capture process ------------------------------------------------------
rd_fifo_wr_data(31 downto usb_rd_data'length) <= (others => '0');
capture_data_proc :
process (usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
rd_fifo_wr_data(usb_rd_data'range) <= (others => '0');
rd_fifo_wr_req <= '0';
elsif (rising_edge(usb_clk)) then
rd_fifo_wr_req <= '0';
if (usb_slrd_int = '1') then rd_fifo_wr_req <= '1';
end if;
if (usb_slrd_int = '1') then rd_fifo_wr_data(usb_rd_data'range) <= usb_rd_data;
end if;
end if;
end process capture_data_proc;
--------------- write process ----------------------------------------------------------------
---------- wr_fifo rd ctrl --------------------------------------------------------------------
wr_fifo_rd_req <= '1' when (state = set_wr_addr)or((state = set_wr_ctrl_signal)and(wr_ena = '1')) else '0';
---------- usb wr ctrl --------------------------------------------------------------------
wr_ctrl_proc :
process(usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
usb_slwr_int <= '0';
usb_wr_data <= (others => '0');
elsif (rising_edge(usb_clk)) then
if (state = set_wr_ctrl_signal) then usb_wr_data <= wr_fifo_rd_data(usb_wr_data'range);
end if;
usb_slwr_int <= '0';
if (state = set_wr_ctrl_signal) then usb_slwr_int <= '1';
end if;
end if;
end process wr_ctrl_proc;
--------------- pend process --------------------------------------------------------
pend_proc :
process (usb_clk, in_reset_b) is
begin
if (in_reset_b = '0') then
usb_pend_int <= '0';
elsif (rising_edge(usb_clk))then
usb_pend_int <= '0';
if (state = set_pend_ctrl_signal) then usb_pend_int <= '1';
end if;
end if;
end process pend_proc;
end architecture usb_ctrl_dev;
вот файл констрейнов
Цитата
................................
define_clock -name {p:USB_IFCLK} -freq 50.000 -clockgroup default_clkgroup_0
define_clock -name {p:in_fifo_clock} -freq 200.000 -clockgroup default_clkgroup_1
................................
А вот отчет симплифая о клоках
Цитата
......................
Starting Clock Frequency Frequency Period Period Slack Type Group
----------------------------------------------------------------------------------------------------------------------
USB_IFCLK 50.0 MHz 167.9 MHz 20.000 5.956 14.044 declared default_clkgroup_0
in_fifo_clock 200.0 MHz NA 5.000 NA NA declared default_clkgroup_1
System 1.0 MHz 265.2 MHz 1000.000 3.771 996.229 system default_clkgroup
================================================================================
======================================
.......................
====================================
Detailed Report for Clock: System
====================================
Starting Points with Worst Slack
********************************
Starting Arrival
Instance Reference Type Pin Net Time Slack
Clock
------------------------------------------------------------------------------------------
wr_fifo System FIFO16 EMPTY out_fifo_wr_empty_c 0.764 16.601
wr_fifo System FIFO16 EMPTY out_fifo_wr_empty_c 0.764 16.601
================================================================================
==========
Ending Points with Worst Slack
******************************
Starting Required
Instance Reference Type Pin Net Time Slack
Clock
--------------------------------------------------------------------------------------------
state[7] System FDP D N_88_i 19.930 16.601
state[2] System FDC D state_1_sqmuxa_2 19.930 17.494
state[3] System FDC D state_0_sqmuxa 19.930 18.321
state[6] System FDC D state_1_sqmuxa 19.930 18.321
wr_fifo System FIFO16 RDEN un3_wr_fifo_rd_req_i 999.236 996.229
wr_fifo System FIFO16 RDEN un3_wr_fifo_rd_req_i 999.236 996.229
================================================================================
============
......................
симплифай находит клок где то внутрях самого FIFO16, но вот где ?
я бы понял если бы он нашел перекос клоков, т.к. внутри ФИФО присходит переход их одного клок домена в другой, по симплифай твердит именно про клок