You’ve got a couple of options and you aren’t being very specific.
Inference
The doc you link says that you can either “let the synthesis infer register functions from the source RTL”. That should work well for synchronous flops, and unfortunately not as well yet for asynchronous. I have some code for improving asynchronous flip flop inference that hasn’t been integrated yet.
The docs page you’re linking is about the “word-level” register cells. For single-bit but technology-unspecific cells, there’s this page:
The cell types $_SDFFCE_[NP][NP][01][NP]_ implement d-type flip-flops with synchronous reset and enable, with enable having priority over reset
From there you could either directly instantiate the Yosys-internal $_SDFFCE_... type that corresponds to the polarities you want.
Instantiating iCEcube2 style cells
You can see in this file that those kinds of cells map to ice40-specific cells SB_DFFE... and SB_DFFNE.... Their behavioral models are here. These are apparently iCEcube2 names for these primitives. Yosys “knows” these ice40-specific cell types, so you might want to use those instead.
Instantiating Radiant style cells
Yosys can’t resolve FD1P3XZ with parameters, it doesn’t know what that is. The doc you link even suggests you should instead instantiate FD1P3IZ or whatever, which doesn’t need parameters. Instantiating that and adding an empty FD1P3IZ module (this causes it to be interpreted as a “blackbox”) should work too.
I think we could turn this reply of mine into an application note at this point…
Hi widlarizer, many thanks for the prompt and lengthy response.
I’ve attached the complete module, it comes from a project provided by Lattice, and I have no idea how to follow your guide, and would be grateful, if further instruction was available.
Whether this module could contribute to the application note I cannot say.
It’s up to you to know what sort of flip flop you want, not up to me to guess. If it’s not your Verilog, but from Lattice, ask Lattice. Looking up “FD1P3XZ” including the quotes on Google finds nothing that would define what it’s supposed to do with what sort of parameter
There’s no point in feeding code nobody understands into Yosys or any other tool
That’s a nextpnr error, not yosys. You only asked about yosys. You can use iCEcube2 style cells instead as I suggested, I checked and nextpnr seems to understand only SB_DFF* style cells for ice40. FD1P3BX, FD1P3DX, FD1P3IX, FD1P3JX are supported for the nexus familiy