title: When I perform synthesis getting warning Line 49: Result of 9-bit expression is truncated to fit in 8-bit target?
body: <p>This is code of program counter I am getting error at <code>temp2 &lt;= temp2+1</code></p>
  <p><code>code</code></p>
  <pre><code>module PROGRAM_COUNTER(ldpc,incr_pc,rst,clk1,add_ir,adpc);
  
  input ldpc;
  input incr_pc;
  input rst;
  input clk1;
  input [7:0]add_ir;
  
  output [7:0]adpc;
  
  
  
  reg [7:0]temp2;
  
  always @(posedge clk1)
  begin
  if(rst==1)
  begin
      temp2 &lt;= 8'b0;
  end
  
  else if(ldpc==1)
  begin
      temp2 &lt;= add_ir;
  end
  
  else if(incr_pc==1)
  begin
      temp2 &lt;= temp2 + 1;
  end
  
  end
  
  assign adpc = temp2;
  
  
  endmodule
  </code></pre>
  <blockquote>
  <p>WARNING:HDLCompiler:413 -
  &quot;C:\Xilinx_1_files\RISC_CPU\PROGRAM_COUNTER.v&quot; Line 49: Result of
  9-bit expression is truncated to fit in 8-bit target.</p>
  </blockquote>