
assign data_io = ((!cs && !rd)?ctr_dout:8'bZZZZZZZZ);
assign ctr_din = ((!cs && !wr)?data_io:8'bZZZZZZZZ);