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

Subversion Repositories ssbcc

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

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

Rev 4 Rev 5
Line 29... Line 29...
                                        ['','singlevalue','symbol']
                                        ['','singlevalue','symbol']
                                      ]);
                                      ]);
 
 
  # Define the macro functionality.
  # Define the macro functionality.
  def emitFunction(ad,fp,argument):
  def emitFunction(ad,fp,argument):
    variableName = argument[0]['value'];
    (addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(argument[0]);
    (addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(variableName);
 
    N = ad.Emit_IntegerValue(argument[1]);
    N = ad.Emit_IntegerValue(argument[1]);
    offsetString = '%s-1' % argument[1]['value'] if type(argument[0]['value']) == str else '%d-1' % N;
    offsetString = '%s-1' % argument[1]['value'] if type(argument[0]['value']) == str else '%d-1' % N;
    ad.EmitPush(fp,addr+N-1,'%s+%s' % (variableName,offsetString));
    ad.EmitPush(fp,addr+N-1,'%s+%s' % (argument[0]['value'],offsetString));
    for dummy in range(N-1):
    for dummy in range(N-1):
      ad.EmitOpcode(fp,ad.specialInstructions['fetch-'] | ixBank,'fetch- '+bankName);
      ad.EmitOpcode(fp,ad.specialInstructions['fetch-'] | ixBank,'fetch- '+bankName);
    ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
    ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
 
 
  ad.EmitFunction['.fetchvector'] = emitFunction;
  ad.EmitFunction['.fetchvector'] = emitFunction;

powered by: WebSVN 2.1.0

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