Comments (7)
Point is, I can go around and fix this at a lower level, but that fundamentally might change the way you guys do your tests if you do correct for this somewhere that I'm not aware of...
from dsptools.
Also, nearly equals is insufficient for fixed point expects. I'm working on a better solution, which is essentially porting over my old Chisel2 DSPTester to here.
from dsptools.
Pull request #37 adds "toBigIntUnsigned" and "toDoubleFromUnsigned". Perhaps not the best names, but they convert between FixedPoint and unsigned integers (or rather, unsigned representations of the bits in a signed FixedPoint number). For our stuff, we have AXI everywhere, which abstracts all input/output types as UInts. The way I've written it works for FixedPoint up to 32.W I believe, but not any larger yet.
Also, in the same file (DspBlock.scala, which got moved to rocket-dsp-utils) we have a compareOutput def that compares two arrays. The intention is to just stream data in and out and wait to compare at the end. compareOutput lets you supply an "epsilon" as a "nearly equals". Future work will do more interesting comparisons, like noise analysis or more holistic "expect"s.
from dsptools.
My old tester basically allowed you to set tolerances for fixed point and real expects. Even for reals, you're going to be off by a fudge factor that grows as the computations complexity increases. For fixed point expects, I had a tolerance in terms of "how many LSBs" can be wrong. Noise analysis (done @ the block level, and not part of ChiselDSP) just took the Double out and compared to the real case (for SQNR).
I'm adding my expect functionality back into VerboseDspTester.
Re the unsigned stuff:
It would've made more sense to make all of these changes directly in DspTester, since not everyone will be starting out with the AXI interface.
There are 2 things I can do:
- Overhaul DspTester to handle signed stuff properly. I assume this affects your DspBlockTester.
- Make all of my changes to VerboseDspTester. You can choose to have your DspBlockTester extend it or not.
By overhaul, I mean move sign flipping to the appropriate tester. I should also be able to get it to work for Fixed > 32, since what they did in Chisel2 should work just fine.
What's your preference? @stevobailey @grebe
from dsptools.
Oh, tho frankly speaking, this might be an easier change @ the chisel-testers level... I'm just concerned that a PR will take ages to resolve there... [granted, I've already forked it...]. @chick do you have any opinions?
Basically, I need patches for these things in ~day timeframes...
from dsptools.
@shunshou I'd rather see stuff wind up in the DspTester where possible rather than a VerboseDspTester. @chick would be better able to tell you about chisel-testers, although I don't think it would take much longer to get stuff looked at.
from dsptools.
Ok well VerboseDspTester makes some amount of sense for my additional VerilogDumping features, and DspTester is kind of a hot mess right now [functionality is possibly correct, but things are a little all over the place...].
If you have some way to do a regression test, I can make changes in DspTester as long as your stuff doesn't break... I just posted an issue in chisel-testers.
from dsptools.
Related Issues (20)
- dsptools/blob/master/rocket/README.md links not working
- DspComplex[T].zero not initialized HOT 1
- Instantiating constants of type DspComplex[DspReal] HOT 7
- Compilation fails in scala 2.12.8 HOT 2
- Pokeable Typeclasses for Testers HOT 1
- Remove updateDependencies script
- Document Width Relationships for Operations
- Add -D flag for rocket source dependency
- Is there any plan to update the SAM module? HOT 1
- Issue with TileLink ready-valid logic in TLMasterModel HOT 2
- Run-time failures for DspComplex isLit()
- Read the docs
- rocket-dsptools DmaSpec test failure with current rocket-chip
- Working with large FixedPoint and Intervals should use BigDecimal not Double
- Set precision in div2 fixedpoint and interval may have provblems
- Update the link to numeric classes description HOT 2
- Failing Tests on 3.4.1 HOT 1
- example code not working
- Library conflict HOT 1
- Arithmetic between types
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 dsptools.