chipsalliance / chipsalliance/chisel

ShiftRegister implementation using SyncReadMem to support SRAM-based Shift Registers

Open
#2,889 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.**
For reasons of area and power efficiency, deeper and wider shift registers are usually implemented using single-port or dual-port SRAMs rather than with flip-flops. Support for dual-port SRAM implementation is available in [`ShiftRegisterMem`](https://github.com/ucb-bar/rocket-dsp-utils/blob/master/src/main/scala/craft/ShiftRegisterMem.scala) which resides outside the main Chisel repository and is also [broken](https://github.com/chipsalliance/chisel3/issues/2879). Besides, single-port SRAM implementation is still commented on.

**Describe the solution you'd like**
Ideally there should be a parameter similar to `useSyncReadMem` that is found in [`Queue`](https://github.com/chipsalliance/chisel3/blob/master/src/main/scala/chisel3/util/Decoupled.scala#L340) which will indicate whether the SyncReadMem-based Shift Register implementation will be used or the current one. Additionally a single/dual-port SRAM indicator could be supplemented.

**Describe alternatives you've considered**
It would be highly useful to have this implemented inside Chisel itself, either as an addition to existing [`ShiftRegister`](https://github.com/chipsalliance/chisel3/blob/master/src/main/scala/chisel3/util/Reg.scala#L50), or as a new `ShiftRegisterMem` object similar to the one in [rocket-dsp-utils](https://github.com/ucb-bar/rocket-dsp-utils).

**Additional context**
SRAM-based shift registers are used extensively and in my opinion should be supported inside Chisel itself.

**What is the use case for implementing this feature?**
There is a wide variety of use cases especially inside digital signal processing accelerators. Wherever the current [`ShiftRegisterMem`](https://github.com/ucb-bar/rocket-dsp-utils/blob/master/src/main/scala/craft/ShiftRegisterMem.scala) is used, a newly designed Shift Register should serve as drop-in replacement without the necessity to load the [craft](https://github.com/ucb-bar/rocket-dsp-utils/tree/master/src/main/scala/craft) package.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.