main() { datapath { 16: reg_9 <= 32'd1; 15: stack[32'd0] <= reg_9; 14: reg_8 <= 32'd2; 13: stack[32'd1] <= reg_8; 12: reg_7 <= 32'd3; 11: stack[32'd2] <= reg_7; 10: reg_3 <= 32'd0; 9: ; 8: reg_1 <= 32'd0; 7: reg_6 <= 32'd0; 6: reg_5 <= stack[{{{reg_6 + 32'd0} + {reg_1 * 32'd4}} / 32'd4}]; 5: reg_3 <= {reg_3 + {reg_5 + 32'd0}}; 4: reg_1 <= {reg_1 + 32'd1}; 3: ; 2: reg_4 <= reg_3; 1: finish <= 1'd1; return_val <= reg_4; } controllogic { 16: state <= 32'd15; 15: state <= 32'd14; 14: state <= 32'd13; 13: state <= 32'd12; 12: state <= 32'd11; 11: state <= 32'd10; 10: state <= 32'd9; 9: state <= 32'd8; 8: state <= 32'd7; 7: state <= 32'd6; 6: state <= 32'd5; 5: state <= 32'd4; 4: state <= 32'd3; 3: state <= ({$signed(reg_1) < $signed(32'd3)} ? 32'd7 : 32'd2); 2: state <= 32'd1; 1: ; } }