示例#1
0
 def __init__(self, goal_id, defaults, cumulative):
     self.all_nodes = dict()
     with mdb.connection().row_cursor() as db:
         db.execute(
             'SELECT * FROM point LEFT OUTER JOIN axis USING (point_id) LEFT OUTER JOIN enum USING (axis_id) WHERE log_id=%(goal_id)s ORDER BY point_id ASC, axis_id ASC, enum_id ASC;'
             % locals())
         points = db.fetchall()
     for parent, children in index.groupby(points,
                                           lambda row: row.point_id):
         _parent = self.all_nodes.get(parent.parent, None)
         if parent.axis_id:
             self.all_nodes[parent.point_id] = coverage.coverpoint(
                 name=parent.point_name,
                 description=parent.desc,
                 id=parent.point_id,
                 parent=_parent,
                 axes=self.get_axes(children),
                 defaults=defaults,
                 cumulative=cumulative)
         else:
             self.all_nodes[parent.point_id] = coverage.hierarchy(
                 parent.point_name,
                 parent.desc,
                 id=parent.point_id,
                 root=parent.root == None,
                 parent=_parent)
 def __init__(self, size, scope) :
   test_vpi.cbClk.assign.__init__(self, size, scope)
   self.container = coverage.hierarchy(scope.fullname, 'Scope')
   self.cvr_pt0 = test_cvg.coverpoint_sig(self.scope.sig0, name='sig0', parent=self.container)
   self.cursor0 = self.cvr_pt0.cursor()
   self.cvr_pt1 = test_cvg.coverpoint_format(self.scope.sig0, name='sig0 x sig1', parent=self.container)
   self.cursor1 = self.cvr_pt1.cursor()
   self.cvr_pt2 = test_cvg.coverpoint_format(self.scope.sig0, name='sig0 : write fmt x read format', parent=self.container)
   self.cursor2 = self.cvr_pt2.cursor()
示例#3
0
 def __init__(self, goal_id, defaults, cumulative) :
   self.all_nodes = dict()
   with mdb.connection().row_cursor() as db :
     db.execute('SELECT * FROM point LEFT OUTER JOIN axis USING (point_id) LEFT OUTER JOIN enum USING (axis_id) WHERE log_id=%(goal_id)s ORDER BY point_id ASC, axis_id ASC, enum_id ASC;' % locals())
     points = db.fetchall()
   for parent, children in index.groupby(points, lambda row : row.point_id) :
     _parent = self.all_nodes.get(parent.parent, None)
     if parent.axis_id :
       self.all_nodes[parent.point_id] = coverage.coverpoint(name=parent.point_name, description=parent.desc, id=parent.point_id, parent=_parent, axes=self.get_axes(children), defaults=defaults, cumulative=cumulative)
     else :
       self.all_nodes[parent.point_id] = coverage.hierarchy(parent.point_name, parent.desc, id=parent.point_id, root=parent.root == None, parent=_parent)
示例#4
0
 def __init__(self, size, scope):
     test_vpi.cbClk.assign.__init__(self, size, scope)
     self.container = coverage.hierarchy(scope.fullname, 'Scope')
     self.cvr_pt0 = test_cvg.coverpoint_sig(self.scope.sig0,
                                            name='sig0',
                                            parent=self.container)
     self.cursor0 = self.cvr_pt0.cursor()
     self.cvr_pt1 = test_cvg.coverpoint_format(self.scope.sig0,
                                               name='sig0 x sig1',
                                               parent=self.container)
     self.cursor1 = self.cvr_pt1.cursor()
     self.cvr_pt2 = test_cvg.coverpoint_format(
         self.scope.sig0,
         name='sig0 : write fmt x read format',
         parent=self.container)
     self.cursor2 = self.cvr_pt2.cursor()