clk_psg clk_psg reset_n reset_n count_reg[18:0] count_reg[18:0] HEXRADIX threshold[18:0] threshold[18:0] HEXRADIX enable enable bit_out bit_out envelope_reg[3:0] envelope_reg[3:0] envelope_tick envelope_tick shape[3:0] shape[3:0]