added flip flop from XFAB
This commit is contained in:
parent
250f5bcc58
commit
72ec59cbcf
|
@ -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} }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue