Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

How to write the 125 Mhz frequancy in a testbench vhdl language

$
0
0
Hi,
I'm beginner in VHDL,
I have to devide the frequency from 125 Mhz to 1 Hz
for that I used this code to generate the 1s clock
--- generate the 1s clock ---
process(clk,rst)
begin
if rst='1' then
cnt<=1;
else
cnt<=cnt+1;
end if;
if cnt<=62000000 then
clk_s<='0';
else
clk_s<='1';
end if;
if cnt=125000000 then
cnt<=1;
end if;
end process;
--------------------------------------------------------
the probleme is what's the value of clock (clk) I should define in testbensh ( is it 8ns ??)
help me please! thank you.
Abdallah.

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>