Fixed s output issue with code_gen.v

Forgot to initialize s to 0. Now it works.