cfelton / rhea

A collection of MyHDL cores and tools for complex digital circuit design
MIT License
84 stars 33 forks source link

It would be nice if clocks could generate architecture specific clock tiles as needed. #43

Closed NickShaffner closed 7 years ago

NickShaffner commented 7 years ago

It would be nice if Rhea's clocks could generate architecture specific clock tiles as needed.

For example, given a hardware_clock specified in a board definition file with a frequency of 12mhz, I want to create a derived_clock of 48mhz (and have rhea automatically set up the clock tile for me)

derived_clock = hardware_clock.create_derived_clock(frequency=48e6)

During vhdl / verilog conversion:

Implementation wise, I imagine there would need to be FPGA part specification classes, much like the board files have. I imagine these FPGA classes would contain their various clock resources and contain code to set up the multipliers and dividers and emit the code. I can also imagine the possibility for these FPGA specifications being used in the future for specifying other implementation specific hardware (serdes, clock buffers, etc)

Thoughts?

NickShaffner commented 7 years ago

Wait, I seem to have found this already exists in some form in device_clock_mgmt.py.

will give that a try.