chipsalliance / chipsalliance/chisel

InjectAspect issues when work with Mem

Open
#3,074 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
4.8k
Forks
658
Avg merge
18h 59m
Merged PRs (30d)
14

Description

**Type of issue**: Feature Request

**Is your feature request related to a problem? Please describe.**

I'm using [chisel3.aop.injecting.InjectAspect] to expose certain signals to vpi. An example is as below:

` InjectingAspect(
{ dut: DUT => Select.collectDeep(dut) { case core: Rocket => core } },
{
core: Rocket =>
chisel3.experimental.Trace.traceName(core.rocketImpl.rf_ex_reg_pc)
}
)`
Let's say we have a Module X with a Mem in it. Now I'd like to expose the write_enable signal inside the Mem. Since Mem is not a RawModule , InjectingAspect fails even if in fact I can collect the target Mem with Select.mems method. I have tried to collect the Module X and I find I can only have access to X.Mem(i) while the target signal is inaccessible either.

**Describe the solution you'd like**
Add API to inject Chisel code into Mem.

Contributor guide

Open the contributing guide

Research direction

Start with InjectingAspect and the Select.mems method described in the issue, then trace how module targets differ from Mem targets. The work is done when an API can inject Chisel code into a Mem and expose an internal signal such as write_enable, with coverage for the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.