Manually set output as clock by setting the CLOCK attribute

The following shows that output wire o is given the (* CLOCK *) attribute.


tests/clocks/output_attr_clock/output_attr_clock.sim.v
19
20
21
22
23
24
25
26
27
28
29
/*
 * `output wire o` should be detected as a clock because of the `(* CLOCK *)`
 * attribute.
 */
(* whitebox *)
module BLOCK(a, b, o);
  input wire a;
  input wire b;
  (* CLOCK *)
  output wire o;
endmodule

As such, the is_clock attribute of the o port is set to 1.

output_attr_clock.model.xml
<?xml version="1.0"?>
<models>
  <model name="BLOCK">
    <input_ports>
      <port name="a"/>
      <port name="b"/>
    </input_ports>
    <output_ports>
      <port is_clock="1" name="o"/>
    </output_ports>
  </model>
</models>