cxxrtl: simplify generated edge detection logic.
authorwhitequark <whitequark@whitequark.org>
Tue, 21 Apr 2020 13:59:42 +0000 (13:59 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 21 Apr 2020 13:59:42 +0000 (13:59 +0000)
commit12c5e9275c115104896d3c53f0bbdf3fc0c6f37d
tree24491a1b8a9eb44e6804a60c83ccb53736d788c7
parent757cbb3c809091bf20a2f3b3a8b621010de01a8d
cxxrtl: simplify generated edge detection logic.

This commit changes the way edge detectors are represented in
generated code from a variable that is set in commit() and reset in
eval() to a function that considers .curr and .next of the clock
wire. Behavior remains the same. Besides being simpler to generate
and providing more opportunities for optimization, this commit paves
way for unbuffering module inputs.
backends/cxxrtl/cxxrtl.cc