Examples of LongAccess


Examples of org.pshdl.interpreter.FastSimpleInterpreter.LongAccess

      case xor:
        stack[++stackPos] = fixOp(b ^ a, fi.arg1);
        break;
      case isFallingEdge: {
        final int off = fi.arg1;
        final LongAccess access = getInternal(off, arrayPos);
        arrayPos = -1;
        if (access.skip(deltaCycle, epsCycle))
          return false;
        final long curr = access.getDataLong();
        if (!disableEdge) {
          final LongAccess prevAcc = internals_prev[off];
          prevAcc.offset = access.offset;
          final long prev = prevAcc.getDataLong();
          if ((prev != 1) || (curr != 0))
            return false;
        } else {
          if (curr != 0)
            return false;
        }
        access.setLastUpdate(deltaCycle, epsCycle);
        break;
      }
      case isRisingEdge: {
        final int off = fi.arg1;
        final LongAccess access = getInternal(off, arrayPos);
        arrayPos = -1;
        if (access.skip(deltaCycle, epsCycle))
          return false;
        final long curr = access.getDataLong();
        if (!disableEdge) {
          final LongAccess prevAcc = internals_prev[off];
          prevAcc.offset = access.offset;
          final long prev = prevAcc.getDataLong();
          if ((prev != 0) || (curr != 1))
            return false;
        } else {
          if (curr != 1)
            return false;
        }
        access.setLastUpdate(deltaCycle, epsCycle);
        break;
      }
      case posPredicate: {
        final int off = fi.arg1;
        final LongAccess access = getInternal(off, arrayPos);
        arrayPos = -1;
        // If data is not from this deltaCycle it was not
        // updated that means prior predicates failed
        if (!access.isFresh(deltaCycle, epsCycle))
          return false;
        if (access.getDataLong() == 0)
          return false;
        break;
      }
      case negPredicate: {
        final int off = fi.arg1;
        final LongAccess access = getInternal(off, arrayPos);
        arrayPos = -1;
        // If data is not from this deltaCycle it was not
        // updated that means prior predicates failed
        if (!access.isFresh(deltaCycle, epsCycle))
          return false;
        if (access.getDataLong() != 0)
          return false;
        break;
      }
      case pushAddIndex:
        writeIndex[++arrayPos] = (int) a;
        break;
      case writeInternal:
        final int off = fi.arg1;
        final LongAccess access = getInternal(off, -1);
        access.fillDataLong(arrayPos, writeIndex, a, deltaCycle, epsCycle);
        if (access.ii.isShadowReg) {
          regUpdates.add(access.getRegUpdater());
        }
        arrayPos = -1;
        break;
      }
View Full Code Here

Examples of org.pshdl.interpreter.FastSimpleInterpreter.LongAccess

      return ((value << width) >> width);
    return value & ((1l << width) - 1);
  }

  public LongAccess getInternal(int off, int arrayPos) {
    final LongAccess ea = internals[off];
    if (arrayPos != -1) {
      ea.setOffset(writeIndex);
    }
    return ea;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.