Menu

#4 putting semicolon after spawn gets weird results

open
2
2008-10-17
2008-10-17
No

This bug was submitted by Guanyi. This is his description:

this bug is related with function spawn. I wirte a ';' at the end of the line with some carelessness. But the compiler does not tell anything. And the out file also can run in simulator. But the result is very strange. In this example I try to write the value form A array to B array.
first i run the command

xmtc -lg spawnbug.c --> successful

next i run the command

xmtsim -binload testData.32b a.sim

the result is
0 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 End of simulation.

It seems only second one working.
the correst result is like

28 66 44 7 18 92 31 52 96 6 10 29 69 14 56 56 5 7 22 83 20 7 95 99 48 83 4 50 25 3 85 36 End of simulation.

Discussion

  • George Caragea

    George Caragea - 2008-10-17

    the code with the bug

     
  • George Caragea

    George Caragea - 2008-10-17

    I guess adding a semicolon after spawn is the user's problem, and we don't need to do anything about it. However, when we see $ in serial mode, someone should complain (probably compiler).

     

Log in to post a comment.