-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0notes-fft.txt
More file actions
1482 lines (1117 loc) · 41.9 KB
/
Copy path0notes-fft.txt
File metadata and controls
1482 lines (1117 loc) · 41.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1907
FIX LINT ERRORS see lint/0notes-lint.txt
LATER:
- note FAILURE in log; should be reflected in summaries
% grep FAIL tst/regress/examples/190703.log
ver 8 4 1port FAIL - 4 warnings, 0 lint problems -
==============================================================================
1907
TODO
- create some issues
- pointer to tst/regress in top-level README and/or tst/README
NEXT
- fix verilator regressions
- fix lint errors
- clean up below
TODO
- golden_test leaves behind /tmp trash:
lsl gold*
-rw-r--r-- 1 steveri users 2484 Jul 2 15:04 golden_test_32_1_dpump.log
-rw-r--r-- 1 steveri users 51 Jul 2 15:07 golden-test_summary.1347
-rw-r--r-- 1 steveri users 51 Jul 2 15:04 golden-test_summary.28574
DONE
- change lint-warnings to %5d in regress.sh DONE
- does it clean up after itself in /tmp? No but see 0notes
- check it in I guess DONE
- start an endless job NICE 16 maybe from $fftgen dir somewheres maybe
- rename "regress.sh" "do_one_random_test.sh" ?
- clean up ~/tmp.daily*
- okay, looks pretty good, let's go home
LATER
- need support for n_units = (0.25, 0.5) in golden_test.csh
TODO someday
- combine do_one_random_test, golden_test
- what does regress do that gold test doesn't?
-- git clone setup
-- choose random parms
-- final test filter
------------------------------------------------------------------------------
1906
DOING
- regressions are running, see ~/tmp.daily_regressions.dev
- Cleaning this file, search "CLEAN TO HERE"
TODO
- add notification to regressions, start them running every night
- daily travis test
- add test timings to regressions etc
../bin/golden_test.csh -sim verilator |& tee test_results.log | egrep 'PASS|FAIL|ERR'
TODO SOON
- golden_test makes a HUGE mess in /tmp:
ls -lt /tmp | head
total 5244116
-rw-r--r-- 1 steveri users 594207461 Jun 26 09:51 test_1024_4_dpump.log
drwxr-xr-x 8 steveri users 160 Jun 26 09:50 par-steveri/
-rw-r--r-- 1 steveri users 2210 Jun 26 09:50 golden-test_summary.5191
-rw-r--r-- 1 steveri users 73912 Jun 26 09:50 golden_test_1024_2_1port.log
-rw-r--r-- 1 steveri users 24033 Jun 26 09:50 test_8_1_1port.log
-rw-r--r-- 1 steveri users 606321748 Jun 26 09:49 test_1024_2_1port.log
-rw-r--r-- 1 steveri users 73912 Jun 26 09:48 golden_test_1024_1_1port.log
-rw-r--r-- 1 steveri users 624111499 Jun 26 09:47 test_1024_1_1port.log
-rw-r--r-- 1 steveri users 37046 Jun
Move DONE/OLD/NOTES (see below) to archives 0notes-fft-1906.txt or something maybe
TODO NOW
- clean up below
- cron job for fft tests inc. vcs
- set up a nightly cron job
- LINT CLEAN for verilator (first), then vcs
- golden_test exit codes, see below
- golden_test(s) should have correct exit code depending on PASS/FAIL
TODO
- verilator still generates waveforms named "counter", right? thats-a no good
- test README in a clean directory
- grep everywhere for FIXME, TODO
- clean up gt8k nonsense, see below etc.
- update bin/README
- add dependences to README, maybe see slang for template https://github.com/MikePopoloski/slang
LATER 1906
- "make bigtest", see below
- what do we do with fptest3.awk? Maybe "make fptest"
- clean up ./archives => ~/fft/archives
- bin/simv_analysis should move to tst/bin probably
- may need to rethink test dir(s)
-- e.g. bin/simv_analysis should move to tst/bin or something
- more tests, see "moar tests" below
LATER 1905
- move repo to genesis2?
- separate fpu repo etc
- separate "tst" directory and Makefile for extensive tests, yes?
-- hmm maybe not, remember already have a 'tst' directory...?
- Need "examples/README" telling how examples are generated
- should rtl/ subdir be renamed gsource/ or something?
MAKE TEST_BIG or MAKE BIGTEST
golden_test is capable of bigger tests (takes longer), search for
"gt8k" in golden_tests.csh...maybe put them in a cron job...
TODO golden_test exit codes
test golden_test exit codes with goal of getting rid of this in travis script:
> # Here's a tricky thing...it passes when it fails and it fails when it passes :(
> # Also---FIXME---above command should be responsible for PASS/FAIL exit codes
> - egrep 'FAIL|ERR' test_results.log && exit 13 || exit 0
1906 haha at long last, all tests pass
ADD TO bin/README
------------------------------------------------------------------------------
GOLDEN TESTS csh vs. pl
# To build and check a new simv.log from scratch:
../bin/golden_test.csh 8 1 1port |& tee gold.log$i | tail
# To check an existing simv.log:
../bin/golden_test.pl 8 1 1port |& tee gold.log$i | tail
------------------------------------------------------------------------------
MOAR TESTS
Used to have a test/ subdir with the following Makefile. What do we do with this now?
# ------------------------------------------------------------------------------
# test_64_1_1port: cleanall
# ../bin/golden_test.csh 64 1 1port |& tee gold_64_1_1port.log
# cp /tmp/test_64_1_1port.log test_64_1_1port.log
#
# fptest_64_1_1port: test_64_1_1port.log
# ../bin/fptest3.awk test_64_1_1port.log |& egrep ' (true|false)' | sort | uniq
#
#
#
# test_8_1_1port: cleanall
# ../bin/golden_test.csh 8 1 1port |& tee gold_8_1_1port.log
# cp /tmp/test_8_1_1port.log test_8_1_1port.log
#
# fptest_8_1_1port: test_8_1_1port.log
# ../bin/fptest3.awk test_8_1_1port.log |& egrep ' (true|false)' | sort | uniq
# ------------------------------------------------------------------------------
------------------------------------------------------------------------------
FIXME add to README somewhere (tst/ subdir maybe):
To test clocks (from deleted bin file "test0_clock.csh"
make clean; make gen TOP=clock; make run TOP=clock
STATUS 20 jun 2019
cd regression; ../bin/golden_test.csh -sim vcs
all 47 vcs tests PASS
cd regression; ../bin/golden_test.csh -sim verilator
19 1port tests PASS
19 2port tests FAIL
9 dpump tests PASS
47 tests total
==============================================================================
20 jun 2019
- debugging, see doc/debugging-1906.txt
STATUS 20 jun 2019
so this happened:
cd fftgen/regressions
../bin/golden_test.csh -sim verilator 8 1 1port |& tee 811_verilator.log
1/1 tests PASSED
------------------------------------------------------------------------------
STATUS 14 jun 2019 all regression tests pass (vcs):
mkdir regression; cd regression
../bin/golden_test.csh >& gold.log &
tail -f gold.log | egrep 'PASS|ERR'
HOLY CRAP it's gonna pass
So maybe everything works with vcs and bsr
So what's next?
- check everything in
- see where we are with the verilator
HOWTO do a quick test maybe (does this work?) (vcs)
mkdir build
alias mf='make -f ../Makefile'
cd build
mf TEST8
CLEAN TO HERE ===============================================================
------------------------------------------------------------------------
HOWTO check vcs/rtl
i=1
diff -r ../verilator/rtl rtl | less
vcs -sverilog +cli +lint=all,noVCDE +libext+.v -notice -full64 \
+v2k -debug_pp -timescale=1ps/1ps \
+noportcoerce +vcs+lic+wait -licqueue -ld gcc -top top_fft \
-y /hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ \
+incdir+/hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ \
-y ./rtl/ +incdir+./rtl/ -f fft.vf | tee vcs.log$i | tail
simv +vcs+dumparrays |& ../bin/bsr.awk %9.6f | tee simv.log$i | tail
diff simv.log$i simv.log0
sort simv.log5 > simv.sorted5
sort simv.log$i > simv.sorted$i
diff simv.sorted{2,$i} | h40
cp fft.vcd fft.vcd$i
diff fft.vcd0 fft.vcd$i | h40
cp simv.log$i simv.log
../bin/golden_test.pl 8 1 1port |& tee gold.log$i | tail
------------------------------------------------------------------------
LATER consider renaming sradd, srsub... fpadd_sr, fpsub_sr etc
- clean up snapshots ~/fftgen* maybe
- clean up fftgen maybe
TODO FIX SRAM'S!!!
- use standard async design
- move all weird clocking to SRAM driver :(
verilator -Wno-fatal -Wall --cc ${top} --exe ${cpp} --trace -y ${vdir} \
|& tee verilator.log$i | less
------------------------------------------------------------------------
HOW-TO verilator - SETUP
cd $fft/verilator
top=rtl/top_fft.v; cpp=fft.cpp; vdir=rtl/
echo $top $cpp $vdir
HOW-TO verilator - RUN
i=4
echo mv obj_dir obj_dir`expr $i - 1`
verilator -Wno-fatal -Wall --cc ${top} --exe ${cpp} --trace -y ${vdir} \
|& tee verilator.log$i | less
make -j -C obj_dir/ -f Vtop_fft.mk Vtop_fft |& tee make.log$i | less
obj_dir/Vtop_fft |& ../bin/bsr.awk %9.6f\
| egrep -v 'srmul|FPU' \
| sed 's/^TOP.v/top_fft/' \
| tee fft.log$i | less
------------------------------------------------------------------------
clean to here
==============================================================================
DONE 1906
DONE 1906
REBOOT------------------------------------------------------------------
------------------------------------------------------------------------
VERILATOR VERSION
cd verilator
cp -rp ../811vcs/rtl .
copy fft.cpp from old verilator directory, check it for errors etc.
update top_fft, refer to old verilator
cd rtl
cp top_fft.v top_fft.v.vcs
cp ../../verilator.round1/rtl/top_fft.v top_fft.v.ver1
chmod -w top_fft.v.*
------------------------------------------------------------------------
VCS VERSION
TODO
- fix up 881vcs
-- alter 'make test8' to build fft.vcd maybe
-- alter 'Makefile' to build fft.vcd maybe
cd $fft
make test8
mv tmpXXX/ 811vcs/
THEN
- have to (re)build vcd file correctly now :(
vcs -sverilog +cli +lint=all,noVCDE +libext+.v -notice -full64 \
+v2k -debug_pp -timescale=1ps/1ps \
+noportcoerce +vcs+lic+wait -licqueue -ld gcc -top top_fft -y \
/hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ \
+incdir+/hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ -y \
./rtl/ +incdir+./rtl/ -f tmp.vf | tee vcs.log | tail
simv +vcs+dumparrays |& tee simv.log | tail
cd $fft
make test8
TODO
- document memory array / vcd stuff?
------------------------------------------------------------------------
HOWTO dump memory arrays to vcd file:
In clock_unq1.v:
initial begin
$dumpon;
$dumpfile("fft.vcd");
end
IN vcs command line: nothing. no memcbk, no dumpvars, no nothing
Example vcs command that works
vcs -sverilog +cli +lint=all,noVCDE +libext+.v -notice -full64 \
+v2k -debug_pp -timescale=1ps/1ps \
+noportcoerce +vcs+lic+wait -licqueue -ld gcc -top top_fft \
-y /hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ \
+incdir+/hd/cad/synopsys/dc_shell/latest/packages/gtech/src_ver/ \
-y ./rtl/ +incdir+./rtl/ -f tmp.vf | tee vcs.log | tail
simv +vcs+dumparrays |& tee simv.log | tail
For things that did NOT work see $fft/archives/vcd-mem-thrashing.txt
------------------------------------------------------------------------
next: CLEAN UP!!!
/cad/synopsys/vcs/I-2014.03-2/doc/UserGuide/pdf/vcs.pdf
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
# npoints="top_fft.n_fft_points=8"
# nbutts="top_fft.units_per_cycle=1"
# sram="top_fft.SRAM_TYPE=TRUE_1PORT"
# alg="top_fft.swizzle_algorithm=round7"
# echo GENESIS_PARAMS="$npoints $nbutts $sram $alg"
#
# # make -f ../bin/../Makefile \
# make \
# clean gen TOP=fft \
# GENESIS_PARAMS="$npoints $nbutts $sram $alg" \
# >& test_8_1_1port.log
#
# ../bin/golden_test.pl 8 1 1port |& tee gold.log$i | less
==============================================================================
TODO
- NO INITIAL BEGINS right?
- start should stay high for a full cycle maybe why not
- reset should be generated in top_fft.v, yes?
awk -f ../bin/process_test5.awk ncsim.log >& ncsim.processed
NEXT
- log convergence, see TODO CONVERGENCE below
- then back to "CHECK ANSWERS" then "ADV COMPARE"
TODO CONVERGENCE - fft.log, ncsim.log convergence (converge verilator, ncsim logs)
- debugging
- works like this:
- compare fft.log$i to ncsim.log
- squelch diffs
- repeat
LATER
- work on regression tests for verilator
- clean up / rename the other todo's
- consider replacing todo's with github issues maybe
- WOW really need to clean up bin/ directory
- haha fft.cpp opens "counter.vcd"
DONE 1906
- got rid of 13's checked the answer (round2 i=4)
- time to snapshot to next i i guess
- golden test (ADV. COMPARE) and "CHECK ANSWERS" failed miserably
(see below), so back to log convergence
------------------------------------------------------------------------
HOW-TO - SETUP
cd $fft/verilator
top=rtl/top_fft.v; cpp=fft.cpp; vdir=rtl/
HOW-TO - RUN
i=4
echo mv obj_dir obj_dir`expr $i - 1`
verilator -Wno-fatal -Wall --cc ${top} --exe ${cpp} --trace -y ${vdir} \
|& tee verilator.log$i | less
make -j -C obj_dir/ -f Vtop_fft.mk Vtop_fft |& tee make.log$i | less
obj_dir/Vtop_fft |& ../bin/bsr.awk %9.6f\
| egrep -v 'srmul|FPU' \
| sed 's/^TOP.v/top_fft/' \
| tee fft.log$i | less
HOW-TO - CHECK ANSWERS
awk -f ../bin/process_test5.awk ncsim.log >& ncsim.processed; tail ncsim.processed
awk -f ../bin/process_test5.awk fft.log$i >& fft$i.processed; tail fft$i.processed
HOW-TO - ADVANCED COMPARE
cp fft.log$i simv.log
../bin/golden_test.pl 8 1 1port |& tee gold.log$i | less
DONE
- see if golden-test works NOPE
- if not, continue with TODO CONVERGENCE below
SRAM restore did not work
Compare fft.log2, ncsim.log...looks pretty good, no?
f=`diff -r rtl round1/rtl4 -q | grep differ | awk '{print $2}'`
echo $f
mkdir rtl$i
cp $f rtl$i/
PLAN:
- capture what you got
- increment i
- try restoring SRAM_unq[1234], output should not change
- document EVERYTHING
- sleep
WOW this looks promising
can we capture what we got so far?
- main thing was we restored fftctl
- maybe try restoring SRAM_unq[1234]
thingsa lookin GOODY! NEXT:
- save all changes
- continue w/same i
TODO ZERO - modify rtl to emit bsr's instead of 13.13's
- save existing state to round1
- ready round 2: see how-to, above
- once 13.13's have been purged:
cd $fft/verilator
../bin/bsr.awk < fft.log$i > fft.log$i.bsr
diff fft.log$i fft.log$i.bsr
TODO ONE
- compare new to old fft logs
-- looks like verilator log is $fft/verilator/fft.log6
--
-- verilator simv > t64_verilator.log.raw
-- bin/bsr.awk < t64_verilator.log.raw > t64_verilator.log.bsr
-- gunzip -c $fft/test/examples/test_64_1_1port.log.gz > t64_ncsim.log
-- diff t64_ncsim.log t64_verilator.log.bsr
-- probably won't match, go on to TODO TWO anyway
TODO TWO
- merge verilator, ncsim code, use regression tests to stay on track
DONE
- bin/bsr.awk works maybe
------------------------------------------------------------------------------
time to make verilator work!!!
1. build genesis_verif using simplest 8-1-1 test
2. try this:
cd verilator
alias mf='make -f ../Makefile'
npoints="top_fft.n_fft_points=8"
nbutts="top_fft.units_per_cycle=1"
sram="top_fft.SRAM_TYPE=TRUE_1PORT"
alg="top_fft.swizzle_algorithm=round7"
make -f ../bin/../Makefile \
clean gen TOP=fft \
GENESIS_PARAMS="$npoints $nbutts $sram $alg" \
>& test_8_1_1port.log
------------------------------------------------------------------------------
STATUS 1905
- new fpu seems stable, works on 47 fft regressions, see rtl/lib/0notes-fpu.txt
- maybe put fpu in rtl/fpu or rtl/lib/fpu instead of rtl/lib or something maybe
TODO
- also see rtl/lib/0notes-fpu.txt
- ELIMINATE LINT ERRORS!!!
- test and see if still works with designware maybe
- PORT TO VERILATOR!
- also do a system test /complete runthrough i.e. clone from scratch and see if it works
HOW TO RUN REGRESSIONS
- cd regressions; make regress
HOW TO RUN A SINGLE FFT TEST (should say "1/1 tests PASSED")
- cd test; make
- OR cd test; make test_64_1_1port
HOW TO TEST THE FPU
- cd test; make fptest_64_1_1port
- OR cd test; make test_64_1_1port; ../bin/fptest3.awk test_64_1_1port.log
# Sample output:
# % fptest3.awk test_128_1_1port.log$i |& less
# ...
# fptest o2i.FPU.SUB (0.414214 - 1.082392) = -0.668179 true
# fptest o2i.FPU..SUB (-0.414214 - -1.082392) = 0.668179 true
# fptest o1i.FPU..ADD (-0.414214 + -1.082392) = -1.496606 true
# fptest o2r.FPU..SUB (1.000000 - 0.000000) = 1.000000 true
# fptest o1r.FPU..ADD (1.000000 + 0.000000) = 1.000000 true
# fptest t2.FPU..ADD (-0.923880 + -0.158513) = -1.082392 true
# fptest t1.FPU.ADD (0.382683 + 0.382683) = 0.765367 true
# top_fft.BFLY0 t5 ------------------------
# ...
DONE
- debug 128 1 dpump or whatever
-
STATUS 5/25
- verified the following for srsub 4-1, 4-3, 1-4, 3-4
- appears to have successfully PASSED golden_test.csh 64 1 1port
- appears to have FAILED 128 1 dpump
CONTEXT
cd github/fftgen/tmp.regress
egrep 'PASS|ERR' log2 | less
NEXT
- debug 128 1 dpump or whatever
- try regression tests i guess FAILES
- see rtl/lib/0notes-fpu.txt
- clean up below
STATUS
- fft currently broken i think b/c fpu
-- cd build; mf cleanall; ../bin/golden_test.csh 8 1 1port |& tee tmp.log0
-- also see build/round4/
- working on fpu, see rtl/lib/0notes-fpu.txt
NEXT
- check it in!
- then: continue debugging
DONE
- move all to github READY!!! -> IN PROGRESS -> DONE
-- offload docs => /home/steveri/projects/fft/doc/ DONE
-- move everything I guess, but first get rid of big trash maybe
DEBUGGING
alias mf='make -f ../Makefile'
cd build
mf cleanall
i=8
../bin/golden_test.csh 8 1 1port |& tee tmp.log$i
cp /tmp/test_8_1_1port.log test_8_1_1port.log$i
less test_8_1_1port.log$i
diff tmp.log[78]
DEBUG; check in
etc.
Clean up golden_test output:
cd build; ../bin/golden_test.csh 8 1 1port |& tee tmp.log
first problem: weird path name
make -f ../bin/../Makefile clean ...
NEXT?
- clean up README.txt
- README.txt => README.md ?
- try out README etc.
- clean up below
LATER
- gui???
make -f ../bin/../Makefile clean gen TOP=fft
GENESIS_PARAMS="top_fft.n_fft_points=32 top_fft.units_per_cycle=2
top_fft.SRAM_TYPE=TRUE_1PORT top_fft.swizzle_algorithm=round7" >&
/tmp/test_32_2_1port.log
Make notes in 0notes.txt
Publish to README.md
Also see ~/0notes/fftgen-2019.txt
FFTGEN_DIR=`pwd`
mkdir build/
cd build/
make -f $FFTGEN_DIR/Makefile gen
c; bin/golden_test.csh 32 2 1port |& tee golden_test_32_2_1port.log
unlinked: github -> /nobackup/steveri/github/fftgen/
TODO
- need some way to run in subdirectory
-- i.e. separate "build" subdirectory? should start out empty, yes?
thing to try:
c; bin/golden_test.csh |& tee golden_test_all.log
TODO
- README.txt => README.md
- README_files.txt => ???
8 may 2019
c; bin/golden_test.csh 32 2 1port |& tee golden_test.log2
Seems to be working(!!!)
- deleted this from makefile: "export VCS_ARCH_OVERRIDE=linux"
TODO
- seems like there should be a bin/setup_vcs.sh ??
1. Need a working Genesis2 in your path. This will check for that:
which Genesis2
source bin/setup_genesis.sh
export PATH=.:/home/steveri/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/cad/common/Linux/x86_64/bin:/cad/synopsys/vcs/O-2018.09-SP1/bin:/cad/synopsys/vcs/O-2018.09-SP1/gui/dve/bin:/tmp/Genesis2/Genesis2Tools/bin:/tmp/Genesis2/Genesis2Tools/gui/bin
2. Need Synopsys' vcs tool in your path. On kiwi:
(TODO should be a bin/setup_vcs.sh, yes?)
which vcs
source /cad/modules/tcl/init/sh
module load base
module load vcs
export PATH=.:/home/steveri/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/cad/common/Linux/x86_64/bin:/cad/synopsys/vcs/O-2018.09-SP1/bin:/cad/synopsys/vcs/O-2018.09-SP1/gui/dve/bin
vcs -full64 -help | head
3. Now give it a shot, now that you're set up and all:
bin/golden_test.csh 32 2 1port
7 may 2019
This is the fftgen directory ~/chipgen/fftgen
To run exhaustive regression test on kiwi (? not yet verified)
kiwi% bin/switch.csh # Result should be "round7"
kiwi% source bin/setup_stanford.bashrc
kiwi% ~/fftgen/bin/golden_test.csh # Default, see above
kiwi% ~/fftgen/bin/golden_test.csh 8 1 1port # For single test
kiwi% ~/fftgen/bin/golden_test.csh -abbrev # For D={8,16,32} only
kiwi% ~/fftgen/bin/gt8k.csh # For D=(8,8192,4096,2048) only
**** Note 6/2019 switch.csh, gt8k.csh no longer used
**** gt8k.csh was just a symlink to golden_test.csh
**** switch.csh simply set env var "SCHED_ALG" to e.g. "round7" or "mod_bn_combo"
------------------------------------------------------------------------
16 Jul 2014
This is the fftgen directory.
No longer using symbolic link to fft_scheduler_{old,new}; use
environment variable SCHED_ALG i.e. to access the old regime e.g.
setenv SCHED_ALG mod_bn_combo
bin/test_scheduler.pl > tstest2.mod_bn_combo
diff tstest[02].mod_bn_combo
To test the scheduler in standalone mode, can do:
unsetenv SCHED_ALG (defaults to new 'round7' algorithm)
bin/test_scheduler.pl > tstest2.round7
diff tstest[02].round7
To run exhaustive regression test:
kiwi% switch.csh -n # Result should be "new"
kiwi% source ~/gui/configs/setup_stanford.cshrc
kiwi% ~/fftgen/bin/golden_test.csh # Default, see above
kiwi% ~/fftgen/bin/golden_test.csh 8 1 1port # For single test
kiwi% ~/fftgen/bin/golden_test.csh -abbrev # For D={8,16,32} only
kiwi% ~/fftgen/bin/gt8k.csh # For D=(8,8192,4096,2048) only
**** Note 6/2019 switch.csh, gt8k.csh no longer used
**** gt8k.csh was just a symlink to golden_test.csh
**** switch.csh simply set env var "SCHED_ALG" to e.g. "round7" or "mod_bn_combo"
Also, new golden test incorporates choice of algorithm. New
formal-proof algorithm 'round7' is now the default; to use old
previously-correct-ish version specify 'mod_bn_combo' use command-line
switch "-alg mod_bn_combo" algorithm, e.g.:
For old algorithm, do e.g.:
kiwi% switch.csh -n # Result should be "old"
kiwi% ~/fftgen/bin/golden_test.csh -alg mod_bn_combo
kiwi% ~/fftgen/bin/golden_test.csh -alg mod_bn_combo 8 1 1port
kiwi% ~/fftgen/bin/golden_test.csh 8 1 1port mod_bn_combo
kiwi% ~/fftgen/bin/golden_test.csh -alg mod_bn_combo -abbrev
kiwi% ~/fftgen/bin/gt8k.csh -alg mod_bn_combo
**** Note 6/2019 switch.csh, gt8k.csh no longer used
**** gt8k.csh was just a symlink to golden_test.csh
**** switch.csh simply set env var "SCHED_ALG" to e.g. "round7" or "mod_bn_combo"
To analyze simv.log, try:
set b=~/fftgen/bin/simv_analysis
c ; $b/analyze_reads_and_writes.pl -d simv.log |\
$b/summarize_reads_and_writes.pl | egrep -v '^IGNORE|BB|wr' |\
uniq | sed 's/.*BREAK//' | less
------------------------------------------------------------------------
13 Jul 2014
As of 7/15 (p4 change 12008) both versions (old/mod_bn_combo,
new/round7) pass all std "golden_test" tests, and the gui works for at
least two configs "8 1 1" (13 cy) and "1024 4 1" (1281 cy).
------------------------------------------------------------------------------
3 Jul 2014
To see if the fft generator works, maybe try bin/golden_test.csh
(probably only works from kiwi).
Default is (1,2)ports x (1,2,4)butterflies x (8,16,32...1024)datapoints
kiwi% source ~/gui/configs/setup_stanford.cshrc
kiwi% ~/fftgen/bin/golden_test.csh # Default, see above
kiwi% ~/fftgen/bin/golden_test.csh 8 1 1port # For single test
kiwi% ~/fftgen/bin/golden_test.csh -abbrev # For D={8,16,32} only
kiwi% ~/fftgen/bin/gt8k.csh # For D=(8,8192,4096,2048) only
**** Note 6/2019 switch.csh, gt8k.csh no longer used
**** gt8k.csh was just a symlink to golden_test.csh
**** switch.csh simply set env var "SCHED_ALG" to e.g. "round7" or "mod_bn_combo"
Prev simv.log appears to be for nunits=4 and npoints=2048. Let's try duplicating that:
% mkdir old; mv simv* old; mv old old_simv
% source ~/gui/configs/setup_stanford.cshrc
% bin/golden_test.csh 2048 4 1port
% diff simv.log old_simv/simv.log
Is it possible I haven't done development work since May 2013?
% ls -ltd ~/fftgen/simv*
-rw-r--r-- 1 steveri users 5599428 Jul 15 2013 simv.log
drwxr-xr-x 2 steveri users 4096 May 25 2013 simv.daidir/
-rwxr-xr-x 1 steveri users 14450733 May 25 2013 simv*
drwxr-xr-x 2 steveri users 4096 May 25 2013 simv.vdb/
-rw-r--r-- 1 steveri users 231103 Feb 6 2013 simv.0
------------------------------------------------------------------------
OLD 1906
# HOWTO convert vpd to vcd - use 'vpd2vcd'
# DON'T NEED anymore, generate vcd directly, see above.
#
# Synopsys waveform viewer:
# dve -vpd vcdplus.vpd
#
# BUT we don't generate vpd files no more
#
------------------------------------------------------------------------------
NO! omg they're all backwards :(
# NO cp ../verilator/rtl/addsub.v rtl/addsub.v
# NO cp rtl/butterfly_unq1.v ../verilator/rtl/butterfly_unq1.v
# NO cp rtl/fftram_unq1.v ../verilator/rtl/fftram_unq1.v
# NO cp rtl/sradd.v ../verilator/rtl/sradd.v
# NO cp rtl/SRAM_unq1.v ../verilator/rtl/SRAM_unq1.v
# NO cp rtl/SRAM_unq2.v ../verilator/rtl/SRAM_unq2.v
# NO cp rtl/SRAM_unq3.v ../verilator/rtl/SRAM_unq3.v
# NO cp rtl/SRAM_unq4.v ../verilator/rtl/SRAM_unq4.v
# NO cp rtl/srmul.v ../verilator/rtl/srmul.v
# NO cp rtl/srsub.v ../verilator/rtl/srsub.v
DONE
# cp verilator/rtl/butterfly_unq1.v vcs/rtl/butterfly_unq1.v
# cp verilator/rtl/fftram_unq1.v vcs/rtl/fftram_unq1.v
# cp verilator/rtl/sradd.v vcs/rtl/sradd.v
# cp verilator/rtl/SRAM_unq1.v vcs/rtl/SRAM_unq1.v
# cp verilator/rtl/SRAM_unq2.v vcs/rtl/SRAM_unq2.v
# cp verilator/rtl/SRAM_unq3.v vcs/rtl/SRAM_unq3.v
# cp verilator/rtl/SRAM_unq4.v vcs/rtl/SRAM_unq4.v
# cp verilator/rtl/srmul.v vcs/rtl/srmul.v
# cp verilator/rtl/srsub.v vcs/rtl/srsub.v
DONE
# ------------------------------------------------------------------------------
# using perl to convert floating-point to bits:
#
# perl> printf("%08X\n", unpack("V", pack("f", 1.0)))
# 3F800000
#
# perl> printf("%08X\n", unpack("Q", pack("d", 1.0)))
# 3FF0000000000000
# ------------------------------------------------------------------------------
DONE 1906
# - run some golden tests, see what's gone wrong... DONE/FIXED
# STATUS okay generating clean rtl maybe
# try golden tests maybe, see what happens
#
# STATUS: ALMOST DONE!!! with this part
# NEXT: twiddle i think
#
#
# c; diff -r -I 'Parameter' ../vcs/rtl genesis_verif | h40
#
# - maybe add -I to 'help'diff'
#
# NEXT: continue with "cleanall; gen; diffr"
#
# NOW: think I got clock.vp fixed
# NEXT: sanity check time maybe? nope all or nothing now! grrr!!!
#
# NEXT: clock.vp
#
# diff -r ../vcs/rtl/clock_unq1.v genesis_verif/clock_unq1.v | less
# cleanall; gen; diff -r ../vcs/rtl/clock_unq1.v genesis_verif/clock_unq1.v | less
# continue
DONE 1906
# HOWTO converge genesis -> handcrafted vcs files
# cd $fftgen/build
# alias cleanall='make -f ../Makefile cleanall'
# alias gen='make -f ../Makefile gen'
# alias diffr='diff -r ../vcs/rtl genesis_verif | grep -v Parameter | grep -v savedir | less -S'
# cleanall; gen; diffr
DONE 1906
# THE ROAD SO FAR
# - minimal diffs b/w hand-tweaked vcs, verilog rtl, see:
#
# cd vcs; diff -r ../verilator/rtl/top_fft.v rtl/top_fft.v
#
# - check in DONE
# - snapshot to ~home DONE
# - work on clean vp2v transition:
# cd $fftgen/build; make gen; diff -r genesis_verif ../vcs/rtl;
DONE 1906
- so far so good i guess
- fix remaining diffs including bsr maybe
-- must do top_fft by hand i think
-- also twiddle
- fix .vp files to match .v files
- and then and then...?
DONE 1906
- made a snapshot ~/fftgen.snapshot.190612.vcs.passed.regressions
- make a snapshot and start over with vcs/i=0
- regressions i guess
==============================================================================
NOTES from 9 jun 2019 ish
------------------------------------------------------------------------------
ncsim version works! right?
SO: start over
------------------------------------------------------------------------------