Changeset 3142

Show
Ignore:
Timestamp:
03/21/07 10:18:08 (6 years ago)
Author:
DrewCormier
Message:

initialization was in wrong place, causing indexing error

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • WaveDev/trunk/WaveDev/wavedev/generate/templates/basic_ports/genStructure.py

    r2667 r3142  
    11121112    ts = " "*8 + "/*insert code here to do work*/\n\n\n\n\n\n\n";  
    11131113    output.write(ts) 
     1114 
     1115    inCount = 0; 
    11141116    for x in c.ports: 
    11151117        if x.type == "Provides": 
    1116             inCount = 0; 
    1117             if x.interface.name == "complexShort": 
     1118            if x.interface.name == "complexShort": 
    11181119                ts = " "*8 + "Class_instance_name->dataIn_" + str(inCount) + "->bufferEmptied();\n";  
    11191120                output.write(ts) 
     
    11431144                continue 
    11441145             
    1145  
     1146    outCount = 0; 
    11461147    for x in c.ports:  #assumes that you have at least one port 
    1147         if x.type == "Uses":   
    1148             outCount = 0; 
     1148        if x.type == "Uses":  
    11491149            if x.interface.name == "complexShort": 
    11501150                ts = " "*8 + "Class_instance_name->dataOut_" + str(outCount) + "->pushPacket(I_out_" + str(outCount) + ", Q_out_" + str(outCount) + ");\n";