![]() ![]() This is ok for some applications, and not for others, it just depends what you need the clock for. The generated clock is zero during reset. ![]() If prescaler = X"BEBC20" then - 12 500 000 in hex Signal prescaler : unsigned(23 downto 0) Įlsif rising_edge(clk_50Mhz) then - rising clock edge ![]() arithmetic functions with Signed or Unsigned valuesĪrchitecture Behavioral of scale_clock is Uncomment the following library declaration if using Here's what it looks like in VHDL: library IEEE Since we want half a clock period, that's 25000000/2 = 12500000 for each half-cycle. For example, for your case, the number of fast clock pulses that make up one clock period of a slow clock cycle is 50000000/2 = 25000000. The second way is to use a counter to count the number of faster clock pulses until half of your slower clock period has passed. The tools will also handle any timing constraints (not really applicable in this case, since it's a 2Hz clock) One of the advantages of this is that the Xlinx tools will recognise the clock as such and route it through the required pathways. The first is to use the Xilinx native clock synthesizer core. Basically, there are two ways of doing this.
0 Comments
Leave a Reply. |