def METHOD_NAME(segmk, ps, site):
    for param in ("DOA_REG", "DOB_REG"):
        segmk.add_site_tag(site, param, verilog.parsei(ps[param]))
    for param, tagname in [('SRVAL_A', 'ZSRVAL_A'), ('SRVAL_B', 'ZSRVAL_B'),
                           ('INIT_A', 'ZINIT_A'), ('INIT_B', 'ZINIT_B')]:
        bitstr = verilog.parse_bitstr(ps[param])
        ab = param[-1]
        # Are all bits present?
        hasparity = ps['READ_WIDTH_' + ab] == 18
        for i in range(18):
            # Magic bit positions from experimentation
            # we could just only solve when parity, but this check documents the fine points a bit better
            if hasparity or i not in (1, 9):
                segmk.add_site_tag(
                    site, '%s[%u]' % (tagname, i), 1 ^ bitstr[i])