physdesignrules:372 - gated clock. clock net
echo47 said:
where does clk_recov come from? where does clk_recov_op go?).
Sorry for not displaying my code,it's hell lengthy and thought it might confuse the readers....And for the issue of clk_recov,I decode the data which is in manchester coding in the input stream!....I use the rising_edge time of the data stream to recover the transmitter clock inorder for sampling the data in synchronous to transmitter....Here the clk_Recov is the one which I have recovered....The received clk is inverted using NOT to clk_recov_inv...and it's passed to another output register "clk_recov_op"for viewing the recovered clk in the scope....
I'll give the part where I have used this clk_recov..So please help me by denoting if ther is any inefficient coding resulting in warnings..Thanks!,here is my little explanation
Mnchr_Rx is the coded data that is input from MODEM section of srd.This data is at 4MHz. and Rx is the decoded tranmitter data.This data is at 2MHz.I use to capture both the rising and falling edge of the input data to recover my clk.So I Xor the inpout data and it's inverted data...So I get train of impulses for both edges...Here I use the counter with the value of the transmitter clk width to exactly recover the clk...One thing I have added is some bit-delay which is unavoidable...Just check out if that's making this issue!...If anything you could identify,notify me!....Thanks
-------------------------------------
-- CODING PROCESS
-------------------------------------
PROCESS(clk,clk_data,CLK_RECOV,CLK_RECOV_inv,Tx,Mnchr_Rx)
VARIABLE FLAG_SHOT : STD_LOGIC:='0';
VARIABLE SHOT : INTEGER :=0;
BEGIN
-----------------------------
-- MANCHESTER DECODING
-----------------------------
IF RISING_EDGE(clk_RECOV_inv) THEN
Rx <= Mnchr_Rx;
END IF;
--------------------------------
---- CLK RECOVERY
--------------------------------
IF RISING_EDGE(clk) THEN
---------------------------
-- 13-Bit FF Delay
---------------------------
A <= Mnchr_Rx;
B <= A;
C <= B;
D <= C;
E <= D;
F <= E;
G <= F;
H <= G;
P <= H;
X <= P;
Y <= X;
Z <= Y;
Mnchr_Rx_DELAY <= Z;
---------------------------
-- 7-Bit FF Delay
---------------------------
A1 <= CLK_RECOV_PRE;
B1 <= A1;
C1 <= B1;
D1 <= C1;
E1 <= D1;
F1 <= E1;
CLK_RECOV <= F1;
-----------------------------------------
-- XORing for unishot pulse
----------------------------------------
MONOSHOT <= Mnchr_Rx_inv XOR Mnchr_Rx;
------------------------------------------
IF(MONOSHOT_inv = '1') THEN
FLAG_SHOT := '1';
END IF;
IF(FLAG_SHOT ='1') THEN
SHOT := SHOT+1;
IF(SHOT < 59) THEN
CLK_RECOV_PRE <= '1';
ELSIF(SHOT> 59) THEN
CLK_RECOV_PRE <= '0';
FLAG_SHOT := '0';
SHOT:=0;
END IF;
END IF;
END IF;