W
Weng Tianxiang
Guest
My objects:
I want to transfer large group of signals clocked at clock66M to signals
used at clock100M domain safely and reliably and vice verse without using
any FIFO mechanism: to save clocks and improve performances.
I am using the following method:
process(clock66M, nReset66M)
begin
if(nReset66M = '0') then
X, Y, Z <= (others=>'0'); -- signals are to be transferred
flag <= '0' -- 1 bit signal to control
transfer
elsif(clock66M'event and clock66M = '1') then
if(some conditions under clock66M are true) then
X <= ...;
Y <= ...;
Z <= ...;
flag <= '1';
end if;
end if;
end process;
Then flag is used at clock100M domain as follows:
process(clock100M, nReset100M)
begin
if(nReset100M = '0') then
flag100M <= '0';
Any100M <= (others=>'0');
elsif(clock100M'event and clock100M = '1') then
flag100M <= flag;
if(flag100M = '1') then -- (K)
Any100M <= f(X,Y,Z);
end if;
end if;
end process;
A
clock 66M: 1 1 1 1 1 1 1 1
(rising edge)
flag 0 0 0 1 1 1 1 1
X,Y,Z I I I J J J J J
clock100M: 1 1 1 1 1 1 1 1 1 1 1 (rising
edge)
B
flag100M: 0 0 0 0 0 1 1 1 1 1
possibility 1
C
Any100M: N N N N N N M M M M
D E
flag100M: 0 0 0 0 0 0 1 1 1 1
possibility 2
F
Any100M: N N N N N N N M M M
Point A: flag has 1 latched under clock66M and signal group has new value J
latched; Point B: flag100M has 1 latched under clock100M, it may be
metastable, but it always has two possible results: 1 or 0, based on whether
or not the following 'if' statement (K) is implemented at next clock: at
next clock, if 'if' statement (K) is implemented, it is a 1, if not, it is
0. Here B has 1 latched under clock100M; Point C: Any100M has M latched
under clock100M, involving X, Y, Z values latched under clock66M; Point D:
flag100M has 0 latched under clock100M, no action at next clock Point E:
flag100M has 1 latched under clock100M, this time its value is not at
metastable state due to the long time distance from A to E; Point F: Any100M
has a value M latched under clock100M, involving X, Y, Z values latched
under clock66M;
Now let's see if there is a possibility that Any100M is latched with wrong
value. If so, it is disastrous!
X, Y, Z values are used at Point C and F. If we can fit the design so that
signals X, Y and Z can reach Any100M within (10ns - setup time), there is no
problem. If not, it is a problem.
With Xilinx Navigator, I hope to establish a time item in *.ucf and check if
those conditions are met, if so, design is save and reliable.
Any comments are appreciated.
Weng
I want to transfer large group of signals clocked at clock66M to signals
used at clock100M domain safely and reliably and vice verse without using
any FIFO mechanism: to save clocks and improve performances.
I am using the following method:
process(clock66M, nReset66M)
begin
if(nReset66M = '0') then
X, Y, Z <= (others=>'0'); -- signals are to be transferred
flag <= '0' -- 1 bit signal to control
transfer
elsif(clock66M'event and clock66M = '1') then
if(some conditions under clock66M are true) then
X <= ...;
Y <= ...;
Z <= ...;
flag <= '1';
end if;
end if;
end process;
Then flag is used at clock100M domain as follows:
process(clock100M, nReset100M)
begin
if(nReset100M = '0') then
flag100M <= '0';
Any100M <= (others=>'0');
elsif(clock100M'event and clock100M = '1') then
flag100M <= flag;
if(flag100M = '1') then -- (K)
Any100M <= f(X,Y,Z);
end if;
end if;
end process;
A
clock 66M: 1 1 1 1 1 1 1 1
(rising edge)
flag 0 0 0 1 1 1 1 1
X,Y,Z I I I J J J J J
clock100M: 1 1 1 1 1 1 1 1 1 1 1 (rising
edge)
B
flag100M: 0 0 0 0 0 1 1 1 1 1
possibility 1
C
Any100M: N N N N N N M M M M
D E
flag100M: 0 0 0 0 0 0 1 1 1 1
possibility 2
F
Any100M: N N N N N N N M M M
Point A: flag has 1 latched under clock66M and signal group has new value J
latched; Point B: flag100M has 1 latched under clock100M, it may be
metastable, but it always has two possible results: 1 or 0, based on whether
or not the following 'if' statement (K) is implemented at next clock: at
next clock, if 'if' statement (K) is implemented, it is a 1, if not, it is
0. Here B has 1 latched under clock100M; Point C: Any100M has M latched
under clock100M, involving X, Y, Z values latched under clock66M; Point D:
flag100M has 0 latched under clock100M, no action at next clock Point E:
flag100M has 1 latched under clock100M, this time its value is not at
metastable state due to the long time distance from A to E; Point F: Any100M
has a value M latched under clock100M, involving X, Y, Z values latched
under clock66M;
Now let's see if there is a possibility that Any100M is latched with wrong
value. If so, it is disastrous!
X, Y, Z values are used at Point C and F. If we can fit the design so that
signals X, Y and Z can reach Any100M within (10ns - setup time), there is no
problem. If not, it is a problem.
With Xilinx Navigator, I hope to establish a time item in *.ucf and check if
those conditions are met, if so, design is save and reliable.
Any comments are appreciated.
Weng