Unverified Commit 89ef4d78 authored by Chick Markley's avatar Chick Markley Committed by GitHub
Browse files

RawModule with no reset should be able to use withClock method. (#1065)

* RawModule with no reset should be able to use withClock method.
- refactor ClockAndReset
  - now has `clockOpt: Option[Clock]` and `resetOpt: Option[Reset]` constructor params
  - convenience methods clock and reset tries to deref the option
  - ClockAndReset.empty is factory method for (None, None)
- In Builder
  - forcedClock does not check resetOpt now
  - forcedReset does not check clockOpt now
- withClock no longer looks at resetOpt
- withReset no longer looks at clockOpt
- Module starts with empty ClockAndReset

* RawModule with no reset should be able to use withClock method.
Refactor again based on @ducky64 comments
- refactor away ClockAndReset, now builder just has a
  - currentClock
  - currentReset
- withClock, withRest, withClockAndReset just use these fields directly

* RawModule with no reset should be able to use withClock method.
- Fixed typo in withReset handler, now picks up new reset
parent df0e0b1c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment