SETBDDREFEXT(3)

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

✨ SETBDDREFEXT ✨

okay bestie, so this is a page from the BDD FUNCTIONS manual, section 3 of the Unix manual pages β€” yes, the SETBDDREFEXT(3) one, that's her πŸ’…. She's a tiny little function with one job and she does it flawlessly, and honestly? we're obsessed 🫢


🌸 NAME 🌸

setbddrefext β€” increments the external reference, and decrements the internal reference of a bdd node. that's it. that's the whole personality. and she ate πŸ’–


🧚 ORIGIN 🧚

bestie this software belongs to the ALLIANCE CAD SYSTEM, which was developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France πŸ‡«πŸ‡·βœ¨ iconic academic lineage fr fr.


πŸ’œ SYNOPSIS πŸ’œ

#include "bdd101.h"
bddnode βˆ—setbddrefext( BddNode )
  bddnode βˆ—BddNode;

πŸŽ€ PARAMETERS πŸŽ€

  • BddNode β€” the bdd node. yeah that's it. she's the one and only argument, the main character of this whole operation πŸ‘‘

🌈 DESCRIPTION 🌈

so here's the tea β˜•: setbddrefext increments the number of external reference of the bdd node BddNode and decrements its number of internal reference.

that's the whole vibe. one goes up, one goes down, the balance of the universe is maintained ✨ it's giving conservation of energy but make it bdd nodes πŸ’«


⭐ RETURN VALUE ⭐

setbddrefext returns the BddNode pointer. same node, hands it right back to you like "here you go bestie, she's all yours" 🫢


πŸ’€ ERRORS πŸ’€

"negative reference, index xxx error !"

not me getting a whole error message 😭 β€” the BddNode must have a positive number of internal reference. like, she needs to have something to decrement, otherwise it's chaos, and the function is NOT about that life. respect the internal ref count, bestie πŸ™ˆ


πŸ”₯ EXAMPLE πŸ”₯

lowkey this is a whole journey, buckle up πŸ¦‹

#include "bdd101.h"
   bddsystem  βˆ—BddSystem;
   bddcircuit βˆ—BddCircuit;
   bddnode    βˆ—BddNode;
   chain_list βˆ—Expr;
   BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
   BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
   BddNode = addbddcircuitin( (bddcircuit βˆ—)0, "i0", 0, BDD_IN_MODE_FIRST );
   BddNode = addbddnode( (bddsystem βˆ—)0, BddNode->INDEX, BddNode->LOW, BddNode->HIGH );
   Expr = convertbddcircuitabl( (bddcircuit βˆ—)0, BddNode );
   incbddrefint( BddNode );
   setbddrefext( BddNode );
   /* displays Node VAR: 0  INDEX: 2  MARK: 0  REF_EXT: 1  REF_INT: 0 */
   viewbddnode( (bddsystem βˆ—)0, BddNode );
   /* displays (not i0) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddcircuit βˆ—)0 );

see how she bumps the internal ref with incbddrefint( BddNode ) first, and then setbddrefext( BddNode ) swoops in to flip the counts? that's the move πŸ’… note the comments in there too β€” they show exactly what gets displayed, REF_EXT: 1 and REF_INT: 0, and (not i0) for the VHDL view. no cap, that's literally what it prints πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ“ BUG REPORT πŸ“

bestie this tool is under development at the ASIM department of the LIP6 laboratory (she's a work in progress, we stan growth 🌱). they need your feedback to improve documentation and tools β€” so like, if something's off, tell them fr fr, they're literally asking πŸ™


and that's the whole page, mwah πŸ’‹ this one came from ASIM/LIP6, dated October 1, 1997, and she lives at SETBDDREFEXT(3) in the manual. oldie but a goodie, periodt βœ¨πŸŽ€πŸ¦‹