Package avrora.sim

Examples of avrora.sim.Simulator$IORWatch$Empty


        protected void step(int[] cycles, Simulator[] threads) {
            for ( int cntr = 0; cntr < numThreads; cntr++ ) {
                int left = --cycles[cntr];
                if ( left <= 0 ) {
                    Simulator sim = threads[cntr];
                    try {
                        cycles[cntr] = sim.step();
                    } catch ( Throwable t) {
                        reportExit(sim, t);
                        removeSimulator(threads[cntr]);
                    }
                }
View Full Code Here


               " bytes a time, but "+data.length+" bytes were sent");

    int startAddr = Const.SHARED_MEM_REC_ADDRESS;
    Simulation.Node node = (Simulation.Node) nodeMap.get(new Integer(nodeId));
    if (node == null) Avrora.userError("Not a valid NodeID: "+nodeId);
    Simulator sim = node.getSimulator();
    BaseInterpreter interpreter = sim.getInterpreter();

    interpreter.writeDataByte(startAddr++, Const.SIG_NODE_RECEIVE_DATA);
    interpreter.writeDataByte(startAddr++, (byte) data.length);
    for (int i = 0; i < data.length; i++){
      interpreter.writeDataByte(startAddr++, data[i]);
View Full Code Here

  }
 
  public void enableInterrupt(int nodeId) {
    Simulation.Node node = (Simulation.Node) nodeMap.get(new Integer(nodeId));
    if (node == null) Avrora.userError("Not a valid NodeID: "+nodeId);
    Simulator sim = node.getSimulator();
    BaseInterpreter interpreter = sim.getInterpreter();
 
    // Interrupt ausloesen
    if (Const.ACTIVATE_MESSAGE_INTERRUPT)
      interpreter.setEnabled(Const.MESSAGE_INTERRUPT, true);
    interpreter.setPosted(Const.MESSAGE_INTERRUPT, true);
View Full Code Here

      interruptSched = props.getProperty("Interrupt-schedule");
        }

        public void run() throws Exception {
            Program p = Main.loadProgram(new String[] { progName });
            Simulator s = Defaults.newSimulator(0, p);
      new InterruptScheduler(interruptSched, s);
            probeTest.run(s);
        }
View Full Code Here

            progName = props.getProperty("Program");
        }

        public void run() throws Exception {
            Program p = Main.loadProgram(new String[] { progName });
            Simulator s = Defaults.newSimulator(0, p);
            probeTest.run(s);
        }
View Full Code Here

            }
          } else {
            Simulation.Node node = (Simulation.Node) extSync.getNodeMap().get(new Integer(nodeId));
            if (node == null) Avrora.userError("Not a valid NodeID: "+nodeId);
           
            Simulator       sim         = node.getSimulator();
            BaseInterpreter interpreter = sim.getInterpreter();
            InterruptTable  intTable    = interpreter.getInterruptTable();
           
            // Fire interrupt again
            extSync.enableInterrupt(nodeId);
           
View Full Code Here

    micaZ = (MicaZ) factory.newPlatform(1, program.getProgram());
    myCpu = (AtmelMicrocontroller) micaZ.getMicrocontroller();
    eeprom = (EEPROM) myCpu.getDevice("eeprom");
   
    avrProperties = (AVRProperties) myCpu.getProperties();
    Simulator sim = myCpu.getSimulator();
    interpreter = (AtmelInterpreter) sim.getInterpreter();
//     State state = interpreter.getState();
    myMemory = new AvrMoteMemory(program.getProgram().getSourceMapping(), avrProperties, interpreter);
  }
View Full Code Here

    micaZ = (MicaZ) factory.newPlatform(1, program.getProgram());
    myCpu = (AtmelMicrocontroller) micaZ.getMicrocontroller();
    eeprom = (EEPROM) myCpu.getDevice("eeprom");
   
    avrProperties = (AVRProperties) myCpu.getProperties();
    Simulator sim = myCpu.getSimulator();
    interpreter = (AtmelInterpreter) sim.getInterpreter();
//     State state = interpreter.getState();
    myMemory = new AvrMoteMemory(program.getProgram().getSourceMapping(), avrProperties, interpreter);
  }
View Full Code Here

TOP

Related Classes of avrora.sim.Simulator$IORWatch$Empty

Copyright © 2018 www.massapicom. 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.