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

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

?? frequency_counter.vhd

?? 晶振頻率實時顯示在LCD上,包含LCD驅動等程序.
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
  -- counters is clean and that no clock cycles are missed or glitches generated.
  --
  -- An asynchronous reset is provided and will be controlled by PicoBlaze using a long
  -- pulse when the counter is disabled. Hence there is no special synchronisation on this control.
  -- 
  ----------------------------------------------------------------------------------------------------------------------------------
  --

  counter_switch_control: process(test_clk)
  begin
    if test_clk'event and test_clk='1' then

      -- Four stage register to ensure synhchronisation of control between clock domains
      ab_switch_delay <= ab_switch_delay(2 downto 0) & ab_switch;
      
      -- Separate enables form switch between counters when control is consistantly high or low.

      case ab_switch_delay(3 downto 1) is

        when "000" => a_count_ce <= '1';
                      b_count_ce <= '0';

        when "111" => a_count_ce <= '0';
                      b_count_ce <= '1';

        when others => a_count_ce <= a_count_ce;
                       b_count_ce <= b_count_ce;

      end case;

    end if;
  end process counter_switch_control;

  -- 32-bit counters 

  test_counter_a: process(test_clk, a_count_rst )
  begin
    if a_count_rst='1' then
       a_count <= X"00000000";
     elsif test_clk'event and test_clk='1' then
      if a_count_ce='1' then
         a_count <= a_count + 1;
       else
         a_count <= a_count;
      end if;
    end if;
  end process test_counter_a;

  test_counter_b: process(test_clk, b_count_rst )
  begin
    if b_count_rst='1' then
       b_count <= X"00000000";
     elsif test_clk'event and test_clk='1' then
      if b_count_ce='1' then
         b_count <= b_count + 1;
       else
         b_count <= b_count;
      end if;
    end if;
  end process test_counter_b;


  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- One Second Timer and Circuit Control
  --
  -- Using the normal 50MHz clock source, this circuit generates a 1 second timer which is used to  
  -- switch the enable from one counter to the other. 
  --
  -- A short delay is then inserted to ensure that the switch has taken place before interrupting the 
  -- PicoBlaze processor. This ensures that the counters are switched and stable for reading etc.
  -- Note: This could cause an issue when very low frequency signals are being measured.
  -- 
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  one_second_logic: process(clk_50mhz)
  begin
    if clk_50mhz'event and clk_50mhz='1' then

      if one_second_count=49999999 then      --divide by 50,000,000 is 1s
        one_second_count <= 0;
        one_second_pulse <= '1';
       else
        one_second_count <= one_second_count + 1;
        one_second_pulse <= '0';
      end if;

      -- delay of 100 clock cycles before generating interrupt 
      interrupt_delay <= interrupt_delay(98 downto 0) & one_second_pulse;

      -- processor interrupt waits for an acknowledgement
      if interrupt_ack='1' then
         interrupt <= '0';
        elsif interrupt_delay(99) ='1' then
         interrupt <= '1';
        else
         interrupt <= interrupt;
      end if;

      -- counter selection switch toggles each second
      if one_second_pulse='1' then
        ab_switch <= not ab_switch;
      end if;

    end if;

  end process one_second_logic;

  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- KCPSM3 and the program memory used for capturing data from the counters
  ----------------------------------------------------------------------------------------------------------------------------------
  --

  processor: kcpsm3
    port map(      address => address,
               instruction => instruction,
                   port_id => port_id,
              write_strobe => write_strobe,
                  out_port => out_port,
               read_strobe => read_strobe,
                   in_port => in_port,
                 interrupt => interrupt,
             interrupt_ack => interrupt_ack,
                     reset => reset,
                       clk => clk_50mhz);
 
  program_rom: fc_ctrl
    port map(      address => address,
               instruction => instruction,
                proc_reset => reset,        --JTAG Loader version
                       clk => clk_50mhz);

  --reset <= '0';  --When using normal version
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- Capture processor input ports 
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  --
  -- The inputs are connected via a pipelined multiplexer
  --

  input_ports: process(clk_50mhz)
  begin
    if clk_50mhz'event and clk_50mhz='1' then

      case port_id(7 downto 4) is

        -- read A-counter for addresses 00, 10, 20 and 30 hex
        when "0000" =>    in_port <= a_count(7 downto 0);  
        when "0001" =>    in_port <= a_count(15 downto 8);  
        when "0010" =>    in_port <= a_count(23 downto 16);  
        when "0011" =>    in_port <= a_count(31 downto 24);  

        -- read B-counter for addresses 40, 50, 60 and 70 hex
        when "0100" =>    in_port <= b_count(7 downto 0);  
        when "0101" =>    in_port <= b_count(15 downto 8);  
        when "0110" =>    in_port <= b_count(23 downto 16);  
        when "0111" =>    in_port <= b_count(31 downto 24);  

        -- read slide switches and counter circuit status at address 80 hex
        when "1000" =>    in_port <= "000" & ab_switch & sw;

        -- read LCD data at address 90 hex
        when "1001" =>    in_port <= lcd_d & "0000";

        -- Don't care used to ensure minimum logic
        when others =>    in_port <= "XXXXXXXX";  

      end case;

    end if;

  end process input_ports;


  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- Capture processor output ports 
  ----------------------------------------------------------------------------------------------------------------------------------
  --

  output_ports: process(clk_50mhz)
  begin

    if clk_50mhz'event and clk_50mhz='1' then
      if write_strobe='1' then
        
        -- LED register at address 01 hex 
        if port_id(0)='1' then
          led <= out_port;
        end if;

        -- Counter reset controls at address 02 hex 
        if port_id(1)='1' then
          a_count_rst <= out_port(0);
          b_count_rst <= out_port(1);
        end if;

        -- LCD data output and controls at address 04 hex.

        if port_id(2)='1' then
          lcd_output_data <= out_port(7 downto 4);
          lcd_drive <= out_port(3);  
          lcd_rs <= out_port(2);
          lcd_rw_control <= out_port(1);
          lcd_e <= out_port(0);
        end if;

        -- Source selection and control at address 08 hex.

        if port_id(3)='1' then
          source_control <= out_port;
        end if;

      end if;
    end if; 

  end process output_ports;

  --
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- LCD interface  
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  -- The 4-bit data port is bidirectional.
  -- lcd_rw is '1' for read and '0' for write 
  -- lcd_drive is like a master enable signal which prevents either the 
  -- FPGA outputs or the LCD display driving the data lines.
  --
  --Control of read and write signal
  lcd_rw <= lcd_rw_control and lcd_drive;

  --use read/write control to enable output buffers.
  lcd_d <= lcd_output_data when (lcd_rw_control='0' and lcd_drive='1') else "ZZZZ";

  ----------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------

end Behavioral;

------------------------------------------------------------------------------------------------------------------------------------
--
-- END OF FILE frequency_counter.vhd
--
------------------------------------------------------------------------------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
裸体在线国模精品偷拍| 精品国产区一区| 91黄视频在线| 欧美美女bb生活片| 欧美不卡在线视频| 成人免费视频在线观看| 婷婷久久综合九色国产成人| 精品无人区卡一卡二卡三乱码免费卡| 国产精品99久久久久久久女警 | 久久综合精品国产一区二区三区 | 1024精品合集| 日日夜夜免费精品视频| 成人国产在线观看| 欧美一级片在线看| 亚洲色图欧美激情| 久久久久久久综合日本| 亚洲三级视频在线观看| 久久成人18免费观看| 99热这里都是精品| 91精品国产色综合久久ai换脸| 国产欧美一区视频| 亚洲婷婷在线视频| 婷婷六月综合网| 成人av资源在线观看| 91精品国产91久久综合桃花| 国产精品美女久久久久aⅴ国产馆| 亚洲成人黄色影院| 99视频精品在线| 国产片一区二区| 精品一区二区免费在线观看| 5858s免费视频成人| 日韩一区日韩二区| 国产激情一区二区三区四区| 亚洲国产精品久久久久秋霞影院| 日本欧美加勒比视频| 91久久精品国产91性色tv| 欧美精品一区二区三区蜜臀| 亚洲一区在线观看免费| www.亚洲国产| 欧美激情一区二区三区全黄| 国产在线精品一区二区三区不卡 | 91视频www| 亚洲成人三级小说| 波多野结衣在线aⅴ中文字幕不卡| 欧美二区三区的天堂| 欧美日韩中文精品| 一区二区三区在线视频观看| 91麻豆精品在线观看| 国产精品免费av| 国产a精品视频| 日本一区二区高清| 一区二区视频免费在线观看| av不卡免费在线观看| 中文字幕一区二区三区在线观看 | 69久久99精品久久久久婷婷| 日韩激情中文字幕| 91精品国产乱| 蜜臀a∨国产成人精品| 欧美日韩国产免费| 亚洲成av人影院| 欧亚一区二区三区| 日韩在线一二三区| 日韩欧美中文一区| 国产美女精品一区二区三区| 国产亚洲精品久| 成人a免费在线看| 亚洲精品美国一| 欧亚一区二区三区| 久久成人免费日本黄色| 久久久精品国产免大香伊| 成人精品小蝌蚪| 亚洲激情图片小说视频| 欧美日韩dvd在线观看| 蜜桃一区二区三区在线| 欧美激情综合五月色丁香小说| 99精品1区2区| 国产精品成人免费在线| 在线一区二区三区做爰视频网站| 亚洲午夜免费视频| 日韩视频免费观看高清完整版在线观看| 激情综合色播五月| 成人免费在线播放视频| 欧美人妇做爰xxxⅹ性高电影| 久久国产尿小便嘘嘘尿| 国产精品视频在线看| 欧美视频一区二区三区在线观看| 日本女人一区二区三区| 国产女人18水真多18精品一级做| 成人福利视频在线| 亚洲国产cao| 国产校园另类小说区| 欧美日韩一区二区三区不卡 | 亚洲一区在线观看视频| 久久亚洲影视婷婷| 欧美最新大片在线看| 国产一区二区三区四区五区美女 | 麻豆国产精品一区二区三区| 国产精品久久久久aaaa| 日韩欧美亚洲一区二区| 色94色欧美sute亚洲线路一ni | 欧美高清性hdvideosex| 成人高清在线视频| 韩国精品久久久| 亚洲午夜一二三区视频| 中文字幕亚洲电影| 久久综合久色欧美综合狠狠| 色婷婷精品久久二区二区蜜臂av| 久久国产精品99久久人人澡| 亚洲国产日韩av| 中文字幕日韩精品一区| 欧美丰满高潮xxxx喷水动漫| 色综合久久中文综合久久牛| 国产精品一二三| 久久国产日韩欧美精品| 午夜精品久久久久久久99水蜜桃| 综合久久久久综合| 国产精品久久久久久久蜜臀| 欧美日韩精品电影| 国产成人综合精品三级| 亚洲在线视频网站| 亚洲人成伊人成综合网小说| 国产婷婷色一区二区三区| 久久久亚洲精品一区二区三区 | 欧美精品一区二区三区四区| 欧美精品久久99| 欧美日韩一区二区电影| 欧美影片第一页| 色综合婷婷久久| 成人app在线观看| 99久久精品99国产精品| 久久成人av少妇免费| 三级一区在线视频先锋| 亚洲mv大片欧洲mv大片精品| 一区二区三区在线视频观看58| 中文字幕五月欧美| 一区二区视频在线| 亚洲午夜视频在线| 天天操天天综合网| 奇米888四色在线精品| 日本欧美一区二区三区乱码 | 亚洲精品一区二区三区影院| 精品久久人人做人人爱| 欧美精品一区二区三区久久久| 日韩一级片在线播放| 欧美xxxx在线观看| 国产农村妇女毛片精品久久麻豆| 国产蜜臀av在线一区二区三区| 国产欧美一区二区三区在线看蜜臀| 精品国产乱码久久久久久闺蜜| 久久这里只有精品6| 国产精品美女久久久久久2018| 亚洲欧美二区三区| 日韩精品电影一区亚洲| 韩国女主播一区| 99久久精品国产一区| 欧美色图激情小说| 欧美午夜寂寞影院| 欧美巨大另类极品videosbest| 蜜桃视频一区二区三区在线观看| 精品一区二区久久| 欧美最新大片在线看| 日本一区二区三区四区| 日韩二区三区四区| 99久久综合99久久综合网站| 日韩免费性生活视频播放| 亚洲精品久久久蜜桃| 国产精品资源在线看| 91精品国产综合久久精品| 亚洲视频免费在线观看| 国产成人精品亚洲777人妖| 欧美日本在线播放| 国产精品国产三级国产aⅴ中文| 麻豆免费看一区二区三区| 色94色欧美sute亚洲13| 中文字幕一区av| 国产麻豆午夜三级精品| 日韩三级av在线播放| 亚洲一区在线看| 91麻豆免费观看| 中文字幕视频一区二区三区久| 国产一区福利在线| 日韩三级.com| 美女久久久精品| 91 com成人网| 午夜激情一区二区三区| 在线观看中文字幕不卡| 亚洲丝袜美腿综合| 91美女福利视频| 中文字幕一区日韩精品欧美| 成人在线视频一区| 国产日韩高清在线| 国产东北露脸精品视频| 亚洲精品在线免费播放| 国产一区二区三区不卡在线观看 | 激情文学综合网| 2欧美一区二区三区在线观看视频| 日韩精品一二三区| 日韩手机在线导航| 国产一区美女在线| 欧美激情在线一区二区|