ClockGateControlInterface.clone constructor

ClockGateControlInterface.clone(
  1. ClockGateControlInterface otherInterface, {
  2. bool? isPresent,
  3. Logic gatedClockGenerator(
    1. ClockGateControlInterface intf,
    2. Logic clk,
    3. Logic enable
    )?,
})

Creates a clone of otherInterface with the same configuration, including any additionalPorts and gatedClockGenerator function. This should be used to replicate interface configuration through hierarchies to carry configuration information.

If isPresent is provided, then it will override the isPresent value from otherInterface.

If a gatedClockGenerator is provided, then it will override the gatedClockGenerator function from otherInterface.

Implementation

ClockGateControlInterface.clone(
  ClockGateControlInterface super.otherInterface, {
  bool? isPresent,
  Logic Function(
    ClockGateControlInterface intf,
    Logic clk,
    Logic enable,
  )? gatedClockGenerator,
})  : hasEnableOverride = otherInterface.hasEnableOverride,
      isPresent = isPresent ?? otherInterface.isPresent,
      gatedClockGenerator =
          gatedClockGenerator ?? otherInterface.gatedClockGenerator,
      super.clone();