Error: No implicit clock and reset

434 views
Skip to first unread message

niranjan soundararajan

unread,
May 8, 2018, 6:08:57 AM5/8/18
to chisel-users

[error] (run-main-0) chisel3.internal.ChiselException: Error: No implicit clock and reset.
[error] chisel3.internal.ChiselException: Error: No implicit clock and reset.
[error]      at chisel3.internal.throwException$.apply(Error.scala:13)
[error]      at chisel3.internal.Builder$.forcedClockAndReset(Builder.scala:228)
[error]      at chisel3.internal.Builder$.forcedClock(Builder.scala:230)
[error]      at chisel3.core.RegInit$.apply(Reg.scala:90)
[error]      at chisel3.core.RegInit$.apply(Reg.scala:80)


I see this when running my module. Any technique to get around this?

Thanks
Niranjan

Richard Lin

unread,
May 8, 2018, 2:49:53 PM5/8/18
to chisel...@googlegroups.com, niranjan soundararajan

As the error message says, you need an implicit clock and reset, which is provided when you're in a Module or withClockAndReset scope. In particular, experimental.RawModule does NOT provide an implicit clock and reset within its scope, so attempting to instantiate Reg in there will fail. Try placing the Reg call within a withClockAndReset scope.

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To post to this group, send email to chisel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/f2b04ebf-f158-4598-aac5-415dbbfe1f78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages