cpu: Fix bug when reading in TrafficGen state transitions
authorSascha Bischoff <sascha.bischoff@arm.com>
Thu, 30 May 2013 16:54:07 +0000 (12:54 -0400)
committerSascha Bischoff <sascha.bischoff@arm.com>
Thu, 30 May 2013 16:54:07 +0000 (12:54 -0400)
commit04ccc79134d7752b97a36cb922d56c9d450983f9
tree3594e546bdeec2cf809321fe24d72d44e58ff6bf
parentfc09bc8678b5e78d553e009105c58e5c5d5befb4
cpu: Fix bug when reading in TrafficGen state transitions

This patch fixes a bug with the traffic generator which occured when
reading in the state transitions from the configuration
file. Previously, the size of the vector which stored the transitions
was used to get the size of the transitions matrix, rather than using
the number of states. Therefore, if there were more transitions than
states, i.e. some transitions has a probability of less than 1, then
the traffic generator would fatal when trying to check the
transitions.

This issue has been addressed by using the number of input states,
rather then the number of transitions.
src/cpu/testers/traffic_gen/traffic_gen.cc