Deleted Added
sdiff udiff text old ( 10051:6157b07daac7 ) new ( 10128:013bba88efab )
full compact
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 207 unchanged lines hidden (view full) ---

216 // open input file
217 ifstream infile;
218 infile.open(configFile.c_str(), ifstream::in);
219 if (!infile.is_open()) {
220 fatal("Traffic generator %s config file not found at %s\n",
221 name(), configFile);
222 }
223
224 // read line by line and determine the action based on the first
225 // keyword
226 string keyword;
227 string line;
228
229 while (getline(infile, line).good()) {
230 // see if this line is a comment line, and if so skip it
231 if (line.find('#') != 1) {

--- 79 unchanged lines hidden (view full) ---

311 transitions.push_back(transition);
312
313 DPRINTF(TrafficGen, "Transition: %d -> %d\n", transition.from,
314 transition.to);
315 } else if (keyword == "INIT") {
316 // set the initial state as the active state
317 is >> currState;
318
319 DPRINTF(TrafficGen, "Initial state: %d\n", currState);
320 }
321 }
322 }
323
324 // resize and populate state transition matrix
325 transitionMatrix.resize(states.size());
326 for (size_t i = 0; i < states.size(); i++) {
327 transitionMatrix[i].resize(states.size());
328 }
329
330 for (vector<Transition>::iterator t = transitions.begin();
331 t != transitions.end(); ++t) {

--- 115 unchanged lines hidden ---