Skip to content

Commit 0bcd6da

Browse files
committedMar 3, 2015
soc: remove is_sim function
1 parent 905be50 commit 0bcd6da

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed
 

‎misoclib/soc/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
def mem_decoder(address, start=26, end=29):
1616
return lambda a: a[start:end] == ((address >> (start+2)) & (2**(end-start))-1)
1717

18-
def is_sim(platform):
19-
if hasattr(platform, "is_sim"):
20-
return platform.is_sim
21-
else:
22-
return False
23-
2418
class SoC(Module):
2519
csr_map = {
2620
"crg": 0, # user
@@ -114,7 +108,7 @@ def __init__(self, platform, clk_freq, cpu_or_bridge=None,
114108
self.register_mem("csr", self.mem_map["csr"], self.wishbone2csr.wishbone)
115109

116110
if with_uart:
117-
if is_sim(platform):
111+
if getattr(platform, "is_sim", False):
118112
self.submodules.uart_phy = UARTPHYSim(platform.request("serial"))
119113
else:
120114
self.submodules.uart_phy = UARTPHYSerial(platform.request("serial"), clk_freq, uart_baudrate)

0 commit comments

Comments
 (0)
Please sign in to comment.