Skip to content

Commit eedb9cc

Browse files
authored
Add flipflop timing diagram (#4750)
* docs: add timing diagram for flipflop component * flipflop: initialize out-not to 1
1 parent 06864e2 commit eedb9cc

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

‎src/hal/components/flipflop.comp‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
component flipflop "D type flip-flop";
2+
3+
description
4+
"""
5+
....
6+
┌─────┐ ┌─────┐ ┌─────
7+
clk: ─────┘ └─────┘ └─────┘
8+
────────┐ ┌xxxxxxxxxxxxx
9+
data: └────────────┘xxxxxxxxxxxxx
10+
┌─────────────
11+
set: ─────────────────────┘
12+
─────────────────┐ ┌────┐
13+
reset: └─────────┘ └──
14+
┌───────────┐ ┌─────┐ ┌──
15+
out: ─────┘ └───┘ └────┘
16+
─────┐ ┌───┐ ┌────┐
17+
out-not: └───────────┘ └─────┘ └──
18+
....
19+
""";
20+
221
pin in bool data_ "data input";
322
pin in bool clk "clock, rising edge writes data to out";
423
pin in bool set "when true, force out true";
524
pin in bool reset "when true, force out false; overrides set";
6-
pin io bool out "output";
7-
pin io bool out-not "inverted output";
25+
pin io bool out = 0 "output";
26+
pin io bool out-not = 1 "inverted output";
827
option data flipflop_data;
928

1029
option period no;

0 commit comments

Comments
 (0)