derived variable ordering using func in sim/build.py