From 5e9e51759fdce6052d265b7e3ff009bb3bb75378 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 4 May 2020 13:53:05 +0100 Subject: [PATCH] add docstring to latchregister --- src/nmutil/latch.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nmutil/latch.py b/src/nmutil/latch.py index 7d6a1ef..1c22483 100644 --- a/src/nmutil/latch.py +++ b/src/nmutil/latch.py @@ -22,6 +22,15 @@ endmodule """ def latchregister(m, incoming, outgoing, settrue, name=None): + """latchregister + + based on a conditon, "settrue", incoming data will be "latched" + into a register and passed out on "outgoing". + + * if "settrue" is ASSERTED, outgoing is COMBINATORIALLY equal to incoming + * on the same cycle that settrue is DEASSERTED, outgoing REMAINS + equal (indefinitely) to the incoming value + """ # make reg same as input. reset OK. if isinstance(incoming, Record): reg = Record.like(incoming, name=name) -- 2.30.2