DPGEN_DFFT(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

πŸ’– DPGEN_DFFT β€” hey bestie, it's the Dynamic Flip-Flop with Scan-Path Macro-Generator πŸ’–

okay so this is a page from the Alliance - genlib User's Manual, and it's about one very specific little macro-generator that lives in <genlib.h>. she's niche, she's dynamic, she's got a scan-path, and she's literally about to make your netlist pop off. let's get into it 🫢


✨ NAME ✨

DPGEN_DFFT β€” Dynamic Flip-Flop with Scan-Path Macro-Generator. yes bestie, that's the whole name, it's giving ✨ very descriptive ✨


🌸 SYNOPSIS 🌸

#include  <genlib.h>

void GENLIB_MACRO (DPGEN_DFFT, char *modelname, long flags, long N);

so you pull in <genlib.h>, and then you call GENLIB_MACRO with DPGEN_DFFT as the macro, your modelname, some flags, and N. that's it. that's the whole incantation πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

she generates a N bits dynamic flip-flop with scan-path named modelname. and when we say dynamic, we mean it for real for real β€” the two latches of this flip-flop are dynamic, i.e. the data is stored in a capacitor. no cap. it's literally holding your bits in a lil capacitor. iconic behavior honestly πŸ”₯

πŸ’€ how it works πŸ’€

  • scan when set to '1' enables the scan-path mode. and listen β€” note that in scan-path mode, the wen signal is not effective. so don't come crying to me when your write enable does nothing in scan mode, i warned you πŸ™ˆ
  • scin : the input of the scan-path. This terminal is different from i0[0]. they are not the same thing bestie, do not conflate them 😭

The scout is q[N-1] (in the following example this is q[31]). so the last bit of the output is your scan-out. that's the vibe check.

  • wen when set to '1' enables the writing of the flip-flop. write enable does what it says on the tin ✨

πŸŽ€ TERMINAL NAMES πŸŽ€

  1. scan : scan-path mode (input, 1 bit).
  2. scin : scan path in (input, 1 bit).
  3. wen : write enable (input, 1 bit).
  4. ck : clock signal (input, 1 bit).
  5. i0 : data input (N bits).
  6. q : output (N bits).
  7. vdd : power.
  8. vss : ground.

eight terminals, all accounted for, no notes πŸ‘‘


🌈 EXAMPLE 🌈

here's the whole thing in action, and yes i'm keeping it character for character because that's the rule and also because it slays:

GENLIB_MACRO(DPGEN_DFFT, "model_dfft_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       );

GENLIB_LOINS( "model_dfft_32"
            , "instance1_dfft_32"
            , "scan"
            , "scin"
            , "wen"
            , "ck"
            , "i0[31:0]"
            ,  "q[31:0]"  /* a[31] is "scout". */
            , "vdd", "vss", NULL
            );

so we're making a 32-bit one (N = 32), flags are F_BEHAV|F_PLACE, and then GENLIB_LOINS wires it all up. and see that comment? a[31] is "scout" β€” that's where your scan-out lives. chef's kiss 🀌


πŸ‘‘ SEE ALSO πŸ‘‘


lowkey a reminder bestie: dynamic latches mean capacitor storage, so keep that in mind when you're thinking about your design. i'm not adding anything the page didn't say β€” just making sure you clocked it πŸ’œ

and that's the whole page!! this one came from ASIM/LIP6 and it's dated 30 July 2004 β€” yeah she's an elder but she still ate. mwah πŸ’‹ πŸ¦‹ ✨ πŸŽ€ πŸ’–