[prim_lc_sync] Add AsyncOn parameter to enable/disable the sync flops

Signed-off-by: Michael Schaffner <msf@opentitan.org>
diff --git a/hw/ip/prim/rtl/prim_lc_sync.sv b/hw/ip/prim/rtl/prim_lc_sync.sv
index 951a130..a5593a3 100644
--- a/hw/ip/prim/rtl/prim_lc_sync.sv
+++ b/hw/ip/prim/rtl/prim_lc_sync.sv
@@ -15,7 +15,11 @@
   // The buffer cells have a don't touch constraint
   // on them such that synthesis tools won't collapse
   // all copies into one signal.
-  parameter int NumCopies = 1
+  parameter int NumCopies = 1,
+  // This instantiates the synchronizer flops if set to 1.
+  // In special cases where the receiver is in the same clock domain as the sender,
+  // this can be set to 0. However, it is recommended to leave this at 1.
+  parameter bit AsyncOn = 1
 ) (
   input                                       clk_i,
   input                                       rst_ni,
@@ -26,15 +30,19 @@
   `ASSERT_INIT(NumCopiesMustBeGreaterZero_A, NumCopies > 0)
 
   logic [lc_ctrl_pkg::TxWidth-1:0] lc_en;
-  prim_flop_2sync #(
-    .Width(lc_ctrl_pkg::TxWidth),
-    .ResetValue(lc_ctrl_pkg::TxWidth'(lc_ctrl_pkg::Off))
-  ) u_prim_flop_2sync (
-    .clk_i,
-    .rst_ni,
-    .d_i(lc_en_i),
-    .q_o(lc_en)
-  );
+  if (AsyncOn) begin : gen_flops
+    prim_flop_2sync #(
+      .Width(lc_ctrl_pkg::TxWidth),
+      .ResetValue(lc_ctrl_pkg::TxWidth'(lc_ctrl_pkg::Off))
+    ) u_prim_flop_2sync (
+      .clk_i,
+      .rst_ni,
+      .d_i(lc_en_i),
+      .q_o(lc_en)
+    );
+  end else begin : gen_no_flops
+    assign lc_en = lc_en_i;
+  end
 
   for (genvar j = 0; j < NumCopies; j++) begin : gen_buffs
     logic [lc_ctrl_pkg::TxWidth-1:0] lc_en_out;