OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [counter.py] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 1... Line 1...
################################################################################
################################################################################
#
#
# Copyright 2013, Sinclair R.F., Inc.
# Copyright 2013-2014, Sinclair R.F., Inc.
#
#
################################################################################
################################################################################
 
 
import re;
import re;
 
 
Line 71... Line 71...
      self.AddAttr(config,param,param_tuple[1],param_test[1],loc,param_test[2]);
      self.AddAttr(config,param,param_tuple[1],param_test[1],loc,param_test[2]);
    # Ensure the optional width is set.
    # Ensure the optional width is set.
    if not hasattr(self,'width'):
    if not hasattr(self,'width'):
      self.width=8;
      self.width=8;
    # Ensure the required parameters are provided.
    # Ensure the required parameters are provided.
    required = ['inport','insignal','width'];
    required = ['inport','insignal',];
    if self.width > 8:
    if self.width > 8:
      required.append('outlatch');
      required.append('outlatch');
    for paramname in required:
    for paramname in required:
      if not hasattr(self,paramname):
      if not hasattr(self,paramname):
        raise SSBCCException('Required parameter "%s" is missing at %s' % (paramname,loc,));
        raise SSBCCException('Required parameter "%s" is missing at %s' % (paramname,loc,));

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.