Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
8  migen/actorlib/dma_asmi.py
@@ -89,7 +89,8 @@ def __init__(self, port):
89 89
 			port.adr.eq(self.address_data.payload.a),
90 90
 			port.we.eq(1),
91 91
 			port.stb.eq(self.address_data.stb),
92  
-			self.address_data.ack.eq(port.ack)
  92
+			self.address_data.ack.eq(port.ack),
  93
+			port.dat_wm.eq(0)
93 94
 		]
94 95
 		self.sync += [
95 96
 			port.dat_w.eq(0),
@@ -112,7 +113,10 @@ def __init__(self, port, n):
112 113
 
113 114
 		drive_data = Signal()
114 115
 		data_reg = Signal(port.hub.dw)
115  
-		self.comb += If(drive_data, port.dat_w.eq(data_reg))
  116
+		self.comb += [
  117
+			If(drive_data, port.dat_w.eq(data_reg)),
  118
+			port.dat_wm.eq(0)
  119
+		]
116 120
 
117 121
 		self.sync += [
118 122
 			If(port.stb & port.ack & (port.tag_issue == (port.base + n)),
18  migen/flow/network.py
@@ -151,24 +151,26 @@ def _infer_plumbing_layout(self):
151 151
 			if not ap:
152 152
 				break
153 153
 			for a in ap:
154  
-				if a.actor_class in plumbing.layout_sink:
155  
-					edges = self.in_edges(a, data=True)
156  
-					assert(len(edges) == 1)
157  
-					other, me, data = edges[0]
  154
+				in_edges = self.in_edges(a, data=True)
  155
+				out_edges = self.out_edges(a, data=True)
  156
+				if a.actor_class in plumbing.layout_sink and len(in_edges) == 1:
  157
+					other, me, data = in_edges[0]
158 158
 					if isinstance(other, AbstractActor):
159 159
 						continue
160 160
 					other_ep = data["source"]
161 161
 					if other_ep is None:
162 162
 						other_ep = get_single_ep(other, Source)[1]
163  
-				elif a.actor_class in plumbing.layout_source:
164  
-					edges = self.out_edges(a, data=True)
165  
-					assert(len(edges) == 1)
166  
-					me, other, data = edges[0]
  163
+					else:
  164
+						other_ep = getattr(other, other_ep)
  165
+				elif a.actor_class in plumbing.layout_source and len(out_edges) == 1:
  166
+					me, other, data = out_edges[0]
167 167
 					if isinstance(other, AbstractActor):
168 168
 						continue
169 169
 					other_ep = data["sink"]
170 170
 					if other_ep is None:
171 171
 						other_ep = get_single_ep(other, Sink)[1]
  172
+					else:
  173
+						other_ep = getattr(other, other_ep)
172 174
 				else:
173 175
 					raise AssertionError
174 176
 				layout = other_ep.payload.layout

No commit comments for this range

Something went wrong with that request. Please try again.