clk_to_phase :
A clock-to-phase domain translator.
The clk_to_phase primitive takes a periodic clock input in and produces an output signal out that expresses the phase of the clock according to the user-specified frequency (freq). The output signal is an xreal-typed, step signal which gets updated at each rising edge of the input clock.
The parameter phase_wrap controls whether the output is to be wrapped within a [-pi, pi) range (phase_wrap=1) or not (phase_wrap=0).
Input/Output Terminals
| Name | I/O | Type | Description |
| out | output | xreal | phase output |
| in | input | xbit | clock input |
Parameters
| Name | Type | Default | Unit | Description |
| freq | real | 1.0e9 | Hz | nominal clock frequency |
| phase_wrap | integer | 1 | None | enable phase wrapping within [-pi, pi) |