added flip flop from XFAB

This commit is contained in:
Michele 2022-03-04 19:02:34 +01:00
parent 250f5bcc58
commit 72ec59cbcf
1 changed files with 13 additions and 33 deletions

View File

@ -373,49 +373,29 @@ namespace tmpl {
}
sizing { _en{-2}; y{-2,2} }
}
export defproc DFFQ_R_X1 (bool? clk, reset, S, d, vdd, vss; bool! q)
export defproc DFFQ_R_X1 (bool? clk, reset_B, d; bool! q; bool? vdd,vss)
{
bool _clk, __clk, _q_B, _dl;
bool _Ro, _So;
bool _So2;
bool _qb;
bool _clk, __clk, _mqi,_mqib,_sqi,_sqib;
prs {
_q_B<10> -> q-
~_q_B<20> -> q+
clk<10> -> _clk-
~clk<20> -> _clk+
// Creating delayed versions of the clock
clk => _clk-
_clk => __clk-
_clk<10> -> __clk-
~_clk<20> -> __clk+
(~d & ~_clk)|(~reset_B)|(~__clk&~_mqi) -> _mqib+
(d & __clk)|(reset_B & _mqi & _clk) -> _mqib-
reset<20> -> _Ro-
~reset<20> -> _Ro+
_mqib => _mqi-
// S<20> & _dl -> _So-
// ~S<20> | ~_dl -> _So+
(~_mqi &~__clk)|(~reset_B)|(~_sqi&~_clk) -> _sqib+
(_mqi &_clk)|(_sqi&__clk&reset_B) -> _sqib-
[keeper=0] d<10> & _clk -> _dl-
~d<20> & ~__clk<10> -> _dl+
_sqib => _sqi-
_sqib => q-
reset<20> & _qb -> _q_B-
~reset<20> | ~_qb -> _q_B+
// _q_B<20> & S -> _So2-
// ~_q_B<20> | ~S -> _So2+
// input stage feedback
transgate<10> (__clk,_clk,_Ro,_dl)
// input to output
transgate<10> (__clk,_clk,reset,_qb)
// output feedback
transgate<10> (_clk,__clk,reset,_qb)
}
sizing { q{-1} }
}
}
}
}