title: Unexpected high impedance output
body: <p>I'm writing an ALU for a processor I'm designing (first RTL project) and I'm getting a high impedance output on <code>ALU_out</code> when I run my testbench, even though the flags do get set and are output correctly.</p>
  <pre><code>       module alu(
          input clk,
          input reset,
          input [7:0] A, B,
          input [3:0] Op_Sel,
          output [7:0] ALU_out,
          output C, V, N, Z
      );
      
      reg [8:0] Result = 0;
      reg [8:0] cn_temp = 0;
      reg [7:0] v_temp = 0;
      reg carry = 0;
      reg overflow = 0;
      reg negative = 0; 
      reg zero = 0;
  
      assign ALU_Out = Result[7:0];
      assign C = carry;
      assign V = overflow;
      assign N = negative;
      assign Z = zero;
      
      always @*
       begin
         if (reset)
          begin
             Result = 0;
             cn_temp = 0;
             v_temp = 0;
             carry = 0;
             overflow = 0;
             negative = 0;
             zero = 0;
          end
       end
      
      always @(posedge clk)
       begin
            case(Op_Sel)
            4'b0000: // Addition
        begin
             Result = A + B; 
         negative = Result[7];
         zero = (Result[7:0] == 8'b00000000);
         carry = Result[8];
         v_temp = A[6:0] + B[6:0];
         overflow = v_temp[7] ^ carry;
        end
        .
        .
        //The rest of the instructions
        .
        .
        .
           endcase
  
        
         end
  
  
     endmodule
  
  //My testbench
  
  module alu_testbench();
  
  reg clk;
  reg reset;
  reg [7:0] A;
  reg [7:0] B;
  reg [3:0] Op_Sel;
  wire [7:0] ALU_out;
  wire C, V, N, Z;
  
  always begin
  #1
  clk = ~clk;
  end
  
  initial begin
  clk = 0;
  reset = 0;
  #1
  reset = 1;
  #1
  reset = 0;
  end
  
  initial begin
  #10
  A=2;
  B=3;
  Op_Sel = 4'b0000;
  #10
  A=1;
  
  end
  
  
  alu alu (
      .clk(clk),
      .A(A),
      .B(B),
      .Op_Sel(Op_Sel),
      .ALU_out(ALU_out),
      .C(C),
      .V(V),
      .N(N),
      .Z(Z));
  
  endmodule
  </code></pre>
  <p>I believe I connected up the module to the testbench (through a wire), so why am I getting high impedance on <code>ALU_out</code>?</p>