From: Luke Kenneth Casson Leighton Date: Mon, 4 May 2020 12:53:05 +0000 (+0100) Subject: add docstring to latchregister X-Git-Tag: 24jan2021_ls180~64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e9e51759fdce6052d265b7e3ff009bb3bb75378;p=nmutil.git add docstring to latchregister --- 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)