-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Labels
beginner friendlyA good target for undergrads to contribute to PyRTLA good target for undergrads to contribute to PyRTLenhancementProposed feature requests and improvementsProposed feature requests and improvements
Description
The pyrtl.optimize code is not eliminating "double not" conditions (reducing them to a single wire). Right now it does some more complex optimizations including CSE but this very simple case gets missed. You can see very clearly from the code below.
import pyrtl
a = pyrtl.Input(1,'a')
q = pyrtl.Output(1,'q')
q <<= ~(~(a))
pyrtl.synthesize()
with open('pre-optimize.svg','w') as f:
pyrtl.output_to_svg(f)
pyrtl.optimize()
with open('post-optimize.svg','w') as f:
pyrtl.output_to_svg(f)Metadata
Metadata
Assignees
Labels
beginner friendlyA good target for undergrads to contribute to PyRTLA good target for undergrads to contribute to PyRTLenhancementProposed feature requests and improvementsProposed feature requests and improvements