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.

Why is ToMemIR restricted to at most 1 read or RW port?

See original GitHub issue

Type of issue: bug report | feature request

From ToMemIR.scala:

/** Annotates sequential memories that are candidates for macro replacement.
  * Requirements for macro replacement:
  *   - read latency and write latency of one
  *   - only one readwrite port or write port
  *   - zero or one read port
  */

ReplSeqMem seemed to be silently doing nothing/failing on sequential memories with >1 read port, so upon further investigation it turns out that ToMemIR has an artificial restriction (e.g. m.readers.length == 1) on the number of ports it supports.

Just as a local experiment, I lifted the port count restriction and nothing bad immediately jumped out (i.e. ReplSeqMem seems to create a blackbox memory with the right number of ports, indexed e.g. R0, R1, etc). Was there a particular reason that the pass is restricted to only 1 read or 1 write/rw port for a given memory?

The restriction is inherited from the original PR (#265) that introduced this functionality and a quick search through the history of this code + the original PR didn’t yield any obvious explanations.

What is the use case for changing the behavior? I wanted to use ReplSeqMem to blackbox a memory that turned out to have >1 read port but the pass silently ignored it until I dug a bit into the memory-replacement passes’ code in FIRRTL.

Impact: API addition (no impact on existing code)

Development Phase: request | proposal

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
kammohcommented, Jun 20, 2019

Is this issue on the radar at all? What is the recommended workaround to use dual-port memories?

3reactions
sequencercommented, Dec 15, 2019

@kammoh maybe only BlackBox can workaround 😦 just come across to this issue again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is ToMemIR restricted to at most 1 read or RW port? · Issue ...
ReplSeqMem seemed to be silently doing nothing/failing on sequential memories with >1 read port, so upon further investigation it turns out that ToMemIR...
Read more >
urban radio s
Abrams became one of the most influential and innovative FM programmers in the radio world. Read about the early days of Abrams, now...
Read more >
_ rr.l - Bibliothèque et Archives Canada
largest group of people in Ontario, nor the most powerful, but they are. "the first people to call this place home," Onley said...
Read more >
Full text of "A progressive German reader, adapted to the ...
1 1 lb or, that they ptieainstudy- L he is led on ( the most im- 50 25 00 84 60 ... he...
Read more >
otrl tn; Ii^^ m eve;;:;;::.4l5-l4l9 - DocPlayer.net
1 104 DUN-DYN EDMONTON Dunstiy Bartera r los st Dunse F T r ave Dunso R r st ... fi J 1 r...
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