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

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

?? tb_fracn09.vhd

?? Clock generation perl to vhdl oijoij
?? VHD
字號:
---------------------------------------------------------------------------------- tb_fracn09.vhd-- D.O.B.       : 6/11/00-- Author       : Allan Herriman-- Description  : Test bench for fracn.vhd, file generated by fracn09.pl--                (This can be run from the TCL script run_modelsim09.do)--------------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;use std.textio.all;entity tb_fracn09 is  generic (    test_ClockDivider : boolean := FALSE; -- try another type of divider from Walter Baeck    fin               : real;  -- Hz, input frequency    fout              : real;  -- Hz, desired output frequency    report_file_name  : string := "fracn.rpt";    time_of_report    : time := 100 ms;    use_output_50     : boolean := FALSE;  -- select which output of dut to use                                          -- for frequency and jitter tests    -- The next four generics are passed to the divider under test    use_phase_accumulator     : boolean := FALSE;    use_recursive_controller  : boolean := TRUE;    minimum_jitter            : boolean := FALSE;    improve_duty_cycle        : boolean := TRUE  );end tb_fracn09;architecture testbench of tb_fracn09 is  component fracn    --generic (    --  use_phase_accumulator     : boolean := FALSE;    --  use_recursive_controller  : boolean := TRUE;    --  minimum_jitter            : boolean := FALSE;    --  improve_duty_cycle        : boolean := TRUE    --);    port (      async_reset       : in  std_logic := '0'; -- active high reset      clock             : in  std_logic;        -- input clock      clock_enable      : in  std_logic := '1'; -- active high enable      output_50         : out std_logic; -- approx 50% duty cycle      output_pulse      : out std_logic  -- high for single clock    );  end component;  -- from Walter Baeck  component ClockDivider is  --  generic ();    port (      ClkIn        : in  std_logic;      ClkOut       : out std_logic;      Reset        : in  std_logic    );  end component ClockDivider;  signal async_reset    : std_logic := '1'; -- active high reset  signal clock          : std_logic := '1'; -- input clock  signal clock_enable   : std_logic := '1'; -- active high enable  signal output_50      : std_logic; -- approx 50% duty cycle  signal output_pulse   : std_logic; -- high for single clock  signal measured_frequency : real := 0.0; -- in Hz.  signal measured_jitter : time := 0 fs;  signal measured_duty_cycle_min : real := 0.0;  signal measured_duty_cycle_avg : real := 0.0;  signal measured_duty_cycle_max : real := 0.0;  constant clock_half_period : time := (0.5e15 / fin) * 1 fs;  constant clock_period : time := 2 * clock_half_period;  constant ideal_ratio  : real := fin/fout;begin -- testbench---------------------------------------------------------------------------------- Instantiate the divider under test--------------------------------------------------------------------------------select_allan_divider: if not test_ClockDivider generatedut : fracn    --generic map (    --  use_phase_accumulator     => use_phase_accumulator,    --  use_recursive_controller  => use_recursive_controller,    --  minimum_jitter            => minimum_jitter,    --  improve_duty_cycle        => improve_duty_cycle    --)    port map (      async_reset       =>  async_reset,      clock             =>  clock,      clock_enable      =>  clock_enable,      output_50         =>  output_50,      output_pulse      =>  output_pulse    );end generate select_allan_divider;select_walter_divider: if test_ClockDivider generatedut : ClockDivider  --  generic map ();    port map (      ClkIn        => clock,      ClkOut       => output_50,      Reset        => async_reset    );  edge_detect : process (async_reset, clock)    variable last_output : std_logic;  begin    if (async_reset = '1') then      output_pulse <= '0';      last_output := '1';    elsif (rising_edge(clock)) then      if (output_50 = '1' and last_output = '0') then        output_pulse <= '1';      else        output_pulse <= '0';      end if;      last_output := output_50;    end if;  end process edge_detect;end generate select_walter_divider;---------------------------------------------------------------------------------- Make the test clock signal--------------------------------------------------------------------------------clock_generator : processbegin  clock <= '1';  wait for clock_half_period;  clock <= '0';  wait for clock_half_period;end process clock_generator;---------------------------------------------------------------------------------- Make the test reset signal--------------------------------------------------------------------------------reset_generator : processbegin  async_reset <= '1';  wait until falling_edge(clock);  async_reset <= '0';  wait;end process reset_generator;---------------------------------------------------------------------------------- Save the results to a file at a certain time (and repeat)--------------------------------------------------------------------------------dump_results : process  file rpt : text open write_mode is report_file_name;  variable L : line;begin  wait for time_of_report;  write(L, measured_frequency);  write(L, ht); -- tab character  write(L, ((measured_frequency - fout) / fout)); -- frequency error  write(L, ht); -- tab character  write(L, measured_jitter);  write(L, ht); -- tab character  write(L, integer(measured_duty_cycle_min*100.0));  write(L, '/');  write(L, integer(measured_duty_cycle_avg*100.0));  write(L, '/');  write(L, integer(measured_duty_cycle_max*100.0));  writeline(rpt, L);  --wait;end process dump_results;---------------------------------------------------------------------------------- Measure the output frequency and jitter---- The frequency measured will be correct in the long term,-- but in the short term, jitter will cause slight errors in measurement.---- Note that the method used will cause long term frequency errors to affect-- the jitter measurement.---- We measure either output_50 or output_pulse depending on-- the value of the use_output_50 generic.--------------------------------------------------------------------------------measure_pulse: if not use_output_50 generate  measure_frequency : process (async_reset, clock)    variable num_outputs : natural;    variable num_clocks : integer;    variable phase_error : time;    variable max_phase_error : time;    variable min_phase_error : time;    variable waiting : boolean := TRUE;  begin    if (async_reset = '1') then      num_outputs := 0;      num_clocks := 0;      phase_error := 0 fs;      max_phase_error := -1 hr;      min_phase_error := +1 hr;      measured_jitter <= 0 fs;      waiting := TRUE;    elsif (rising_edge(clock)) then      if (waiting) then        -- don't take any measurements until after the first output pulse        if (output_pulse = '1') then          waiting := FALSE;        end if;      else        num_clocks := num_clocks + 1;        if (output_pulse = '1') then          num_outputs := num_outputs + 1;          measured_frequency <= (real(num_outputs) / real(num_clocks)) * fin;          phase_error := ((real(num_outputs) * ideal_ratio) - real(num_clocks)) * clock_period;          if (phase_error > max_phase_error) then            max_phase_error := phase_error;            measured_jitter <= max_phase_error - min_phase_error;          end if;          if (phase_error < min_phase_error) then            min_phase_error := phase_error;            measured_jitter <= max_phase_error - min_phase_error;          end if;        end if;      end if;    end if;  end process measure_frequency;end generate measure_pulse;-- as above, but testing the output_50 signalmeasure_50: if use_output_50 generate  measure_frequency : process (async_reset, output_50)    variable num_outputs : natural;    variable phase_error : time;    variable max_phase_error : time;    variable min_phase_error : time;    variable waiting : boolean := TRUE;    variable first_time : time := 0 fs;  begin    if (async_reset = '1') then      num_outputs := 0;      phase_error := 0 fs;      max_phase_error := -1 hr;      min_phase_error := +1 hr;      measured_jitter <= 0 fs;      waiting := TRUE;    elsif (rising_edge(output_50)) then      if (waiting) then        -- don't take any measurements until after the first output pulse        waiting := FALSE;        first_time := now;      else        num_outputs := num_outputs + 1;        measured_frequency <= real(num_outputs) / real((now - first_time) / clock_half_period) * fin * 2.0;        phase_error := (((real(num_outputs) * ideal_ratio) * clock_period) - (now - first_time));        if (phase_error > max_phase_error) then          max_phase_error := phase_error;          measured_jitter <= max_phase_error - min_phase_error;        end if;        if (phase_error < min_phase_error) then          min_phase_error := phase_error;          measured_jitter <= max_phase_error - min_phase_error;        end if;      end if;    end if;  end process measure_frequency;end generate measure_50;---------------------------------------------------------------------------------- Measure the min/avg/max duty cycle of the "50%" duty cycle output.-- Note that times are turned into integers by dividing them by another time,-- and if we use the (FAQ suggested) value of 1 fs, we will get overflow-- problems after 2.1 us.  Hence the division by half the clock period.--------------------------------------------------------------------------------measure_duty_cycle : process (async_reset, output_50)  variable total_time_high : time := 0 fs;  variable total_time_low : time := 0 fs;  variable last_rising : time := 0 fs;  variable last_falling : time := 0 fs;  variable pw_high : time := 0 fs;  variable pw_low : time := 0 fs;  variable duty_cycle : real;  variable duty_cycle_min : real := 1.0;  variable duty_cycle_max : real := 0.0;begin  if (async_reset = '1') then    measured_duty_cycle_min <= 0.0;    measured_duty_cycle_avg <= 0.0;    measured_duty_cycle_max <= 0.0;    duty_cycle_min := 1.0;    duty_cycle_max := 0.0;  else    if (rising_edge(output_50)) then      if (last_falling > 0 fs) then        pw_low := now - last_falling;        total_time_low := total_time_low + pw_low;        measured_duty_cycle_avg <= real(total_time_high / clock_half_period) /                             real((total_time_high + total_time_low) / clock_half_period);      end if;      last_rising := now;    end if;    if (falling_edge(output_50)) then      if (last_rising > 0 fs) then        pw_high := now - last_rising;        total_time_high := total_time_high + pw_high;        if (pw_low > 0 fs) then          duty_cycle := real(pw_high / clock_half_period) /                        real((pw_high + pw_low) / clock_half_period);          if (duty_cycle < duty_cycle_min) then            duty_cycle_min := duty_cycle;            measured_duty_cycle_min <= duty_cycle_min;          end if;          if (duty_cycle > duty_cycle_max) then            duty_cycle_max := duty_cycle;            measured_duty_cycle_max <= duty_cycle_max;          end if;        end if;      end if;      last_falling := now;    end if;  end if;end process measure_duty_cycle;---------------------------------------------------------------------------------- Process to check that output_50 and output_pulse are the same frequency.-- (to check that the duty cycle correction doesn't miss pulses, glitch, etc.)-- Comparison is disabled when output_50 is not driven, as is the case when-- fin/fout <= 2.  (VHDL gives 'U' and Verilog gives 'Z')-- There is no explicit test; the error is detected when the variable-- 'phase_difference' goes out of range.-- Note that certain versions of Modelsim have the range checking turned off-- by default.--------------------------------------------------------------------------------check_output_phase : process (async_reset, output_50, clock)  variable phase_difference : integer range -1 to +1 := 0;begin  if (async_reset = '1') then    phase_difference := 0;  else    if (rising_edge(clock)) then      if (output_pulse = '1' and output_50 /= 'U' and output_50 /= 'Z') then        phase_difference := phase_difference + 1;      end if;    end if;    if (rising_edge(output_50)) then        phase_difference := phase_difference - 1;    end if;  end if;end process check_output_phase;end testbench;---------------------------------------------------------------------------------- <EOF> tb_fracn09.vhd--------------------------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图20p| 成人av网址在线| 粉嫩嫩av羞羞动漫久久久| 91久久精品午夜一区二区| 欧美成人精精品一区二区频| 亚洲欧洲综合另类| 黄一区二区三区| 欧美日韩国产大片| 亚洲欧美色图小说| 国产成人在线视频网址| 91精品国模一区二区三区| 亚洲摸摸操操av| 国产经典欧美精品| 日韩欧美国产wwwww| 午夜精品一区二区三区电影天堂 | 夜夜爽夜夜爽精品视频| 国产露脸91国语对白| 日韩午夜激情视频| 性做久久久久久久免费看| 91麻豆自制传媒国产之光| 国产亚洲欧美日韩日本| 日韩二区在线观看| 欧美在线观看视频一区二区三区| 中文字幕一区二区不卡| 成人av影视在线观看| 国产亚洲欧美日韩日本| 国产精品88av| 久久精品视频免费| 国产精品一区二区在线播放| 2022国产精品视频| 国产综合色精品一区二区三区| 日韩一级二级三级精品视频| 石原莉奈在线亚洲二区| 欧美一级黄色录像| 麻豆成人在线观看| 久久久av毛片精品| 国产精品一区三区| 国产清纯白嫩初高生在线观看91 | 国产91富婆露脸刺激对白| 久久人人爽爽爽人久久久| 精品无人码麻豆乱码1区2区 | 日本精品视频一区二区| 亚洲青青青在线视频| 色国产综合视频| 亚洲影院免费观看| 91.麻豆视频| 99久久99久久久精品齐齐| 国产精品欧美一区喷水| 成人h动漫精品| 亚洲精品ww久久久久久p站| 91黄色激情网站| 午夜久久电影网| 精品99一区二区| 国产91精品免费| 伊人开心综合网| 欧美一区二区三区四区久久| 麻豆91在线观看| 中文字幕在线观看一区二区| 在线欧美日韩精品| 免费观看日韩电影| 国产亚洲精品免费| 一本一本久久a久久精品综合麻豆| 亚洲精品精品亚洲| 日韩精品一区国产麻豆| 不卡视频在线看| 日韩精品亚洲专区| 国产视频一区在线观看| 欧美午夜精品一区二区蜜桃| 美女www一区二区| 亚洲视频一区二区在线观看| 在线观看91av| 不卡视频一二三| 首页国产丝袜综合| 中文字幕在线观看一区| 欧美一区二区精品在线| 99在线热播精品免费| 日韩精品久久久久久| 中文字幕亚洲区| 日韩欧美第一区| 一本色道久久综合亚洲精品按摩| 久久精品国产99久久6| 亚洲人xxxx| 国产三级一区二区| 欧美人牲a欧美精品| 99精品国产热久久91蜜凸| 精品在线播放免费| 天堂资源在线中文精品| 亚洲欧洲三级电影| 久久久精品2019中文字幕之3| 欧美日韩成人综合| 93久久精品日日躁夜夜躁欧美| 麻豆精品在线看| 亚洲成人精品一区| 自拍偷拍国产精品| 国产欧美一区二区三区在线看蜜臀 | 国产精品女同一区二区三区| 91精品国产综合久久香蕉的特点 | 亚洲码国产岛国毛片在线| 亚洲精品在线一区二区| 91精品国产乱码| 欧美性感一类影片在线播放| 99久久99久久免费精品蜜臀| 成人综合激情网| 国产精品911| 国产一区二区三区在线观看精品| 毛片av中文字幕一区二区| 午夜精品一区二区三区三上悠亚| 一区二区三区欧美视频| **欧美大码日韩| 自拍偷拍亚洲欧美日韩| 国产精品美女久久久久久久久久久| 亚洲精品在线观| 精品国产乱码久久久久久闺蜜| 欧美一卡二卡三卡四卡| 911精品国产一区二区在线| 欧美蜜桃一区二区三区| 欧美精品久久天天躁| 欧美日本免费一区二区三区| 欧美性色黄大片| 欧美剧情片在线观看| 717成人午夜免费福利电影| 欧美绝品在线观看成人午夜影视| 欧美日韩国产大片| 欧美成人aa大片| 久久久蜜桃精品| 国产精品久久三| 综合欧美一区二区三区| 亚洲综合一二三区| 亚洲成人福利片| 麻豆精品视频在线观看视频| 久久成人久久鬼色| 国产成人一区在线| 91亚洲精品久久久蜜桃网站| 欧美这里有精品| 日韩一区二区三区精品视频| 久久夜色精品国产噜噜av| 国产精品欧美久久久久一区二区| 亚洲丝袜另类动漫二区| 午夜精品久久久久久不卡8050| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产高清不卡一区二区| 91网页版在线| 日韩欧美在线一区二区三区| 国产欧美日韩另类视频免费观看| 日韩毛片在线免费观看| 午夜国产不卡在线观看视频| 韩国毛片一区二区三区| 99久久99久久综合| 日韩一区二区三| 亚洲国产精品激情在线观看| 亚洲国产综合91精品麻豆 | 亚洲午夜三级在线| 精品亚洲国内自在自线福利| 91猫先生在线| 精品播放一区二区| 亚洲精品免费一二三区| 麻豆国产精品官网| 91免费在线视频观看| 日韩欧美国产小视频| 亚洲欧美日韩国产中文在线| 免费成人美女在线观看| 91视频免费看| 日韩精品专区在线影院重磅| 亚洲精品自拍动漫在线| 狠狠色狠狠色综合| 日本韩国一区二区| 日本一区二区视频在线| 日韩中文字幕av电影| 91亚洲永久精品| 久久久久久久久久久久久女国产乱| 亚洲国产精品一区二区www| 成人永久免费视频| 精品久久国产97色综合| 亚洲网友自拍偷拍| 99精品久久久久久| 国产亚洲精品aa| 麻豆91在线播放| 欧美日韩视频在线一区二区| 一色屋精品亚洲香蕉网站| 国内久久婷婷综合| 91精品国产色综合久久不卡蜜臀 | 欧美综合一区二区三区| 欧美国产国产综合| 国产一区二区三区精品视频| 欧美精品在线一区二区| 亚洲愉拍自拍另类高清精品| 99久久精品情趣| 国产精品你懂的在线欣赏| 国产激情一区二区三区桃花岛亚洲| 8v天堂国产在线一区二区| 亚洲一区视频在线| 在线视频亚洲一区| 亚洲另类色综合网站| 一本大道久久精品懂色aⅴ| 国产精品女主播在线观看| 懂色av中文一区二区三区| 国产日韩在线不卡| 国产成人精品综合在线观看| 国产性天天综合网| 国产91色综合久久免费分享|