Skip to content

Commit

Permalink
Merge pull request #259 from Readon/master
Browse files Browse the repository at this point in the history
Add description on translateWith and map function with chinese version update.
  • Loading branch information
Readon authored Jun 15, 2024
2 parents 3cae2f5 + c464730 commit 57f882b
Show file tree
Hide file tree
Showing 5 changed files with 501 additions and 447 deletions.
10 changes: 10 additions & 0 deletions source/SpinalHDL/Libraries/stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ Functions
| When cond is true, transaction are dropped
- Stream[T]
- 0
* - x.translateWith(that : T2)
- | Return a Stream with payload `that`
| Modify the payload of the `x` stream, while preserving the `valid` and `ready` signals
- Stream[T2]
- 0
* - x.map(translate: (T) => T2)
- | Return a Stream with payload calculated by translate function
| Modify the payload of the `x` stream, while preserving the `valid` and `ready` signals
- Stream[T2]
- 0


The following code will create this logic :
Expand Down
Loading

0 comments on commit 57f882b

Please sign in to comment.