Comment RocketConfigs and fft test
This commit is contained in:
@@ -22,7 +22,7 @@ class TinyRocketConfig extends Config(
|
|||||||
new chipyard.config.AbstractConfig)
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
class FFTRocketConfig extends Config(
|
class FFTRocketConfig extends Config(
|
||||||
new fftgenerator.WithFFTGenerator(baseAddr=0x2000, numPoints=8, width=16, decPt=8) ++
|
new fftgenerator.WithFFTGenerator(baseAddr=0x2000, numPoints=8, width=16, decPt=8) ++ // add 8-point mmio fft at 0x2000 with 16bit fixed-point numbers.
|
||||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||||
new chipyard.config.AbstractConfig)
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
|
|||||||
14
tests/fft.c
14
tests/fft.c
@@ -1,12 +1,14 @@
|
|||||||
#define FFT_WRITE_LANE 0x2000
|
/* This Test should be used with the fft generator config -- FFTRocketConfig. */
|
||||||
#define FFT_RD_LANE_BASE 0x2008
|
|
||||||
// addr of read lane i is FFT_RD_LANE_BASE + i * 8
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
// from test_pts.py
|
#define FFT_WRITE_LANE 0x2000
|
||||||
|
#define FFT_RD_LANE_BASE 0x2008
|
||||||
|
// addr of read lane i is FFT_RD_LANE_BASE + i * 8
|
||||||
|
|
||||||
|
// from generators/fft-generator/test_pts.py (in the fft-generator repo)
|
||||||
// point size (and therefore integer width/uint32_t) determined by IOWidth from Tail.scala
|
// point size (and therefore integer width/uint32_t) determined by IOWidth from Tail.scala
|
||||||
// point size is 2 * IOWidth since both real and imaginary components get IOWidth bits
|
// point size is 2 * IOWidth since both real and imaginary components get IOWidth bits
|
||||||
const uint32_t points[8] = {
|
const uint32_t points[8] = {
|
||||||
@@ -24,8 +26,8 @@ const uint32_t expected_outputs[8] = {
|
|||||||
0x00000000, // read 0
|
0x00000000, // read 0
|
||||||
0x00000000, // read 1
|
0x00000000, // read 1
|
||||||
0x00000000, // read 2
|
0x00000000, // read 2
|
||||||
0xffff0000, // read 3
|
0xffff0000, // read 3 -- real portion is 0xff (very small negative number)
|
||||||
0x00000000, // read 4 -- real portion is 0xff (very small negative number)
|
0x00000000, // read 4
|
||||||
0x00000000, // read 5
|
0x00000000, // read 5
|
||||||
0x00000000, // read 6
|
0x00000000, // read 6
|
||||||
0x05a8fa57, // read 7 -- real: ~5.656 imaginary: ~-5.656
|
0x05a8fa57, // read 7 -- real: ~5.656 imaginary: ~-5.656
|
||||||
|
|||||||
Reference in New Issue
Block a user