Skip to content

Commit 6fde54c

Browse files
author
Sebastien Bourdeauducq
committedJan 21, 2012
Use meaningful class names
1 parent f6aa95a commit 6fde54c

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed
 

‎milkymist/clkfx/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from migen.fhdl.structure import *
44

5-
class Inst:
5+
class ClkFX:
66
def __init__(self, infreq, outfreq):
77
self.clkin = Signal()
88
self.clkout = Signal()

‎milkymist/lm32/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from migen.fhdl.structure import *
22
from migen.bus import wishbone
33

4-
class Inst:
4+
class LM32:
55
def __init__(self):
66
self.ibus = i = wishbone.Master("lm32i")
77
self.dbus = d = wishbone.Master("lm32d")

‎milkymist/m1reset/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from migen.fhdl.structure import *
22

3-
class Inst:
3+
class M1Reset:
44
def __init__(self):
55
self.trigger_reset = Signal()
66
self.sys_rst = Signal()

‎milkymist/norflash/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
from migen.bus import wishbone
33
from migen.corelogic import timeline
44

5-
class Inst:
5+
class NorFlash:
66
def __init__(self, adr_width, rd_timing):
77
self.bus = wishbone.Slave("norflash")
88
self.adr = Signal(BV(adr_width-1))
99
self.d = Signal(BV(16))
1010
self.oe_n = Signal()
1111
self.we_n = Signal()
1212
self.ce_n = Signal()
13-
self.timeline = timeline.Inst(self.bus.cyc_i & self.bus.stb_i,
13+
self.timeline = timeline.Timeline(self.bus.cyc_i & self.bus.stb_i,
1414
[(0, [self.adr.eq(Cat(0, self.bus.adr_i[:adr_width-2]))]),
1515
(rd_timing, [
1616
self.bus.dat_o[16:].eq(self.d),

‎milkymist/uart/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from migen.bank.description import *
33
from migen.bank import csrgen
44

5-
class Inst:
5+
class UART:
66
def __init__(self, address, clk_freq, baud=115200):
77
self._rxtx = rxtx = Register("rxtx", BV(8))
88
divisor = Register("divisor")

‎top.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ def get():
99
MHz = 1000000
1010
clk_freq = 80*MHz
1111

12-
clkfx_sys = clkfx.Inst(50*MHz, clk_freq)
13-
reset0 = m1reset.Inst()
12+
clkfx_sys = clkfx.ClkFX(50*MHz, clk_freq)
13+
reset0 = m1reset.M1Reset()
1414

15-
cpu0 = lm32.Inst()
16-
norflash0 = norflash.Inst(25, 12)
17-
wishbone2csr0 = wishbone2csr.Inst()
15+
cpu0 = lm32.LM32()
16+
norflash0 = norflash.NorFlash(25, 12)
17+
wishbone2csr0 = wishbone2csr.WB2CSR()
1818
wishbonecon0 = wishbone.InterconnectShared(
1919
[cpu0.ibus, cpu0.dbus],
2020
[(0, norflash0.bus), (3, wishbone2csr0.wishbone)],
2121
register=True,
2222
offset=1)
23-
uart0 = uart.Inst(0, clk_freq, baud=115200)
23+
uart0 = uart.UART(0, clk_freq, baud=115200)
2424
csrcon0 = csr.Interconnect(wishbone2csr0.csr, [uart0.bank.interface])
2525

2626
frag = autofragment.from_local()

0 commit comments

Comments
 (0)
Please sign in to comment.