From e77355818069ad47ac00a5733c1f1513733ff085 Mon Sep 17 00:00:00 2001 From: Animesh Agrawal Date: Sat, 22 Jan 2022 13:24:09 -0800 Subject: [PATCH] Comment RocketConfigs and fft test --- .../src/main/scala/config/RocketConfigs.scala | 2 +- tests/fft.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/generators/chipyard/src/main/scala/config/RocketConfigs.scala b/generators/chipyard/src/main/scala/config/RocketConfigs.scala index a87eb6b7..8ccf698a 100644 --- a/generators/chipyard/src/main/scala/config/RocketConfigs.scala +++ b/generators/chipyard/src/main/scala/config/RocketConfigs.scala @@ -22,7 +22,7 @@ class TinyRocketConfig extends Config( new chipyard.config.AbstractConfig) 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 chipyard.config.AbstractConfig) diff --git a/tests/fft.c b/tests/fft.c index fbe36b48..cddfa6db 100644 --- a/tests/fft.c +++ b/tests/fft.c @@ -1,12 +1,14 @@ -#define FFT_WRITE_LANE 0x2000 -#define FFT_RD_LANE_BASE 0x2008 -// addr of read lane i is FFT_RD_LANE_BASE + i * 8 +/* This Test should be used with the fft generator config -- FFTRocketConfig. */ #include #include #include -// 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 is 2 * IOWidth since both real and imaginary components get IOWidth bits const uint32_t points[8] = { @@ -24,8 +26,8 @@ const uint32_t expected_outputs[8] = { 0x00000000, // read 0 0x00000000, // read 1 0x00000000, // read 2 - 0xffff0000, // read 3 - 0x00000000, // read 4 -- real portion is 0xff (very small negative number) + 0xffff0000, // read 3 -- real portion is 0xff (very small negative number) + 0x00000000, // read 4 0x00000000, // read 5 0x00000000, // read 6 0x05a8fa57, // read 7 -- real: ~5.656 imaginary: ~-5.656