dsptools | A Library of Chisel3 Tools for Digital Signal Processing | Audio Utils library
kandi X-RAY | dsptools Summary
kandi X-RAY | dsptools Summary
DSP Tools Development Environment.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dsptools
dsptools Key Features
dsptools Examples and Code Snippets
Community Discussions
Trending Discussions on dsptools
QUESTION
Recently, I have been studying DspContext and type classes in dsptools. I just ran a test code according to the tutorial. It shows how to add pipelines to mathematical operations. But I found this example didn't work as expected. Here is the code of example:
...ANSWER
Answered 2019-Jun-12 at 21:52In older versions of dsptools, your original code would have worked as you expected it to. However, it was often confusing to have +
behavior depend on if an implicit for the typeclass is present. If I recall correctly, seemingly innocuous changes to your imports could dramatically change your circuit's behavior.
The decision we ended up making was that if a chisel type has an operator, the typeclass should not change that behavior ever. If you want to use versions of the operators that use the context (pipelining, rounding, etc.), you have to use separate operators that all have context_
as a prefix. a + b
and a context_+ b
can't be confused.
I'm still not entirely satisfied with context_
as a prefix. Maybe we should add some shorthand for these operators, but I think clarity is more important than brevity in this instance.
QUESTION
I want to create some new number types that like DspReal for dsptools, such as DspPosit and DspQuire. DspPosit bases on posit which I have some Java code, and DspQuire bases on quire which is a kind of accumulator for posit. Because I just want to simulation now, so I have write many ScalaBlackBox for their operation like DspReal. However, I found that ScalaBlackBox can't construct sequential logic. For example, current output of the quire accumulator depends on it's input and last output. But ScalaBlackBox can't get the value of the output. In addition, step(n) also influences the output. Because accumulator will read its input per clock cycle.
I found some system problems of treadle. First, the function of ScalaBlackBox, twoOp and oneOp and so on, will be called many times. I don't know why. Second, step(n) is the function of PeekPokeTester, which can't be access by ScalaBlackBox. Third, I try to read current output but system gives errors.
...ANSWER
Answered 2019-Jun-07 at 21:19I believe most of your problems at this point are caused by mixing two different approaches. I think you should not be using BlackBoxImplmentation
because it is an older scheme used in with the firrtl-interpreter. Just use the ScalaBlackBox
and implement the methods as described in the wiki page Black Boxes and Treadle and shown in the TreadleTest BlackBoxWithState.
Don't use outputDependencies
, and instead specify any dependencies between inputs and outputs with with getDependencies
. inputChanged
will be called whenever an input IO is changed. So in that method you want to record or update the internal state of your black box. clockChange
will be called whenever a clock is changed and will provide the transition information so you can decide what happens then. Treadle will call getOutput
whenever it needs that output of your black box, since you will not have used outputDependencies
you can ignore the inputs and just provide the output value depending on your internal state.
I am still trying to reproduce a running version of your code here but it will be a little time for me to put it together, if you can try my suggestions above and let me know how it goes that would be helpful. I am interested in making this feature of Treadle better and easier to use so all feedback is appreciated.
QUESTION
I need to implement a custom type class for Complex DSP and Complex Ring operations. I'm aware about DspTools project, but purposely want to exclude it from consideration.
I've got a hardware module, which I want to instantiate with diff type classes: UInt, SInt, FixedPoint, Real and Complex(FixedPoint, FixedPoint).
Here's my minimal class:
...ANSWER
Answered 2019-Jan-10 at 23:31The issue is that Chisel needs fresh clones of any Data
when it recursively calls cloneType, and you're simply passing re
and im
to the Complex
constructor resulting in the exact same objects. Put a little more concretely:
QUESTION
I'm working on building a DSPComplex ROM still and have hit what I think may be an actual Chisel problem.
I've built the ROM, can generate a verilog output from the code that looks reasonable, but can't seem to test the module with even the most basic of testers. I've simplified it below to the most basic checking.
The error is a stack overflow like the following:
...ANSWER
Answered 2018-Dec-11 at 23:07This looks like a failure in the firrtl-interpreter (one of the Scala based Chisel simulator) which can have problems with a number of large firrtl constructs. If you have verilator installed can you try changing
QUESTION
I'm attempting to build a ROM-based Window function using DSPComplex and FixedPoint types, but seem to keep running into the following error:
...ANSWER
Answered 2018-Dec-06 at 22:46I think you should try using
QUESTION
I'm trying to deploy RegInit in a module with parametrized data types. Normally, for a simple port in Chisel I'd do the following:
...ANSWER
Answered 2018-Oct-02 at 01:17When I tried the above, I got 3 errors:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dsptools
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page