亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? high_res_timestamp_performance_project.c

?? checksum fpga verilog
?? C
字號:
/*
 * Module:  high_res_timestamp_performance_project.c.
 * Date:    August 10, 2005
 *
 * This example is used to demonstrate the Performance Counter and Timestamp 
 * interval timer peripherals to measure code and compare 
 * the results to those obtained by the Profiler Tool 'gprof' in the 
 * Profiler_Project application.
 * 
 * Details for executing and comparing these applications can be found in 
 * the Profiling Nios II Systems Application Note.
 */

/*
 *  Common C Includes
 */
#include <stdio.h>
#include <unistd.h>

/*
 *  Altera types with bit width names
 */
#include "alt_types.h"

/*
 * Definitions for the Timestamp interval timer peripheral
 */
#include "sys/alt_timestamp.h"

/*
 *  Definition for the Performance Counter Peripheral
 */
#include "altera_avalon_performance_counter.h"

/*
 *  Description of the SOPC Builder configured Nios II system
 */
#include  "system.h"

/*
 * Profiler checksum example header 
 */
#include "checksum_test.h"

/* Declare names for section counters #1 - #3 of the performance 
 * counter peripheral.  Use section counter #1 to measure the checksum_test() 
 * function, section counter #2 to measure the minimal overhead of invoking
 * the PERF_BEGIN macro itself, and section counter #3 to measure the overhead 
 * of using alt_timestamp() to do performance measurements as oppossed to the 
 * performance counter.  
 */

/*
 *  Section Counter #1
 */
#define CHECKSUM_TEST_SECTION 1

/*
 *  Section Counter #2
 */
#define MEASURE_OVERHEAD_CHECKSUM_TEST_SECTION 2

/*
 *  Section Counter #3
 */
#define MEASURE_OVERHEAD_TIMESTAMP_SECTION 3

/*
 *  NOTE: PERF_END macro takes the same amount of overhead in cpu cycles 
 *        as PERF_BEGIN.
 */

/*
 *  NOTE: Counter #0 is reserved for the global section counter,
 *        which keeps track of the total elapsed time for things
 *        measured with PERFORMANCE_COUNTER.
 *        Stopping the global setion counter stops all section counters 
 *        associated with that particular performance counter.  
 */
 
/*
 *  NOTE: User section counter-numbers range from #1 to
 *        the maximum performance counters as configured for a particular 
 *        performance counter peripheral in SOPC Builder 
 *        (SOPC Builder Default: 3, SOPC Builder Maximum: 7).
 *        The variable in system.h which holds the maximum number
 *        of section counters for a particular performance counter is 
 *        PERFORMANCE_COUNTER_HOW_MANY_SECTIONS, where
 *        PERFORMANCE_COUNTER is the name assigned in SOPC Builder
 *        for a particular performance counter peripheral.
 */


/*
 *  C main 
 */
int main(void)
{

  /* 
   * Hold the value the the function whose performance we are measuring. 
   */
  alt_u32 checksum_value;
 
  /* 
   * Sample value of the Timestamp timer at the start of checksum_test. 
   */
  alt_u32 checksum_start_time; 
   
  /* 
   * Sample value of the Timestamp timer at the end of checksum_test. 
   */
  alt_u32 checksum_end_time;
   
  /* 
   * Sample value of the Timestamp timer immediately following a previous 
   * sampling of the Timestamp timer for the purpose of determining the 
   * time elapsed during the measurement itself.
   */
  alt_u32 timestamp_overhead_time;

  /* Sample value of the Timestamp timer which is discarded.  It holds
   * the return value of alt_timestamp() when we measure the time elapsed 
   * during the call to alt_timestamp() with a performance counter. 
   */  
  alt_u32 timestamp_discard_time;
   
  /* 
   * Reset (initialize to zero) all section counters and the global 
   * counter of the performance_counter peripheral.
   */
  PERF_RESET (PERFORMANCE_COUNTER_BASE);

  /*
   *  First, do things that we don't want to measure:        
   */
  printf("Hello from Nios II Performance Checksum Test!\n");
 
  /*
   * Now our program starts in earnest.  Begin measuring.
   */
 
  /*
   * Start the performance counter peripheral's global counter, thereby
   * enabling all of the section counters of performance_counter.
   */
  PERF_START_MEASURING (PERFORMANCE_COUNTER_BASE);
   
  PERF_BEGIN (PERFORMANCE_COUNTER_BASE, 
              MEASURE_OVERHEAD_CHECKSUM_TEST_SECTION);

  /*
   *  Performance Counter macro to begin timing of CHECKSUM_TEST_SECTION.
   */
  PERF_BEGIN (PERFORMANCE_COUNTER_BASE, CHECKSUM_TEST_SECTION);
   
  /* Each performance counter measurement macro is minimally intrusive, 
   * consisting of only a few assembly instructions each. 
   * Measure the overhead of the PERF_BEGIN macro.
   */
  PERF_END (PERFORMANCE_COUNTER_BASE,        
            MEASURE_OVERHEAD_CHECKSUM_TEST_SECTION);
                 
  /*
   * Perform the checksum_test for the sole purpose of providing
   * something to be measured. This first invocation is the one reported in the 
   * Performance Counter report.   
   */
  checksum_value = checksum_test();

  PERF_END (PERFORMANCE_COUNTER_BASE, CHECKSUM_TEST_SECTION);

  /*
   * Run the same test again, but this time measure with Timestamp timer 
   * named high_res_timer interval timer peripheral, marked on the Nios II IDE 
   * System Properties page as the Timestamp timer.
   * 
   * Configure high_res_timer as a 1 microsecond interval timer (changed
   * from the default value of 1 millisecond in the Standard Nios II design
   * by editing the properties for high_res_timer in SOPC Builder).
   *
   * Verify that a Timestamp timer has been configured for this Nios II
   * system before we try to measure with it. 
   */  
  if (alt_timestamp_start() < 0)
  {
    printf ("No timestamp device is available.\n");
  }
  else
  {
    /*
     * Sample the timestamp timer value just before the checksum_test.
     */
    checksum_start_time = alt_timestamp();
      
    /* Perform the second checksum_test for the sole purpose of providing
     * something to be measured. This second invocation is measured by the 
     * timestamp.  
     */ 
    checksum_value = checksum_test();

    /* Sample the timestamp timer value just after the checksum_test.  The
     * difference between checksum_start_time and checksum_end_time will give 
     * us the number of ticks elapsed during the call to checksum_test.      
     */
    checksum_end_time = alt_timestamp();
      
    /*
     * Measure the time overhead to read the timestamp timer by subsequently
     * calling alt_timestamp() back to back.
     */
    timestamp_overhead_time = alt_timestamp();
      
    /* Measure the overhead of alt_timestamp() again, this time using the 
     * faster, less intrusive method of employing a performance counter to 
     * measure the alt_timestamp().
     */
    PERF_BEGIN (PERFORMANCE_COUNTER_BASE, 
                MEASURE_OVERHEAD_TIMESTAMP_SECTION);
               
    /* Invoke alt_timestamp() to measure how long the call takes, 
     * discarding the result.
     */
    timestamp_discard_time = alt_timestamp();
      
    PERF_END (PERFORMANCE_COUNTER_BASE, 
              MEASURE_OVERHEAD_TIMESTAMP_SECTION);

    /*
     * Print-out the Timestamp interval timer peripheral measurements.       
     */
    printf("timestamp measurement for checksum_test = %u ticks\n", 
           (unsigned int) (checksum_end_time - checksum_start_time));              
    printf("timestamp measurement overhead = %u ticks\n", 
           (unsigned int) (timestamp_overhead_time - checksum_end_time)); 
    printf("Actual time in checksum_test = %u ticks\n",
           (unsigned int) ((checksum_end_time - checksum_start_time) - 
           (timestamp_overhead_time - checksum_end_time)));       
    printf("Timestamp timer frequency = %u\n", 
           (unsigned int)alt_timestamp_freq());
  }
      
  /*
   * Stop all performance_counter activity via its global_counter.
   */
   PERF_STOP_MEASURING (PERFORMANCE_COUNTER_BASE);
   
   /*
    * Print-out the performance counter peripheral measurement
    * results for all section counters of performance_counter,
    * so we can visually analyze and compare the performance counter
    * measurement results with the timestamp interval timer results.  
    * The performance counter report goes to STDOUT 
    * (Nios2-console window in the IDE by default).
    * perf_print_formatted_report() is a Performance Counter Peripheral 
    * function.
    */

  perf_print_formatted_report( 
     (void *)PERFORMANCE_COUNTER_BASE, // Peripheral's HW base address            
      ALT_CPU_FREQ,             // defined in "system.h"
      3,                        // How many sections to print
      "1st checksum_test",         // Display-names of sections
      "pc_overhead",
      "ts_overhead");  
       

  printf("Goodbye from Nios II - returning from main()!\n");   
  return 0;
}

/******************************************************************************
*                                                                             *
* License Agreement                                                           *
*                                                                             *
* Copyright (c) 2005 Altera Corporation, San Jose, California, USA.           *
* All rights reserved.                                                        *
*                                                                             *
* Permission is hereby granted, free of charge, to any person obtaining a     *
* copy of this software and associated documentation files (the "Software"),  *
* to deal in the Software without restriction, including without limitation   *
* the rights to use, copy, modify, merge, publish, distribute, sublicense,    *
* and/or sell copies of the Software, and to permit persons to whom the       *
* Software is furnished to do so, subject to the following conditions:        *
*                                                                             *
* The above copyright notice and this permission notice shall be included in  *
* all copies or substantial portions of the Software.                         *
*                                                                             *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,    *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING     *
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER         *
* DEALINGS IN THE SOFTWARE.                                                   *
*                                                                             *
* This agreement shall be governed in all respects by the laws of the State   *
* of California and by the laws of the United States of America.              *
*                                                                             *
******************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲免费视频| 欧美日韩高清在线| 国产在线播放一区| 青青草原综合久久大伊人精品| 亚洲伦理在线精品| 亚洲综合一二区| 一区二区免费看| 亚洲国产成人精品视频| 亚洲高清久久久| 日韩高清在线不卡| 蜜桃精品视频在线观看| 理论片日本一区| 国产综合久久久久久久久久久久| 久久精品国产精品亚洲综合| 激情五月播播久久久精品| 久久av中文字幕片| 成人精品在线视频观看| 色婷婷一区二区三区四区| 欧美日免费三级在线| 91精品国产日韩91久久久久久| 日韩欧美高清一区| 国产精品护士白丝一区av| 亚洲少妇屁股交4| 亚洲chinese男男1069| 精品一区精品二区高清| 成人污视频在线观看| 色狠狠综合天天综合综合| 欧美一区二区三区喷汁尤物| 国产亚洲一区二区三区四区| 亚洲人午夜精品天堂一二香蕉| 亚洲一区二区三区四区在线免费观看| 调教+趴+乳夹+国产+精品| 国内久久婷婷综合| 91官网在线观看| 亚洲精品一线二线三线| 一区二区三区中文字幕电影 | 日韩一区国产二区欧美三区| 精品国产乱码久久久久久免费| 国产精品色哟哟网站| 偷拍亚洲欧洲综合| 97超碰欧美中文字幕| 欧美高清一级片在线| 国产精品美女久久久久久久| 视频一区二区欧美| 成人av在线一区二区| 91精品国产欧美一区二区18 | 不卡欧美aaaaa| 777久久久精品| 国产精品灌醉下药二区| 蜜臀av一区二区三区| 色噜噜狠狠成人中文综合| 久久免费美女视频| 婷婷综合五月天| 色婷婷精品久久二区二区蜜臀av| 精品欧美一区二区久久| 天天亚洲美女在线视频| 一本大道久久精品懂色aⅴ| 欧美激情艳妇裸体舞| 美女高潮久久久| 欧美日韩国产精品成人| 亚洲欧洲av在线| 成人理论电影网| 国产午夜亚洲精品午夜鲁丝片| 肉丝袜脚交视频一区二区| 色www精品视频在线观看| 国产日产欧美一区| 国产一区二区三区香蕉 | 欧美一级二级三级乱码| 亚洲一区二三区| 色综合天天综合网天天看片| 国产精品三级电影| 国产精品99久| 欧美激情中文字幕一区二区| 精品一区二区三区久久久| 日韩一区二区在线免费观看| 视频在线在亚洲| 欧美一区二区三区视频免费播放| 亚洲国产日韩av| 欧美挠脚心视频网站| 天堂av在线一区| 欧美一区中文字幕| 精品亚洲国内自在自线福利| 精品久久久久久久久久久久久久久| 日韩高清不卡一区| 日韩视频一区二区三区| 蜜桃视频在线一区| 久久久久久久久久久久久久久99 | 国产精品免费视频观看| 成人听书哪个软件好| 国产精品萝li| 欧洲精品一区二区三区在线观看| 亚洲免费成人av| 欧美日韩日日夜夜| 精品在线免费视频| 中文一区在线播放| 欧美在线视频日韩| 美女网站在线免费欧美精品| 久久久精品综合| 色综合视频在线观看| 五月激情综合色| 久久精品网站免费观看| 91免费在线播放| 日韩高清不卡在线| 国产欧美精品一区| 欧美日韩国产首页在线观看| 久久成人久久爱| 成人免费视频在线观看| 欧美日韩另类一区| 国产精品中文字幕日韩精品 | 亚洲欧洲综合另类在线| 在线播放91灌醉迷j高跟美女| 国内外成人在线| 一二三四社区欧美黄| 欧美mv日韩mv国产网站app| 成人美女视频在线看| 日本成人中文字幕| 亚洲丝袜美腿综合| xfplay精品久久| 欧美日韩国产欧美日美国产精品| 国产乱人伦偷精品视频免下载| 亚洲欧美日韩中文字幕一区二区三区| 在线综合+亚洲+欧美中文字幕| 懂色av中文字幕一区二区三区| 婷婷激情综合网| 成人欧美一区二区三区视频网页| 欧美一区二区久久久| av成人动漫在线观看| 久久精品久久精品| 亚洲国产另类av| 日韩一区中文字幕| 精品久久一二三区| 欧美在线播放高清精品| 国产aⅴ精品一区二区三区色成熟| 午夜精品福利一区二区三区蜜桃| 欧美极品另类videosde| 精品剧情在线观看| 欧美日本乱大交xxxxx| 91亚洲精品久久久蜜桃| 国产成人久久精品77777最新版本| 亚洲超碰精品一区二区| 亚洲欧美国产三级| 国产精品久久福利| 国产欧美日韩视频一区二区| 日韩午夜激情免费电影| 欧美丰满少妇xxxbbb| 欧美日韩一区二区三区四区 | 一区二区三区免费观看| 国产精品福利一区| 中文字幕av一区二区三区高| 中文字幕在线免费不卡| 欧美大片免费久久精品三p| 欧美日韩激情一区二区| 欧美视频中文一区二区三区在线观看 | 日韩精品资源二区在线| 欧美美女直播网站| 91精品久久久久久久91蜜桃| 欧美一区二视频| 在线电影一区二区三区| 欧美一区二区视频在线观看| 91精品国产综合久久久蜜臀图片| 欧美视频一区在线| 欧美区在线观看| 日韩视频免费观看高清完整版在线观看 | 麻豆一区二区在线| 九九精品视频在线看| 国产乱码字幕精品高清av| 国产在线一区观看| 国产成人免费在线观看| 成人激情动漫在线观看| 99免费精品在线观看| 日本精品一区二区三区四区的功能| 99精品1区2区| 欧美另类变人与禽xxxxx| 91精品国产一区二区三区香蕉| 欧美一区二区三区性视频| 久久精子c满五个校花| 中文字幕一区视频| 亚洲国产aⅴ天堂久久| 奇米色777欧美一区二区| 国产成人亚洲综合a∨猫咪| 91麻豆免费看片| 91精品在线观看入口| 国产情人综合久久777777| 亚洲视频电影在线| 美女一区二区在线观看| 成人精品一区二区三区中文字幕 | 91视视频在线直接观看在线看网页在线看 | 欧美日本在线一区| 精品国产1区二区| 亚洲女同女同女同女同女同69| 婷婷综合另类小说色区| 国产精品99久久久久久有的能看| 色综合天天综合网天天看片| 欧美一区二区在线视频| 亚洲国产成人私人影院tom| 亚洲6080在线| 成人免费黄色在线| 日韩一区二区高清| 日韩理论片中文av| 国产乱码精品一区二区三区av |