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

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

?? sdramcntl.vhd

?? xst3_video.ZIP是基于XILINX的XST3開發板的視頻采集源碼
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
                                        -- this insures the clock is stable before enabling the SDRAM
                                        -- it also insures a clean startup if the SDRAM is currently in self-refresh mode
            cke_x   <= NO;
          end if;
          status    <= "0001";

          -----------------------------------------------------------
          -- precharge all SDRAM banks after power-on initialization 
          -----------------------------------------------------------
        when INITPCHG =>
          cmd_x               <= PCHG_CMD;
          sAddr_x(CMDBIT_POS) <= ALL_BANKS;  -- precharge all banks
          timer_x             <= RP_CYCLES;  -- set timer for precharge operation duration
          rfshCntr_x          <= RFSH_OPS;  -- set counter for refresh ops needed after precharge
          state_x             <= INITRFSH;
          status              <= "0010";

          -----------------------------------------------------------
          -- refresh the SDRAM a number of times after initial precharge 
          -----------------------------------------------------------
        when INITRFSH =>
          cmd_x      <= RFSH_CMD;
          timer_x    <= RFC_CYCLES;     -- set timer to refresh operation duration
          rfshCntr_x <= rfshCntr_r - 1;  -- decrement refresh operation counter
          if rfshCntr_r = 1 then
            state_x  <= INITSETMODE;    -- set the SDRAM mode once all refresh ops are done
          end if;
          status     <= "0011";

          -----------------------------------------------------------
          -- set the mode register of the SDRAM 
          -----------------------------------------------------------
        when INITSETMODE =>
          cmd_x   <= MODE_CMD;
          sAddr_x <= (others=>'0');          sAddr_x(MODE'range) <= MODE;              -- output mode register bits on the SDRAM address bits          timer_x <= MODE_CYCLES;       -- set timer for mode setting operation duration
          state_x <= RW;
          status  <= "0100";

          -----------------------------------------------------------
          -- process read/write/refresh operations after initialization is done 
          -----------------------------------------------------------
        when RW                                      =>
          -----------------------------------------------------------
          -- highest priority operation: row refresh 
          -- do a refresh operation if the refresh counter is non-zero
          -----------------------------------------------------------
          if rfshCntr_r /= 0 then
                                        -- wait for any row activations, writes or reads to finish before doing a precharge
            if (activateInProgress = NO) and (wrInProgress = NO) and (rdInProgress = NO) then
              cmd_x                       <= PCHG_CMD;  -- initiate precharge of the SDRAM
              sAddr_x(CMDBIT_POS)         <= ALL_BANKS;  -- precharge all banks
              timer_x                     <= RP_CYCLES;  -- set timer for this operation
              activeFlag_x                <= (others => NO);  -- all rows are inactive after a precharge operation
              state_x                     <= REFRESHROW;  -- refresh the SDRAM after the precharge
            end if;
            status                        <= "0101";
            -----------------------------------------------------------
            -- do a host-initiated read operation 
            -----------------------------------------------------------
          elsif rd = YES then
                                        -- Wait one clock cycle if the bank address has just changed and each bank has its own active row.
            -- This gives extra time for the row activation circuitry.
            if (ba_x = ba_r) or (MULTIPLE_ACTIVE_ROWS = false) then
                                        -- activate a new row if the current read is outside the active row or bank
              if doActivate = YES then
                                        -- activate new row only if all previous activations, writes, reads are done
                if (activateInProgress = NO) and (wrInProgress = NO) and (rdInProgress = NO) then
                  cmd_x                   <= PCHG_CMD;  -- initiate precharge of the SDRAM
                  sAddr_x(CMDBIT_POS)     <= ONE_BANK;  -- precharge this bank
                  timer_x                 <= RP_CYCLES;  -- set timer for this operation
                  activeFlag_x(bankIndex) <= NO;  -- rows in this bank are inactive after a precharge operation
                  state_x                 <= ACTIVATE;  -- activate the new row after the precharge is done
                end if;
                                        -- read from the currently active row if no previous read operation
                                        -- is in progress or if pipeline reads are enabled
                                        -- we can always initiate a read even if a write is already in progress
              elsif (rdInProgress = NO) or PIPE_EN then
                cmd_x                     <= READ_CMD;  -- initiate a read of the SDRAM
                                        -- insert a flag into the pipeline shift register that will exit the end
                                        -- of the shift register when the data from the SDRAM is available
                rdPipeline_x              <= READ & rdPipeline_r(rdPipeline_r'high downto 1);
                opBegun_x                 <= YES;  -- tell the host the requested operation has begun
              end if;
            end if;
            status                        <= "0110";
            -----------------------------------------------------------
            -- do a host-initiated write operation 
            -----------------------------------------------------------
          elsif wr = YES then
                                        -- Wait one clock cycle if the bank address has just changed and each bank has its own active row.
            -- This gives extra time for the row activation circuitry.
            if (ba_x = ba_r) or (MULTIPLE_ACTIVE_ROWS = false) then
                                        -- activate a new row if the current write is outside the active row or bank
              if doActivate = YES then
                                        -- activate new row only if all previous activations, writes, reads are done
                if (activateInProgress = NO) and (wrInProgress = NO) and (rdInProgress = NO) then
                  cmd_x                   <= PCHG_CMD;  -- initiate precharge of the SDRAM
                  sAddr_x(CMDBIT_POS)     <= ONE_BANK;  -- precharge this bank
                  timer_x                 <= RP_CYCLES;  -- set timer for this operation
                  activeFlag_x(bankIndex) <= NO;  -- rows in this bank are inactive after a precharge operation
                  state_x                 <= ACTIVATE;  -- activate the new row after the precharge is done
                end if;
                                        -- write to the currently active row if no previous read operations are in progress
              elsif rdInProgress = NO then
                cmd_x                     <= WRITE_CMD;  -- initiate the write operation
                sDataDir_x                <= OUTPUT;  -- turn on drivers to send data to SDRAM
                                        -- set timer so precharge doesn't occur too soon after write operation
                wrTimer_x                 <= WR_CYCLES;
                                        -- insert a flag into the 1-bit pipeline shift register that will exit on the
                                        -- next cycle.  The write into SDRAM is not actually done by that time, but
                                        -- this doesn't matter to the host
                wrPipeline_x(0)           <= WRITE;
                opBegun_x                 <= YES;  -- tell the host the requested operation has begun
              end if;
            end if;
            status                        <= "0111";
            -----------------------------------------------------------
            -- do a host-initiated self-refresh operation 
            -----------------------------------------------------------
          elsif doSelfRfsh = YES then
                                        -- wait until all previous activations, writes, reads are done
            if (activateInProgress = NO) and (wrInProgress = NO) and (rdInProgress = NO) then
              cmd_x                       <= PCHG_CMD;  -- initiate precharge of the SDRAM
              sAddr_x(CMDBIT_POS)         <= ALL_BANKS;  -- precharge all banks
              timer_x                     <= RP_CYCLES;  -- set timer for this operation
              activeFlag_x                <= (others => NO);  -- all rows are inactive after a precharge operation
              state_x                     <= SELFREFRESH;  -- self-refresh the SDRAM after the precharge
            end if;
            status                        <= "1000";
            -----------------------------------------------------------
            -- no operation
            -----------------------------------------------------------
          else
            state_x                       <= RW;  -- continue to look for SDRAM operations to execute
            status                        <= "1001";
          end if;

          -----------------------------------------------------------
          -- activate a row of the SDRAM 
          -----------------------------------------------------------
        when ACTIVATE                        =>
          cmd_x                   <= ACTIVE_CMD;
          sAddr_x                 <= (others => '0');  -- output the address for the row to be activated
          sAddr_x(row'range)      <= row;
          activeBank_x            <= bank;
          activeRow_x(bankIndex)  <= row;  -- store the new active SDRAM row address
          activeFlag_x(bankIndex) <= YES;  -- the SDRAM is now active
          rasTimer_x              <= RAS_CYCLES;  -- minimum time before another precharge can occur 
          timer_x                 <= RCD_CYCLES;  -- minimum time before a read/write operation can occur
          state_x                 <= RW;  -- return to do read/write operation that initiated this activation
          status                  <= "1010";

          -----------------------------------------------------------
          -- refresh a row of the SDRAM         
          -----------------------------------------------------------
        when REFRESHROW =>
          cmd_x      <= RFSH_CMD;
          timer_x    <= RFC_CYCLES;     -- refresh operation interval
          rfshCntr_x <= rfshCntr_r - 1;  -- decrement the number of needed row refreshes
          state_x    <= RW;             -- process more SDRAM operations after refresh is done
          status     <= "1011";

          -----------------------------------------------------------
          -- place the SDRAM into self-refresh and keep it there until further notice           
          -----------------------------------------------------------
        when SELFREFRESH            =>
          if (doSelfRfsh = YES) or (lock = NO) then
                                        -- keep the SDRAM in self-refresh mode as long as requested and until there is a stable clock
            cmd_x        <= RFSH_CMD;   -- output the refresh command; this is only needed on the first clock cycle
            cke_x        <= NO;         -- disable the SDRAM clock
          else
                                        -- else exit self-refresh mode and start processing read and write operations
            cke_x        <= YES;        -- restart the SDRAM clock
            rfshCntr_x   <= 0;          -- no refreshes are needed immediately after leaving self-refresh
            activeFlag_x <= (others => NO);  -- self-refresh deactivates all rows
            timer_x      <= XSR_CYCLES;  -- wait this long until read and write operations can resume
            state_x      <= RW;
          end if;
          status         <= "1100";

          -----------------------------------------------------------
          -- unknown state
          -----------------------------------------------------------
        when others =>
          state_x <= INITWAIT;          -- reset state if in erroneous state
          status  <= "1101";

      end case;
    end if;
  end process combinatorial;


  -----------------------------------------------------------
  -- update registers on the appropriate clock edge     
  -----------------------------------------------------------

  update : process(rst, clk)
  begin

    if rst = YES then
      -- asynchronous reset
      state_r      <= INITWAIT;
      activeFlag_r <= (others => NO);
      rfshCntr_r   <= 0;
      timer_r      <= 0;
      refTimer_r   <= REF_CYCLES;
      rasTimer_r   <= 0;
      wrTimer_r    <= 0;
      nopCntr_r    <= 0;
      opBegun_r    <= NO;
      rdPipeline_r <= (others => '0');
      wrPipeline_r <= (others => '0');
      cke_r        <= NO;
      cmd_r        <= NOP_CMD;
      ba_r         <= (others => '0');
      sAddr_r      <= (others => '0');
      sData_r      <= (others => '0');
      sDataDir_r   <= INPUT;
      hDOut_r      <= (others => '0');
    elsif rising_edge(clk) then
      state_r      <= state_x;
      activeBank_r <= activeBank_x;
      activeRow_r  <= activeRow_x;
      activeFlag_r <= activeFlag_x;
      rfshCntr_r   <= rfshCntr_x;
      timer_r      <= timer_x;
      refTimer_r   <= refTimer_x;
      rasTimer_r   <= rasTimer_x;
      wrTimer_r    <= wrTimer_x;
      nopCntr_r    <= nopCntr_x;
      opBegun_r    <= opBegun_x;
      rdPipeline_r <= rdPipeline_x;
      wrPipeline_r <= wrPipeline_x;
      cke_r        <= cke_x;
      cmd_r        <= cmd_x;
      ba_r         <= ba_x;
      sAddr_r      <= sAddr_x;
      sData_r      <= sData_x;
      sDataDir_r   <= sDataDir_x;
      hDOut_r      <= hDOut_x;
    end if;

    -- the register that gets data from the SDRAM and holds it for the host
    -- is clocked on the opposite edge.  We don't use this register if IN_PHASE=TRUE.
    if rst = YES then
      hDOutOppPhase_r <= (others => '0');
    elsif falling_edge(clk) then
      hDOutOppPhase_r <= hDOutOppPhase_x;
    end if;

  end process update;

end arch;




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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久嫩草精品久久久精品一| 免费观看成人av| 日韩经典中文字幕一区| 国产真实乱对白精彩久久| 欧美天堂一区二区三区| 国产精品美女久久久久久久久久久| 爽好久久久欧美精品| 91丝袜美腿高跟国产极品老师| 精品电影一区二区三区| 日日摸夜夜添夜夜添国产精品| 99re在线精品| 欧美韩日一区二区三区四区| 久久99精品久久久久久国产越南| 色94色欧美sute亚洲线路一ni | 亚洲伦在线观看| 国产老女人精品毛片久久| 欧美精品日韩综合在线| 亚洲欧美日韩一区| 北条麻妃国产九九精品视频| 精品国产一区二区三区久久久蜜月| 亚洲一区二区三区四区在线观看| 99久久免费视频.com| 欧美激情一区二区三区四区| 国产精品亚洲第一| 久久久久久99精品| 国产精品中文字幕欧美| 亚洲精品在线免费播放| 国产精品青草久久| 国产在线精品一区二区不卡了 | 国产毛片一区二区| 精品毛片乱码1区2区3区| 看电视剧不卡顿的网站| 日韩精品一区二| 久久电影网电视剧免费观看| 精品国产网站在线观看| 国产精品 日产精品 欧美精品| 久久久午夜电影| 成人动漫精品一区二区| 亚洲天堂2014| 欧美色大人视频| 日韩av中文在线观看| 日韩精品影音先锋| 国产精品77777| 亚洲色欲色欲www在线观看| 亚洲欧美日韩中文播放 | 激情综合五月天| 久久综合精品国产一区二区三区| 久久99精品久久久| 精品av久久707| 成人国产一区二区三区精品| 亚洲色图视频网| 欧美日韩在线观看一区二区| 免费av成人在线| 欧美精品一区二区三区视频| 高清国产一区二区| 亚洲综合图片区| 欧美tk—视频vk| 99视频精品在线| 日韩精品五月天| 亚洲国产成人一区二区三区| 欧洲生活片亚洲生活在线观看| 欧美aaaaaa午夜精品| 欧美韩日一区二区三区四区| 欧美体内she精视频| 激情五月婷婷综合| 1000部国产精品成人观看| 欧美二区乱c少妇| 成人美女在线观看| 91麻豆视频网站| 欧美性大战久久久久久久| 午夜激情一区二区| 久久久亚洲精品石原莉奈| 色8久久人人97超碰香蕉987| 久久精品99久久久| 一区二区欧美国产| 国产亚洲综合在线| 91精品国产综合久久福利| 懂色av一区二区三区免费观看| 亚洲国产成人av网| 亚洲欧洲99久久| 欧美不卡在线视频| 精品免费日韩av| 精品一区二区免费| 2019国产精品| 成人国产精品免费观看| 久久99精品久久只有精品| 亚洲欧美日韩系列| 中文字幕在线观看不卡视频| 国产成人啪午夜精品网站男同| 一区二区三区四区精品在线视频| 亚洲精品一区二区精华| 精品视频免费在线| 91丨porny丨国产入口| 国产精品一区专区| 美女一区二区三区在线观看| 亚洲一区视频在线| 国产欧美日韩麻豆91| 91精品黄色片免费大全| 在线观看亚洲成人| fc2成人免费人成在线观看播放| 日本中文字幕不卡| 亚洲成人7777| 亚洲在线视频一区| 亚洲欧美一区二区久久| 国产精品久久夜| 国产精品电影院| 国产精品色婷婷久久58| 一本色道久久综合亚洲精品按摩| 国产成人高清在线| 国产精品99久久久久久宅男| 国产最新精品免费| 国产精品69久久久久水密桃| 国内精品不卡在线| 国产东北露脸精品视频| 国产成人免费高清| 国产精品一区二区久久不卡| 国产美女在线观看一区| 国产精品99久久久久久宅男| 国产福利一区在线观看| 大美女一区二区三区| 成人黄色小视频| 不卡高清视频专区| 色吧成人激情小说| 欧美色欧美亚洲另类二区| 欧美乱熟臀69xxxxxx| 欧美精品久久一区| 欧美一区二区三区四区视频| 精品少妇一区二区三区在线视频 | 日本一区二区久久| 亚洲视频在线观看一区| 亚洲精品国产成人久久av盗摄| 亚洲黄一区二区三区| 日韩影院免费视频| 国产综合久久久久久久久久久久| 国产成人综合网| 91黄色免费观看| 日韩一区二区三区电影| 国产偷国产偷亚洲高清人白洁| 亚洲视频1区2区| 日韩电影在线一区二区| 国产黑丝在线一区二区三区| av在线不卡网| 777精品伊人久久久久大香线蕉| 亚洲精品一区二区精华| 综合亚洲深深色噜噜狠狠网站| 一区二区视频免费在线观看| 麻豆成人av在线| 国产不卡一区视频| 欧美三级电影网站| 久久久精品国产99久久精品芒果| 亚洲欧美日韩综合aⅴ视频| 青青草一区二区三区| 不卡影院免费观看| 91精品国产全国免费观看| 国产精品久久久久影院| 青青国产91久久久久久 | 国产在线看一区| av电影在线观看一区| 这里是久久伊人| 日韩美女久久久| 精品无人区卡一卡二卡三乱码免费卡| 91首页免费视频| 久久久美女毛片| 天天av天天翘天天综合网色鬼国产 | 国产精品久久久久久福利一牛影视 | 中文字幕中文字幕在线一区 | 99re热视频这里只精品| 日韩免费高清av| 亚洲一区二区三区视频在线| 成人高清免费观看| 欧美成人a∨高清免费观看| 亚洲一线二线三线视频| 国产69精品久久777的优势| 欧美一区二区三区思思人| 亚洲欧洲综合另类| 成人免费毛片高清视频| 久久先锋影音av| 久久精品国产99| 日韩一区二区三区电影在线观看 | 久久精品久久精品| 欧美三级视频在线观看| 亚洲色图视频网| 97精品视频在线观看自产线路二| 精品奇米国产一区二区三区| 丝袜美腿成人在线| 欧美蜜桃一区二区三区| 亚洲精品中文字幕乱码三区| 成人激情av网| 中文乱码免费一区二区| 国产成人一级电影| 久久亚洲精品小早川怜子| 久久国产欧美日韩精品| 日韩视频一区二区| 蜜桃视频在线观看一区二区| 欧美人动与zoxxxx乱| 亚洲第一福利一区| 欧美日韩高清在线| 石原莉奈在线亚洲三区| 欧美一区欧美二区| 免费欧美日韩国产三级电影|