1. combinational UDP
primitive tsmc_mux (q, do, d1, s);
output q;
input do, d1, s;
table
//d0, d1, s: q
0 ? 0 : 0;
1 ? 0 : 1;
? 0 1 : 0;
? 1 1 : 1;
0 0 x : 0;
1 1 x: 1;
endtable
endprimitive
2. level-sensitive UDP
primitive complex_latch (q, d, e, cdn, sdn, notifier);
output q; reg q;
input d, e, cdn, sdn, notifier;
// e: 1 latch, 0 hold
// cdn: 0: reset, 1: inactive
// sdn: 0: set to ; 1: inactive
table
// d, e, cdn, sdn, notifier: q : q+
1 1 1 ? ? : ? : 1; //latch 1
0 1 1 ? ? : ? : 1; //latch 0
0 (10) 1 1 ? : ? : 0; //latch 0 after falling edge
1 (10) 1 1 ? : ? : 1; //latch 1 after falling edge
* 0 ? ? ? : ? : -; //no change
? ? ? 0 ? : ? : 0; //preset to 1
1
endtable
endprimitive
3.