Comments (2)
Sorry to open this issue again (should I start a new one?), but further implementing the width adapter, I noticed the dataMask is not available when using the make
convenience methods as the Area, containing the datamask, is not returned.
I worked around it by defining my own make
functions as below, but I'm not so satisfied by the style.
class StreamFragmentWA
object StreamFragmentWA {
def apply[T <: Data,T2 <: Data](input : Stream[Fragment[T]],output : Stream[Fragment[T2]], endianness : Endianness, earlyLast : Boolean = false): Bits = {
StreamFragmentWA(input, output, endianness, false, earlyLast)
}
def apply[T <: Data,T2 <: Data](input : Stream[Fragment[T]],output : Stream[Fragment[T2]], endianness : Endianness, padding : Boolean, earlyLast : Boolean): Bits = {
StreamFragmentWidthAdapter(input, output, endianness, padding, earlyLast).dataMask
}
def make[T <: Data, T2 <: Data](input : Stream[Fragment[T]], outputPayloadType : HardType[T2], endianness : Endianness, earlyLast : Boolean) : (Stream[Fragment[T2]], Bits) = {
val ret = Stream(Fragment(outputPayloadType()))
val mask = StreamFragmentWA(input,ret,endianness,false,earlyLast)
(ret, mask)
}
}
The in my module I write
val (axi_stream, axi_mask) = StreamFragmentWA.make(fifo.io.pop,
Bits(io.axi.config.dataWidth bits),
LITTLE,
earlyLast = true)
from spinalhdl.
Hmm what's about adding it to StreamFragment, but with an alternative name ?
makeWithMask ?
(PR welcome) ^^
from spinalhdl.
Related Issues (20)
- Axi4Stream user signal width should not be multiplied by data width HOT 1
- The wave reload question of VCS simulation HOT 5
- Is there any way to add delay at assignment? HOT 5
- Pipeline API `throwWhen(usingReady = true)` doesn't drop transaction when conflicting with prior `halt` HOT 1
- ClockDomain for input/output ports? HOT 10
- question about mem initialization HOT 11
- How to generate RTL with parameters? HOT 2
- StreamMux with streamed select no correct join HOT 9
- WishboneSlaveFactory - doWrite is never called in pipelined mode HOT 3
- Wishbone BusIf SEL usage HOT 1
- Formal verifiation: SymbiYosys of SpinalTemplateSbt fails with "RG_WIDTH > 1 is not support by async2sync, use clk2fflogic." when using async reset
- Formal verification: Verilog generated when using synchronous resets is not understood by SymbiYosys HOT 10
- Set clock domain from blackbox HOT 2
- Error when create a new ClockDomain in simulation HOT 2
- SystemVerilog Interface Support HOT 2
- NamedType returns null when called outside of a Component HOT 11
- AxiLite4SlaveFactory generates combinatorial paths from inputs to ready outputs HOT 5
- Signal naming oversights HOT 3
- `onSamplings` error when use inside clockdomain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spinalhdl.