V
vu
Guest
Hello,
I've just very recently started VHDL coding, and still unfamiliar with
the proper style of the language.
I am trying to create a serial interface that receives a serial clock
(seperate from system clock), and inverts this clock to make a transmit
clock. What would be the best method to do this? I would appreciate a
snippet of code if possible.
Thank you for your help. So far I have this:
========
-
-
-- into module
ser_clkr <= ser_clkr_i;
ser_clkr_q <= ser_clkr; -- previous val of clkr
--new serial clock to be generated from input of CLKR.
new_clk_gen: process(ser_clkr, ser_clkr_q)
begin
if (ser_clkr_q = '0' and ser_clkr_q = '1') then
ser_clkx <= not ser_clkx;
else
ser_clkx <= ser_clkx;
end process;
I've just very recently started VHDL coding, and still unfamiliar with
the proper style of the language.
I am trying to create a serial interface that receives a serial clock
(seperate from system clock), and inverts this clock to make a transmit
clock. What would be the best method to do this? I would appreciate a
snippet of code if possible.
Thank you for your help. So far I have this:
========
-
-
-- into module
ser_clkr <= ser_clkr_i;
ser_clkr_q <= ser_clkr; -- previous val of clkr
--new serial clock to be generated from input of CLKR.
new_clk_gen: process(ser_clkr, ser_clkr_q)
begin
if (ser_clkr_q = '0' and ser_clkr_q = '1') then
ser_clkx <= not ser_clkx;
else
ser_clkx <= ser_clkx;
end process;