bus/csr: new simulation api
genlib/coding: gracefully handle flen(i) < 2