Design a simple matching engine that determines if an incoming order can match
against the best opposing price, and computes the matched/remaining quantities.

Module name: match_engine
Parameters:
  - PRICE_W = 24     // Price width (Q15.8 fixed-point)
  - QTY_W   = 16     // Quantity width

Ports:
  - input  clk, rst_n
  - input  [PRICE_W-1:0] order_price         // Incoming order price
  - input  [PRICE_W-1:0] best_opposite_price // Best price on opposing side
  - input  [QTY_W-1:0]   order_qty           // Incoming order quantity
  - input  [QTY_W-1:0]   opposite_qty        // Quantity available at opposing price
  - input                 order_is_buy        // 1 = buy order, 0 = sell order
  - input                 order_valid         // Incoming order is valid
  - output [QTY_W-1:0]   matched_qty         // Quantity matched
  - output [QTY_W-1:0]   remaining_qty       // Remaining unmatched quantity
  - output [PRICE_W-1:0]  match_price         // Execution price (passive side price)
  - output                match_valid         // A match occurred

Functional specification:
  - Buy order matches if order_price >= best_opposite_price (willing to pay ask)
  - Sell order matches if order_price <= best_opposite_price (willing to sell at bid)
  - matched_qty = min(order_qty, opposite_qty)
  - remaining_qty = order_qty - matched_qty
  - match_price = best_opposite_price (passive side determines price)
  - Combinational matching decision, registered output (1 cycle latency)
  - If order_valid is low, outputs are zero/invalid
