Can we sample coverpoints which are design parameters?

In reply to Karmapanchal:

You could create a coverpoint for each string value — as you did for “duplex”.

Or, you could convert your string into a fixed sized integral with a maximum size, like

covergroup cg with function sample(bit [8*8:1] channel_mode); // maximum 8 chars
  cp: coverpoint channel_mode {
    bins duplex = {"duplex");
    bins half_duplex = {"rx", "tx");
  }
endgroup

You will need to cast your string parameter to an integral