Example #1
0
 def Real(self, name, width=None, length=None, signed=False, value=None, initval=None):
     t = vtypes.Real(width, length, signed, value,
                     initval, name=name, module=self)
     self.check_existing_identifier(name)
     self.variable[name] = t
     self.items.append(t)
     return t
Example #2
0
 def visit_Real(self, node):
     name = node.name
     width = self.visit(node.width) if node.width is not None else None
     obj = vtypes.Real(width, name=name)
     if node.width is not None:
         obj._set_raw_width(self.visit(node.width.msb),
                            self.visit(node.width.lsb))
     self.add_object(obj)
     return obj
Example #3
0
 def visit_Real(self, node):
     name = node.name
     raw_width = self.visit(node.width) if node.width is not None else None
     width = to_width(raw_width)
     raw_dims = self.visit(
         node.dimensions) if node.dimensions is not None else None
     dims = to_dims(raw_dims)
     obj = vtypes.Real(width,
                       dims,
                       name=name,
                       raw_width=raw_width,
                       raw_dims=raw_dims)
     self.add_object(obj)
     return obj