question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: should be able to instantiate a memory in a RawModule

See original GitHub issue

Type of issue: bug report

It used to be possible to instantiate a Mem or SyncReadMem in RawModule without an implicit clock. The 3.5 release broke this. Now you get a somewhat cryptic error message:

chisel3.internal.ChiselException: Error: No implicit clock.

If the current behavior is a bug, please provide the steps to reproduce the problem: Example from a real chisel project: https://scastie.scala-lang.org/zGQEY02JTBO3zYEtz6Mh5Q

What is the current behavior? Cryptic error message, then elaboration fails:

chisel3.internal.ChiselException: Error: No implicit clock.

What is the expected behavior?

The circuit should successfully elaborate as was the case with older Chisel releases.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mwachs5commented, Apr 1, 2022

So maybe this should have been an Option: https://github.com/chipsalliance/chisel3/pull/2333/files#diff-69a38113a9a1186347fec4aa8cdd4b0366b5bac9d5eb4aca99fcf98717844bf4R59

and if it fails we use a “None”, then the warning can say “None” was the implied clock…

1reaction
ekiwicommented, Apr 1, 2022

Was that actually a good thing? Conceptually, I’m not sure whether memories are valid without a clock associated with them?

The clocks are associated with the port. The code in my example instantiates a memory where the two ports are driven by different clocks. If you think about this in term of verilog, the variable declaration will not be associated with a clock, only the memory updates will be associated with clocks through a always @posedge clock block.

Read more comments on GitHub >

github_iconTop Results From Across the Web

freechipsproject/chisel3 - Gitter
RawModule is like a Verilog module and has no IO nor clock/reset. ... Does that mean, that in Chisel 3.6+, there will be...
Read more >
Is RawModule only for Top connections? - Stack Overflow
It seem's to works since I tryied to instanciate a Sync memory on the wishbone port. with this kind of code: class TopSpi2Wb...
Read more >
Chasing Memory Bugs through V8 and WebAssembly
If we are profiling the memory usage of WebAssembly modules, Memory instances should be our first suspect. They are basically large, ArrayBuffer ...
Read more >
fst/lib.rs at master · BurntSushi/fst - GitHub
This example shows how to create a set of strings in memory, ... Note that an error will be returned if a Levenshtein...
Read more >
fst - Rust - Docs.rs
This example shows how to create a set of strings in memory, and then execute ... an error will be returned if a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found