Adding support for LATCH mapping to `dfflibmap`

I created a [pull request]( Update to `dfflibmap` to be able to map LATCHes by jeras · Pull Request #5976 · YosysHQ/yosys · GitHub ) draft which adds support for mapping LATCHes from a SCL Liberty file. The code is building on a the recent LATCH support added by @nella I have tested it with sky130 HD and I can also see cells being mapped within the aded unit tests. But the tests are still failing during formal checking, and I would like to ask for help debugging those issues.

For example the test cd tests/techmap;make dlatchlibmap.ys

The test checks 5 LATCH mappings, equiv_opt passes for 4 latches, but fails for one, and for that one it passes for the QN output but fails for Q.

OK, I figured out the issue, I was calling dfflegalize with -cell CELNAME 01 as for FFs. In the dfflegalize tests I found I should be calling it with -cell CELNAME x for LATCHes. Now equiv_opt is passing, but I have to restructure the code a bit before everything will work properly.