Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 53ded72

Browse files
enjoy-digitalsbourdeauducq
authored andcommittedOct 17, 2014
remove trailing whitespaces
1 parent 20528c6 commit 53ded72

File tree

22 files changed

+95
-109
lines changed

22 files changed

+95
-109
lines changed
 

‎make.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _get_args():
4242
parser.add_argument("-Op", "--platform-option", default=[], nargs=2, action="append", help="set platform-specific option")
4343
parser.add_argument("-X", "--external", default="", help="use external directory for targets, platforms and imports")
4444
parser.add_argument("--csr_csv", default="csr.csv", help="CSV file to save the CSR map into")
45-
45+
4646
parser.add_argument("-d", "--decorate", default=[], action="append", help="apply simplification decorator to top-level")
4747
parser.add_argument("-Ob", "--build-option", default=[], nargs=2, action="append", help="set build option")
4848
parser.add_argument("-f", "--flash-proxy-dir", default=None, help="set search directory for flash proxy bitstreams")

‎misoclib/dfii/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, phase):
1010
self._baddress = CSRStorage(flen(phase.bank))
1111
self._wrdata = CSRStorage(flen(phase.wrdata))
1212
self._rddata = CSRStatus(flen(phase.rddata))
13-
13+
1414
###
1515

1616
self.comb += [
@@ -39,14 +39,14 @@ def __init__(self, a, ba, d, nphases=1):
3939
inti = dfi.Interface(a, ba, d, nphases)
4040
self.slave = dfi.Interface(a, ba, d, nphases)
4141
self.master = dfi.Interface(a, ba, d, nphases)
42-
42+
4343
self._control = CSRStorage(4) # sel, cke, odt, reset_n
44-
44+
4545
for n, phase in enumerate(inti.phases):
4646
setattr(self.submodules, "pi" + str(n), PhaseInjector(phase))
47-
47+
4848
###
49-
49+
5050
self.comb += If(self._control.storage[0],
5151
self.slave.connect(self.master)
5252
).Else(

‎misoclib/framebuffer/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Framebuffer(Module, AutoCSR):
1111
def __init__(self, pads_vga, pads_dvi, lasmim):
1212
pack_factor = lasmim.dw//bpp
13-
13+
1414
g = DataFlowGraph()
1515

1616
self.fi = FrameInitiator(lasmim.aw, pack_factor)
@@ -23,7 +23,7 @@ def __init__(self, pads_vga, pads_dvi, lasmim):
2323
cast = structuring.Cast(lasmim.dw, pixel_layout(pack_factor), reverse_to=True)
2424
vtg = VTG(pack_factor)
2525
self.driver = Driver(pack_factor, pads_vga, pads_dvi)
26-
26+
2727
g.add_connection(self.fi, vtg, source_subr=self.fi.timing_subr, sink_ep="timing")
2828
g.add_connection(dma_out, cast)
2929
g.add_connection(cast, vtg, sink_ep="pixels")

‎misoclib/framebuffer/dvi.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def __init__(self):
2727
self.comb += q_m8_n.eq((n1d > 4) | ((n1d == 4) & ~d[0]))
2828
for i in range(8):
2929
if i:
30-
curval = curval ^ d[i] ^ q_m8_n
30+
curval = curval ^ d[i] ^ q_m8_n
3131
else:
32-
curval = d[0]
32+
curval = d[0]
3333
self.sync += q_m[i].eq(curval)
3434
self.sync += q_m[8].eq(~q_m8_n)
3535

@@ -199,15 +199,15 @@ def _decode_tmds(b):
199199
if __name__ == "__main__":
200200
from migen.sim.generic import run_simulation
201201
from random import Random
202-
202+
203203
rng = Random(788)
204204
test_list = [rng.randrange(256) for i in range(500)]
205205
tb = _EncoderTB(test_list)
206206
run_simulation(tb)
207207

208208
check = [_decode_tmds(out)[3] for out in tb.outs]
209209
assert(check == test_list)
210-
210+
211211
nb0 = 0
212212
nb1 = 0
213213
for out in tb.outs:

‎misoclib/framebuffer/format.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self, bus_aw, pack_factor, ndmas=1):
4141
("hsync_start", hbits_dyn, 656, h_alignment_bits),
4242
("hsync_end", hbits_dyn, 752, h_alignment_bits),
4343
("hscan", hbits_dyn, 800, h_alignment_bits),
44-
44+
4545
("vres", _vbits, 480),
4646
("vsync_start", _vbits, 492),
4747
("vsync_end", _vbits, 494),
@@ -81,10 +81,10 @@ def __init__(self, pack_factor):
8181
hactive = Signal()
8282
vactive = Signal()
8383
active = Signal()
84-
84+
8585
hcounter = Signal(hbits_dyn)
8686
vcounter = Signal(_vbits)
87-
87+
8888
skip = bpc - bpc_phy
8989
self.comb += [
9090
active.eq(hactive & vactive),
@@ -106,7 +106,7 @@ def __init__(self, pack_factor):
106106
generate_frame_done.eq(0),
107107
If(generate_en,
108108
hcounter.eq(hcounter + 1),
109-
109+
110110
If(hcounter == 0, hactive.eq(1)),
111111
If(hcounter == tr.hres, hactive.eq(0)),
112112
If(hcounter == tr.hsync_start, self.phy.payload.hsync.eq(1)),
@@ -120,7 +120,7 @@ def __init__(self, pack_factor):
120120
vcounter.eq(vcounter + 1)
121121
)
122122
),
123-
123+
124124
If(vcounter == 0, vactive.eq(1)),
125125
If(vcounter == tr.vres, vactive.eq(0)),
126126
If(vcounter == tr.vsync_start, self.phy.payload.vsync.eq(1)),

‎misoclib/framebuffer/phy.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class _FIFO(Module):
1111
def __init__(self, pack_factor):
1212
self.phy = Sink(phy_layout(pack_factor))
1313
self.busy = Signal()
14-
14+
1515
self.pix_hsync = Signal()
1616
self.pix_vsync = Signal()
1717
self.pix_de = Signal()
1818
self.pix_r = Signal(bpc_phy)
1919
self.pix_g = Signal(bpc_phy)
2020
self.pix_b = Signal(bpc_phy)
21-
21+
2222
###
2323

2424
fifo = RenameClockDomains(AsyncFIFO(phy_layout(pack_factor), 512),
@@ -81,7 +81,7 @@ def __init__(self, pads_vga, pads_dvi):
8181
self.specials += Instance("DCM_CLKGEN",
8282
p_CLKFXDV_DIVIDE=2, p_CLKFX_DIVIDE=4, p_CLKFX_MD_MAX=1.0, p_CLKFX_MULTIPLY=2,
8383
p_CLKIN_PERIOD=20.0, p_SPREAD_SPECTRUM="NONE", p_STARTUP_WAIT="FALSE",
84-
84+
8585
i_CLKIN=ClockSignal("base50"), o_CLKFX=clk_pix_unbuffered,
8686
i_PROGCLK=ClockSignal(), i_PROGDATA=pix_progdata, i_PROGEN=pix_progen,
8787
o_PROGDONE=pix_progdone, o_LOCKED=pix_locked,
@@ -145,12 +145,12 @@ def __init__(self, pads_vga, pads_dvi):
145145
p_CLKOUT1_DIVIDE=5, # pix2x
146146
p_CLKOUT2_DIVIDE=10, # pix
147147
p_COMPENSATION="INTERNAL",
148-
148+
149149
i_CLKINSEL=1,
150150
i_CLKIN1=clk_pix_unbuffered,
151151
o_CLKOUT0=pll_clk0, o_CLKOUT1=pll_clk1, o_CLKOUT2=pll_clk2,
152152
o_CLKFBOUT=clkfbout, i_CLKFBIN=clkfbout,
153-
o_LOCKED=pll_locked,
153+
o_LOCKED=pll_locked,
154154
i_RST=~pix_locked | self._r_pll_reset.storage,
155155

156156
i_DADDR=self._r_pll_adr.storage,

‎misoclib/gensoc/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, platform, clk_freq, cpu_reset_address, sram_size=4096, l2_siz
6969

7070
# add CPU Verilog sources
7171
if cpu_type == "lm32":
72-
platform.add_sources(os.path.join("verilog", "lm32", "submodule", "rtl"),
72+
platform.add_sources(os.path.join("verilog", "lm32", "submodule", "rtl"),
7373
"lm32_cpu.v", "lm32_instruction_unit.v", "lm32_decoder.v",
7474
"lm32_load_store_unit.v", "lm32_adder.v", "lm32_addsub.v", "lm32_logic_op.v",
7575
"lm32_shifter.v", "lm32_multiplier.v", "lm32_mc_arithmetic.v",

‎misoclib/identifier/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def __init__(self, sysid, frequency, l2_size, revision=None):
99
self._r_revision = CSRStatus(32)
1010
self._r_frequency = CSRStatus(32)
1111
self._r_l2_size = CSRStatus(8)
12-
12+
1313
###
1414

1515
if revision is None:

‎misoclib/lasmicon/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, phy_settings, geom_settings, timing_settings):
3838
read_latency=phy_settings.read_latency+1,
3939
write_latency=phy_settings.write_latency+1)
4040
self.nrowbits = geom_settings.col_a - address_align
41-
41+
4242
###
4343

4444
self.submodules.refresher = Refresher(geom_settings.mux_a, geom_settings.bank_a,

‎misoclib/lasmicon/bankmachine.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ class _AddressSlicer:
1010
def __init__(self, col_a, address_align):
1111
self.col_a = col_a
1212
self.address_align = address_align
13-
13+
1414
def row(self, address):
1515
split = self.col_a - self.address_align
1616
if isinstance(address, int):
1717
return address >> split
1818
else:
1919
return address[split:]
20-
20+
2121
def col(self, address):
2222
split = self.col_a - self.address_align
2323
if isinstance(address, int):
2424
return (address & (2**split - 1)) << self.address_align
2525
else:
2626
return Cat(Replicate(0, self.address_align), address[:split])
27-
27+
2828
class BankMachine(Module):
2929
def __init__(self, geom_settings, timing_settings, address_align, bankn, req):
3030
self.refresh_req = Signal()
@@ -47,7 +47,7 @@ def __init__(self, geom_settings, timing_settings, address_align, bankn, req):
4747
reqf = self.req_fifo.dout
4848

4949
slicer = _AddressSlicer(geom_settings.col_a, address_align)
50-
50+
5151
# Row tracking
5252
has_openrow = Signal()
5353
openrow = Signal(geom_settings.row_a)
@@ -64,7 +64,7 @@ def __init__(self, geom_settings, timing_settings, address_align, bankn, req):
6464
has_openrow.eq(0)
6565
)
6666
]
67-
67+
6868
# Address generation
6969
s_row_adr = Signal()
7070
self.comb += [
@@ -75,7 +75,7 @@ def __init__(self, geom_settings, timing_settings, address_align, bankn, req):
7575
self.cmd.a.eq(slicer.col(reqf.adr))
7676
)
7777
]
78-
78+
7979
# Respect write-to-precharge specification
8080
precharge_ok = Signal()
8181
t_unsafe_precharge = 2 + timing_settings.tWR - 1
@@ -88,7 +88,7 @@ def __init__(self, geom_settings, timing_settings, address_align, bankn, req):
8888
unsafe_precharge_count.eq(unsafe_precharge_count-1)
8989
)
9090
]
91-
91+
9292
# Control and command generation FSM
9393
fsm = FSM()
9494
self.submodules += fsm

‎misoclib/lasmicon/multiplexer.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def __init__(self, requests):
3030
self.want_cmds = Signal()
3131
# NB: cas_n/ras_n/we_n are 1 when stb is inactive
3232
self.cmd = CommandRequestRW(flen(requests[0].a), flen(requests[0].ba))
33-
33+
3434
###
3535

3636
rr = RoundRobin(len(requests), SP_CE)
3737
self.submodules += rr
38-
38+
3939
self.comb += [rr.request[i].eq(req.stb & ((req.is_cmd & self.want_cmds) | ((req.is_read == self.want_reads) | (req.is_write == self.want_writes))))
4040
for i, req in enumerate(requests)]
41-
41+
4242
stb = Signal()
4343
self.comb += stb.eq(Array(req.stb for req in requests)[rr.grant])
4444
for name in ["a", "ba", "is_read", "is_write", "is_cmd"]:
@@ -51,7 +51,7 @@ def __init__(self, requests):
5151
self.comb += self.cmd.stb.eq(stb \
5252
& ((self.cmd.is_cmd & self.want_cmds) | ((self.cmd.is_read == self.want_reads) \
5353
& (self.cmd.is_write == self.want_writes))))
54-
54+
5555
self.comb += [If(self.cmd.stb & self.cmd.ack & (rr.grant == i), req.ack.eq(1))
5656
for i, req in enumerate(requests)]
5757
self.comb += rr.ce.eq(self.cmd.ack)
@@ -61,9 +61,9 @@ def __init__(self, commands, dfi):
6161
ncmd = len(commands)
6262
nph = len(dfi.phases)
6363
self.sel = [Signal(max=ncmd) for i in range(nph)]
64-
64+
6565
###
66-
66+
6767
def stb_and(cmd, attr):
6868
if not hasattr(cmd, "stb"):
6969
return 0
@@ -91,7 +91,7 @@ def stb_and(cmd, attr):
9191
class Multiplexer(Module, AutoCSR):
9292
def __init__(self, phy_settings, geom_settings, timing_settings, bank_machines, refresher, dfi, lasmic):
9393
assert(phy_settings.nphases == len(dfi.phases))
94-
94+
9595
# Command choosing
9696
requests = [bm.cmd for bm in bank_machines]
9797
choose_cmd = _CommandChooser(requests)
@@ -104,24 +104,24 @@ def __init__(self, phy_settings, geom_settings, timing_settings, bank_machines,
104104
self.comb += [
105105
choose_cmd.want_cmds.eq(1),
106106
choose_req.want_cmds.eq(1)
107-
]
107+
]
108108
self.submodules += choose_cmd, choose_req
109-
109+
110110
# Command steering
111111
nop = CommandRequest(geom_settings.mux_a, geom_settings.bank_a)
112112
commands = [nop, choose_cmd.cmd, choose_req.cmd, refresher.cmd] # nop must be 1st
113113
(STEER_NOP, STEER_CMD, STEER_REQ, STEER_REFRESH) = range(4)
114114
steerer = _Steerer(commands, dfi)
115115
self.submodules += steerer
116-
116+
117117
# Read/write turnaround
118118
read_available = Signal()
119119
write_available = Signal()
120120
self.comb += [
121121
read_available.eq(optree("|", [req.stb & req.is_read for req in requests])),
122122
write_available.eq(optree("|", [req.stb & req.is_write for req in requests]))
123123
]
124-
124+
125125
def anti_starvation(timeout):
126126
en = Signal()
127127
max_time = Signal()
@@ -139,12 +139,12 @@ def anti_starvation(timeout):
139139
return en, max_time
140140
read_time_en, max_read_time = anti_starvation(timing_settings.read_time)
141141
write_time_en, max_write_time = anti_starvation(timing_settings.write_time)
142-
142+
143143
# Refresh
144144
self.comb += [bm.refresh_req.eq(refresher.req) for bm in bank_machines]
145145
go_to_refresh = Signal()
146146
self.comb += go_to_refresh.eq(optree("&", [bm.refresh_gnt for bm in bank_machines]))
147-
147+
148148
# Datapath
149149
all_rddata = [p.rddata for p in dfi.phases]
150150
all_wrdata = [p.wrdata for p in dfi.phases]
@@ -154,11 +154,11 @@ def anti_starvation(timeout):
154154
Cat(*all_wrdata).eq(lasmic.dat_w),
155155
Cat(*all_wrdata_mask).eq(~lasmic.dat_we)
156156
]
157-
157+
158158
# Control FSM
159159
fsm = FSM()
160160
self.submodules += fsm
161-
161+
162162
def steerer_sel(steerer, phy_settings, r_w_n):
163163
r = []
164164
for i in range(phy_settings.nphases):

‎misoclib/lasmicon/refresher.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def __init__(self, a, ba, tRP, tREFI, tRFC):
99
self.req = Signal()
1010
self.ack = Signal() # 1st command 1 cycle after assertion of ack
1111
self.cmd = CommandRequest(a, ba)
12-
12+
1313
###
1414

1515
# Refresh sequence generator:
@@ -37,7 +37,7 @@ def __init__(self, a, ba, tRP, tREFI, tRFC):
3737
seq_done.eq(1)
3838
])
3939
])
40-
40+
4141
# Periodic refresh counter
4242
counter = Signal(max=tREFI)
4343
start = Signal()
@@ -50,7 +50,7 @@ def __init__(self, a, ba, tRP, tREFI, tRFC):
5050
counter.eq(counter - 1)
5151
)
5252
]
53-
53+
5454
# Control FSM
5555
fsm = FSM()
5656
self.submodules += fsm

0 commit comments

Comments
 (0)
Please sign in to comment.