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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [inFIFO_async.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 math;
import math;
import re;
import re;
Line 69... Line 69...
      ('data',          r'i_\w+$',      None,   ),
      ('data',          r'i_\w+$',      None,   ),
      ('data_wr',       r'i_\w+$',      None,   ),
      ('data_wr',       r'i_\w+$',      None,   ),
      ('data_full',     r'o_\w+$',      None,   ),
      ('data_full',     r'o_\w+$',      None,   ),
      ('inport',        r'I_\w+$',      None,   ),
      ('inport',        r'I_\w+$',      None,   ),
      ('inempty',       r'I_\w+$',      None,   ),
      ('inempty',       r'I_\w+$',      None,   ),
      ('depth',         r'[1-9]\d*$',   int,    ),
      ( 'depth',        r'[1-9]\d*$',   lambda v : self.IntPow2(v,minValue=16), ),
    );
    );
    names = [a[0] for a in allowables];
    names = [a[0] for a in allowables];
    for param_tuple in param_list:
    for param_tuple in param_list:
      param = param_tuple[0];
      param = param_tuple[0];
      if param not in names:
      if param not in names:
Line 82... Line 82...
      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 required parameters are provided.
    # Ensure the required parameters are provided.
    for paramname in names:
    for paramname in names:
      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,));
    # Ensure the depth is a power of 2.
 
    if not IsPowerOf2(self.depth):
 
      raise SSBCCException('depth=%d must be a power of 2 at %s' % (self.depth,loc,));
 
    if self.depth < 16:
 
      raise SSBCCException('depth=%d must be at least 16 at %s' % (self.depth,loc,));
 
    # Add the I/O port, internal signals, and the INPORT and OUTPORT symbols for this peripheral.
    # Add the I/O port, internal signals, and the INPORT and OUTPORT symbols for this peripheral.
    config.AddIO(self.inclk,1,'input',loc);
    config.AddIO(self.inclk,1,'input',loc);
    config.AddIO(self.data,8,'input',loc);
    config.AddIO(self.data,8,'input',loc);
    config.AddIO(self.data_wr,1,'input',loc);
    config.AddIO(self.data_wr,1,'input',loc);
    config.AddIO(self.data_full,1,'output',loc);
    config.AddIO(self.data_full,1,'output',loc);

powered by: WebSVN 2.1.0

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