Remove restriction to 12 MHz clock. Try to use default clock frequency of board.
This commit is contained in:
@@ -18,12 +18,15 @@ class SOC(Elaboratable):
|
|||||||
|
|
||||||
def elaborate(self, platform):
|
def elaborate(self, platform):
|
||||||
|
|
||||||
|
clk_frequency = int(platform.default_clk_constraint.frequency)
|
||||||
|
print("clock frequency = {}".format(clk_frequency))
|
||||||
|
|
||||||
m = Module()
|
m = Module()
|
||||||
cw = Clockworks()
|
cw = Clockworks()
|
||||||
memory = DomainRenamer("slow")(Mem())
|
memory = DomainRenamer("slow")(Mem())
|
||||||
cpu = DomainRenamer("slow")(CPU())
|
cpu = DomainRenamer("slow")(CPU())
|
||||||
uart_tx = DomainRenamer("slow")(
|
uart_tx = DomainRenamer("slow")(
|
||||||
UartTx(freq_hz=12*1000000, baud_rate=1000000))
|
UartTx(freq_hz=clk_frequency, baud_rate=1000000))
|
||||||
|
|
||||||
m.submodules.cw = cw
|
m.submodules.cw = cw
|
||||||
m.submodules.cpu = cpu
|
m.submodules.cpu = cpu
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ class SOC(Elaboratable):
|
|||||||
|
|
||||||
def elaborate(self, platform):
|
def elaborate(self, platform):
|
||||||
|
|
||||||
|
clk_frequency = int(platform.default_clk_constraint.frequency)
|
||||||
|
print("clock frequency = {}".format(clk_frequency))
|
||||||
|
|
||||||
m = Module()
|
m = Module()
|
||||||
cw = Clockworks()
|
cw = Clockworks()
|
||||||
memory = DomainRenamer("slow")(Mem())
|
memory = DomainRenamer("slow")(Mem())
|
||||||
cpu = DomainRenamer("slow")(CPU())
|
cpu = DomainRenamer("slow")(CPU())
|
||||||
uart_tx = DomainRenamer("slow")(
|
uart_tx = DomainRenamer("slow")(
|
||||||
UartTx(freq_hz=12*1000000, baud_rate=1000000))
|
UartTx(freq_hz=clk_frequency, baud_rate=1000000))
|
||||||
|
|
||||||
m.submodules.cw = cw
|
m.submodules.cw = cw
|
||||||
m.submodules.cpu = cpu
|
m.submodules.cpu = cpu
|
||||||
|
|||||||
Reference in New Issue
Block a user