From 7bac1cd3ef69e4e2076a79c32d9549fb66436b02 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 25 Mar 2019 23:41:22 +0800 Subject: [PATCH] minor cleanup --- examples/helloworld.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/helloworld.py b/examples/helloworld.py index 75ac1fc..4d21506 100644 --- a/examples/helloworld.py +++ b/examples/helloworld.py @@ -5,8 +5,7 @@ from heavycomps import uart class Top: - def __init__(self, clk_freq=156e6, baudrate=115200): - self.clk_freq = clk_freq + def __init__(self, baudrate=115200): self.baudrate = baudrate self.clk156_p = Signal() self.clk156_n = Signal() @@ -25,7 +24,7 @@ class Top: init=[ord(c) for c in string]) m.submodules.rdport = rdport = mem.read_port(synchronous=False) - tx = uart.RS232TX(round(2**32*self.baudrate/self.clk_freq)) + tx = uart.RS232TX(round(2**32*self.baudrate/156e6)) m.submodules.tx = tx m.d.comb += [ tx.stb.eq(1),