Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 1, 2023

This is an automatic backport of pull request #3383 done by Mergify.
Cherry-pick of d79ae71 has failed:

On branch mergify/bp/3.6.x/pr-3383
Your branch is up to date with 'origin/3.6.x'.

You are currently cherry-picking commit d79ae71e7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/main/scala/chisel3/util/SRAM.scala

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/test/scala/chiselTests/Mem.scala

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com


Original PR Body

It is sometimes desirable to instantiate a memory with ports clocked with different clocks (e.g. clock domain crossing). This PR adds additional APIs to SRAM which allow users to drive ports using a sequence of clocks:

// Create a multi-clocked 3R, 2W SRAM
val mem = SRAM(
  1024, 
  UInt(8.W), 
  Seq(clock1, clock2, clock3), // Memory read port clocks
  Seq(clock4, clock5),         // Memory write port clocks
  Seq.empty                    // Memory read-write port clocks
)

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Feature (or new API)

Desired Merge Strategy

Squash

Release Notes

Add new SRAM APIs that take three Clock sequences as parameters instead of the number of read/write/read-write ports. This will sequentially instantiate a memory port for each clock in the Clock sequence and drive them accordingly.

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.5.x or 3.6.x depending on impact, API modification or big change: 5.0.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

This PR adds new APIs for the SRAM module to instantiate a number of ports connected to individual clocks. This allows the creation of memories driven by multiple clocks, for use cases like clock domain crossover.

(cherry picked from commit d79ae71)

# Conflicts:
#	src/test/scala/chiselTests/Mem.scala
@mergify mergify bot added Backport Automated backport, please consider for minor release bp-conflict labels Jul 1, 2023
@github-actions github-actions bot added the Feature New feature, will be included in release notes label Jul 1, 2023
@jared-barocsi jared-barocsi merged commit bde057a into 3.6.x Jul 6, 2023
@jared-barocsi jared-barocsi deleted the mergify/bp/3.6.x/pr-3383 branch July 6, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Automated backport, please consider for minor release bp-conflict Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants