code generation fix for top-level input nets
code gen fixes for registers