1 # -----------------------------------------------------------------------
3 # Copyright 2008 Tommy Thorn - All Rights Reserved
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 # Bostom MA 02111-1307, USA; either version 2 of the License, or
9 # (at your option) any later version; incorporated herein by reference.
11 # -----------------------------------------------------------------------
13 PIPELINE
=stage_D.v stage_I.v stage_M.v stage_X.v
15 perfcounters.v
: $(PIPELINE
) Makefile
16 grep perf_
$(PIPELINE
) | \
17 sed
-e
's/^.*perf_/perf_/' -e
's/[^a-z_].*$$//' | \
18 sort | uniq | tr
"a-z" "A-Z" | \
19 (t
=0; while read x
;do echo
'`define' $$x $$t;t
=$$((t
+ 1));done
; \
20 echo
'`define' PERF_COUNTERS
$$t) > perfcounters.v