@@ -63,7 +63,7 @@ def __init__(self, m, name, clk, rst, width=32):
6363
6464 self .done = False
6565
66- #-------------------------------------------------------------------------
66+ # -------------------------------------------------------------------------
6767 def input (self , data , valid = None , ready = None , width = None ):
6868 if ready is not None and not isinstance (ready , (vtypes .Wire , vtypes .Output )):
6969 raise TypeError ('ready port of PipelineVariable must be Wire., not %s' %
@@ -73,7 +73,7 @@ def input(self, data, valid=None, ready=None, width=None):
7373 self .vars .append (ret )
7474 return ret
7575
76- #-------------------------------------------------------------------------
76+ # -------------------------------------------------------------------------
7777 # self.__call__() calls this method
7878 def stage (self , data , initval = 0 , width = None , preg = None ):
7979 if width is None :
@@ -96,7 +96,7 @@ def stage(self, data, initval=0, width=None, preg=None):
9696
9797 return ret
9898
99- #-------------------------------------------------------------------------
99+ # -------------------------------------------------------------------------
100100 # Accumulator
101101 def acc_and (self , data , initval = 0 , resetcond = None , width = None ):
102102 return self ._accumulate ([vtypes .And ], data , width , initval , resetcond )
@@ -146,7 +146,7 @@ def acc_custom(self, data, ops, initval=0, resetcond=None, width=None, label=Non
146146 ops = [ops ]
147147 return self ._accumulate (ops , data , width , initval , resetcond , label )
148148
149- #-------------------------------------------------------------------------
149+ # -------------------------------------------------------------------------
150150 def make_always (self , reset = (), body = ()):
151151 if self .done :
152152 raise ValueError ('make_always() has been already called.' )
@@ -165,19 +165,19 @@ def make_always(self, reset=(), body=()):
165165 self .make_code ()
166166 ))
167167
168- #-------------------------------------------------------------------------
168+ # -------------------------------------------------------------------------
169169 def make_reset (self ):
170170 return self .seq .make_reset ()
171171
172- #-------------------------------------------------------------------------
172+ # -------------------------------------------------------------------------
173173 def make_code (self ):
174174 return self .seq .make_code ()
175175
176- #-------------------------------------------------------------------------
176+ # -------------------------------------------------------------------------
177177 def draw_graph (self , filename = 'out.png' , prog = 'dot' ):
178178 _draw_graph (self , filename , prog )
179179
180- #-------------------------------------------------------------------------
180+ # -------------------------------------------------------------------------
181181 def _accumulate (self , ops , data , width = None , initval = 0 , resetcond = None , oplabel = None ):
182182 if width is None :
183183 width = self .width
@@ -197,7 +197,7 @@ def _accumulate(self, ops, data, width=None, initval=0, resetcond=None, oplabel=
197197
198198 return ret
199199
200- #-------------------------------------------------------------------------
200+ # -------------------------------------------------------------------------
201201 def _add_reg (self , prefix , count , width = None , initval = 0 ):
202202 tmp_name = '_' .join (['' , self .name , prefix , str (count )])
203203 tmp = self .m .Reg (tmp_name , width , initval = initval )
@@ -208,7 +208,7 @@ def _add_wire(self, prefix, count, width=None):
208208 tmp = self .m .Wire (tmp_name , width )
209209 return tmp
210210
211- #-------------------------------------------------------------------------
211+ # -------------------------------------------------------------------------
212212 def _make_tmp (self , data , valid , ready , width = None , initval = 0 , acc_ops = ()):
213213 tmp_data = self ._add_reg (
214214 'data' , self .tmp_count , width = width , initval = initval )
@@ -298,7 +298,7 @@ def _make_tmp(self, data, valid, ready, width=None, initval=0, acc_ops=()):
298298
299299 return tmp_data , tmp_valid , tmp_ready
300300
301- #-------------------------------------------------------------------------
301+ # -------------------------------------------------------------------------
302302 def _make_prev (self , data , valid , ready , width = None , initval = 0 ):
303303 tmp_data = self ._add_reg (
304304 'data' , self .tmp_count , width = width , initval = initval )
@@ -320,11 +320,11 @@ def _make_prev(self, data, valid, ready, width=None, initval=0):
320320
321321 return tmp_data , tmp_valid , tmp_ready
322322
323- #-------------------------------------------------------------------------
323+ # -------------------------------------------------------------------------
324324 def __call__ (self , data , initval = 0 , width = None ):
325325 return self .stage (data , initval = initval , width = width )
326326
327- #-------------------------------------------------------------------------
327+ # -------------------------------------------------------------------------
328328
329329
330330class _PipelineInterface (object ):
@@ -339,7 +339,7 @@ def __str__(self):
339339 args = [self .data , self .valid , self .ready ]
340340 return ',' .join ([str (arg ) for arg in args ])
341341
342- #-------------------------------------------------------------------------
342+ # -------------------------------------------------------------------------
343343
344344
345345class _PipelineNumeric (vtypes ._Numeric ):
@@ -451,7 +451,7 @@ def _get_preg(self, stage_id):
451451 return self
452452 return self .preg_dict [stage_id ]
453453
454- #-------------------------------------------------------------------------
454+ # -------------------------------------------------------------------------
455455
456456
457457class _PipelineVisitor (object ):
@@ -520,7 +520,7 @@ def visit_str(self, node):
520520 def visit_float (self , node ):
521521 raise NotImplementedError ('visit__Constant() must be implemented' )
522522
523- #-------------------------------------------------------------------------
523+ # -------------------------------------------------------------------------
524524
525525
526526class DataVisitor (_PipelineVisitor ):
@@ -655,7 +655,7 @@ def visit_str(self, node):
655655 def visit_float (self , node ):
656656 return (None , vtypes .Float (node ), None , [])
657657
658- #-------------------------------------------------------------------------
658+ # -------------------------------------------------------------------------
659659
660660
661661def _draw_graph (df , filename = 'out.png' , prog = 'dot' ):
0 commit comments