Add code generation

Change-Id: I2b4aba6148e36768be2eec5465b2f390537e88fa