Design an options combination expiry payoff calculator that computes the net
payoff and profit/loss for a multi-leg options strategy at expiration,
using signed fixed-point arithmetic.

Module name: combo_payoff
Parameters:
  - WIDTH    = 24   // Total bit width (Q15.8 fixed-point)
  - FRAC     = 8    // Fractional bits
  - MAX_LEGS = 4    // Number of legs

Ports:
  - input  clk, rst_n
  - input  [WIDTH-1:0]           spot_price     // underlying price at expiry
  - input  [MAX_LEGS*WIDTH-1:0]  strike_prices  // strike per leg (flat bus)
  - input  [MAX_LEGS*WIDTH-1:0]  premiums       // premium paid/received per leg, signed (flat bus)
  - input  [MAX_LEGS-1:0]        is_call        // 1=call, 0=put per leg
  - input  [MAX_LEGS-1:0]        is_long        // 1=long, 0=short per leg
  - input                        valid_in
  - output signed [WIDTH-1:0]    total_payoff   // net intrinsic payoff at expiry
  - output signed [WIDTH-1:0]    net_premium    // sum of premiums (negative = net debit)
  - output signed [WIDTH-1:0]    total_profit   // total_payoff + net_premium
  - output                       valid_out

Functional specification:
  - For each leg i:
      If is_call: intrinsic_i = max(0, spot_price - strike_i)
      If put:     intrinsic_i = max(0, strike_i - spot_price)
      If is_long: payoff_i = +intrinsic_i
      If short:   payoff_i = -intrinsic_i
  - total_payoff = sum of payoff_i for all legs (intrinsic only, excluding premium)
  - net_premium  = sum of all premium_i (signed: negative means cost, positive means income)
  - total_profit = total_payoff + net_premium
  - Registered output (1 cycle latency)
  - valid_out mirrors valid_in with 1 cycle delay
