Advertisement
dave_be

Untitled

Feb 23rd, 2022
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1.  
  2.  
  3. PLL = get_pll(platform)
  4. self.freq = get_clock_freq(platform)
  5. self.pll = PLL(self.freq, 48e6)
  6.  
  7. def elaborate(self, platform):
  8. m = Module()
  9.  
  10. # Connect the PLL to generate 48MHz for the "sync" domain
  11.  
  12. m.submodules += self.pll
  13.  
  14. clk_i = platform.request(platform.default_clk).i
  15. cd = ClockDomain("sync")
  16.  
  17. m.domains += cd
  18.  
  19. m.d.comb += [
  20. self.pll.clkin.eq(clk_i),
  21. ClockSignal("sync").eq(self.pll.clkout[0]),
  22. ]
  23. # ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement