? sid/component/cgen-cpu/cgen-model.h ? sid/component/cgen-cpu/xstormy16/xstormy16-model.cxx ? sid/component/cgen-cpu/xstormy16/xstormy16-model.h Index: sid/component/cgen-cpu/CGEN.sh.in =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/CGEN.sh.in,v retrieving revision 1.2 diff -c -p -r1.2 CGEN.sh.in *** sid/component/cgen-cpu/CGEN.sh.in 20 Sep 2002 01:00:28 -0000 1.2 --- sid/component/cgen-cpu/CGEN.sh.in 31 Mar 2003 19:42:03 -0000 *************** *** 13,18 **** --- 13,20 ---- # defs.h - generate defs.h file (cpu-family specific decls) # decode.h - generate decoder header file # decode.cxx - generate decoder + # model.h - generate model header file + # model.cxx - generate model # semantics.cxx - generate semantics # sem-switch.cxx - generate semantics, pbb switch version # *************** do *** 83,88 **** --- 85,92 ---- defs.h) fileopts="$fileopts -E tmp-defs-$$.h1" ;; decode.h) fileopts="$fileopts -T tmp-dec-$$.h1" ;; decode.cxx) fileopts="$fileopts -D tmp-dec-$$.cxx1" ;; + model.h) fileopts="$fileopts -N tmp-mod-$$.h1" ;; + model.cxx) fileopts="$fileopts -M tmp-mod-$$.cxx1" ;; semantics.cxx) fileopts="$fileopts -S tmp-sem-$$.cxx1" ;; sem-switch.cxx) fileopts="$fileopts -X tmp-semsw-$$.cxx1" ;; write.cxx) fileopts="$fileopts -W tmp-write-$$.cxx1" ;; *************** do *** 141,146 **** --- 145,164 ---- < tmp-dec-$$.cxx1 > tmp-dec-$$.cxx ${rootdir}/move-if-change tmp-dec-$$.cxx ${srcdir}/${fileprefix}decode.cxx ;; + model.h) + sed -e "s=@ARCH@=${ARCH}=g" -e "s=@arch@=${arch}=g" \ + -e "s=@CPU@=${CPU}=g" -e "s=@cpu@=${cpu}=g" \ + -e "s=@PREFIX@=${PREFIX}=g" -e "s=@"prefix"@=${prefix}=g" \ + < tmp-mod-$$.h1 > tmp-mod-$$.h + ${rootdir}/move-if-change tmp-mod-$$.h ${srcdir}/${fileprefix}model.h + ;; + model.cxx) + sed -e "s=@ARCH@=${ARCH}=g" -e "s=@arch@=${arch}=g" \ + -e "s=@CPU@=${CPU}=g" -e "s=@cpu@=${cpu}=g" \ + -e "s=@PREFIX@=${PREFIX}=g" -e "s=@"prefix"@=${prefix}=g" \ + < tmp-mod-$$.cxx1 > tmp-mod-$$.cxx + ${rootdir}/move-if-change tmp-mod-$$.cxx ${srcdir}/${fileprefix}model.cxx + ;; semantics.cxx) sed -e "s=@ARCH@=${ARCH}=g" -e "s=@arch@=${arch}=g" \ -e "s=@CPU@=${CPU}=g" -e "s=@cpu@=${cpu}=g" \ *************** rm -f tmp-semsw-$$.cxx1 tmp-semsw-$$.cxx *** 173,177 **** --- 191,197 ---- rm -f tmp-write-$$.cxx1 tmp-write-$$.cxx rm -f tmp-dec-$$.h1 tmp-dec-$$.h rm -f tmp-dec-$$.cxx1 tmp-dec-$$.cxx + rm -f tmp-mod-$$.h1 tmp-mod-$$.h + rm -f tmp-mod-$$.cxx1 tmp-mod-$$.cxx exit 0 Index: sid/component/cgen-cpu/common-xml/interface.xml =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/common-xml/interface.xml,v retrieving revision 1.5 diff -c -p -r1.5 interface.xml *** sid/component/cgen-cpu/common-xml/interface.xml 29 Nov 2002 06:05:57 -0000 1.5 --- sid/component/cgen-cpu/common-xml/interface.xml 31 Mar 2003 19:42:03 -0000 *************** *** 28,33 **** --- 28,35 ---- + + Index: sid/include/sidcpuutil.h =================================================================== RCS file: /cvs/src/src/sid/include/sidcpuutil.h,v retrieving revision 1.24 diff -c -p -r1.24 sidcpuutil.h *** sid/include/sidcpuutil.h 15 Jan 2003 20:03:34 -0000 1.24 --- sid/include/sidcpuutil.h 31 Mar 2003 19:42:06 -0000 *************** namespace sidutil *** 239,244 **** --- 239,245 ---- bool trace_disass_p; bool trace_semantics_p; bool trace_counter_p; + bool final_insn_count_p; bool enable_step_trap_p; cpu_trace_stream trace_stream; *************** namespace sidutil *** 307,312 **** --- 308,316 ---- } } + public: + void update_total_latency (sid::host_int_8 latency) { this->total_latency += latency; } + protected: virtual sid::host_int_8 latency_to_cycles (sid::host_int_8 num) { *************** namespace sidutil *** 417,422 **** --- 421,427 ---- << " " << this->trace_disass_p << " " << this->trace_semantics_p << " " << this->trace_counter_p + << " " << this->final_insn_count_p // pins << " " << this->step_cycles_pin << " " << this->trap_type_pin *************** namespace sidutil *** 441,446 **** --- 446,452 ---- >> this->trace_disass_p >> this->trace_semantics_p >> this->trace_counter_p + >> this->final_insn_count_p // pins >> this->step_cycles_pin >> this->trap_type_pin *************** public: *** 582,587 **** --- 588,595 ---- add_attribute ("trace-result?", & this->trace_result_p, "setting"); this->trace_counter_p = false; add_attribute ("trace-counter?", & this->trace_counter_p, "setting"); + this->final_insn_count_p = false; + add_attribute ("final-insn-count?", & this->final_insn_count_p, "setting"); } virtual ~basic_cpu() throw() {} Index: sid/main/dynamic/commonCfg.cxx =================================================================== RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.cxx,v retrieving revision 1.2 diff -c -p -r1.2 commonCfg.cxx *** sid/main/dynamic/commonCfg.cxx 31 Jan 2003 16:48:03 -0000 1.2 --- sid/main/dynamic/commonCfg.cxx 31 Mar 2003 19:42:06 -0000 *************** void BoardCfg::final_insn_count () *** 1004,1009 **** --- 1004,1010 ---- assert (cpu); assert (sess->shutdown_seq); sess->shutdown_seq->add_output (0, cpu, "print-insn-summary!"); + cpu->set (cpu, "final-insn-count?", "true"); } void BoardCfg::trace_counter ()