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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [asmDef_9x8.py] - Diff between revs 4 and 5

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

Rev 4 Rev 5
Line 862... Line 862...
    elif token['type'] == 'value':
    elif token['type'] == 'value':
      return token['value']
      return token['value']
    else:
    else:
      raise asmDef.AsmException('Unrecognized optional argument "%s"' % token['value']);
      raise asmDef.AsmException('Unrecognized optional argument "%s"' % token['value']);
 
 
  def Emit_GetAddrAndBank(self,name):
  def Emit_GetAddrAndBank(self,token):
    """
    """
    For the specified variable, return an ordered tuple of the memory address
    For the specified variable, return an ordered tuple of the memory address
    within its bank, the corresponding bank index, and the corresponding bank
    within its bank, the corresponding bank index, and the corresponding bank
    name.\n
    name.\n
    Note:  This is used by several user-defined macros that fetch from or store
    Note:  This is used by several user-defined macros that fetch from or store
           to variables.
           to variables.
    """
    """
 
    name = token['value'];
    if not self.IsSymbol(name):
    if not self.IsSymbol(name):
      raise asmDef.AsmException('"%s" is not a recognized symbol' % name);
      raise asmDef.AsmException('"%s" is not a recognized symbol at %s' % (name,token['loc'],));
    ixName = self.symbols['list'].index(name);
    ixName = self.symbols['list'].index(name);
    if self.symbols['type'][ixName] != 'variable':
    if self.symbols['type'][ixName] != 'variable':
      raise asmDef.AsmException('"%s" is not a variable' % name);
      raise asmDef.AsmException('"%s" is not a variable at %s' % (name,token['loc'],));
    body = self.symbols['body'][ixName];
    body = self.symbols['body'][ixName];
    bankName = body['memory'];
    bankName = body['memory'];
    ixMem = self.memories['list'].index(bankName);
    ixMem = self.memories['list'].index(bankName);
    return (body['start'],self.memories['bank'][ixMem],bankName,);
    return (body['start'],self.memories['bank'][ixMem],bankName,);
 
 

powered by: WebSVN 2.1.0

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