llvm / llvm/circt

[FIRRTL] BlackBoxMemory Pass Needs to Handle All Annotations

Open
#2,026 0 comments 0 reactions 0 assignees View on GitHub
bug FIRRTL
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

The `BlackBoxMemory` pass was updated to copy annotations from memories onto the blackboxed instance in f239be4cd23bb21a1a19854f5bdc325ddf953ec1. However, port annotations are currently being dropped.

Update this pass to copy over port annotations with the following strategy:
- An annotation on a memory port should be applied to all flattened ports associated with the original port
- An annotation on a specific field of a memory port should be copied to its respective flattened new port

Additionally, it may make more sense to copy annotations onto the external module as opposed to onto the instance (which is how f239be4cd23bb21a1a19854f5bdc325ddf953ec1) does it. One or the other should be entirely equivalent (from the perspective of preserving the information, though copying onto the module may be better).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the BlackBoxMemory pass and commit f239be4cd23bb21a1a19854f5bdc325ddf953ec1, which added memory annotation copying. Trace how memory ports and their fields are flattened, then ensure port annotations reach the associated flattened ports and verify whether copying to the external module or instance preserves the information.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.