Design a real-time unrealized P&L calculator using signed fixed-point arithmetic.

Module name: pnl_calc
Parameters:
  - WIDTH = 24       // Total bit width (Q15.8 fixed-point)
  - FRAC  = 8        // Fractional bits

Ports:
  - input  clk, rst_n
  - input  signed [WIDTH-1:0] position        // Current position (positive=long, negative=short)
  - input  signed [WIDTH-1:0] avg_entry_price // Average entry price
  - input  signed [WIDTH-1:0] market_price    // Current market price
  - input                     valid_in        // Input is valid
  - output signed [WIDTH-1:0] unrealized_pnl  // unrealized P&L
  - output                    valid_out       // Output is valid

Functional specification:
  - unrealized_pnl = position * (market_price - avg_entry_price)
  - Signed fixed-point multiplication (Q15.8 * Q15.8 -> Q15.8)
  - Result is truncated to WIDTH bits after shifting right by FRAC
  - Registered output (1 cycle latency)
  - valid_out mirrors valid_in with 1 cycle delay
