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

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

?? boot_ads.s

?? altera epxa1的例子程序
?? S
?? 第 1 頁 / 共 2 頁
字號:
;***************************************************************************
;                          Initialize SDRAM
;
;  The SDRAM has now been configured so now the SDRAM device attached 
;  externally to the SDRAM controller must be initialized.  However, the 
;  initialization process must complete within one refresh cycle.  For this 
;  reason, we want the initialization code to run as fast as possible.  To 
;  accomplish this, we lock the SDRAM initialization code into instruction 
;  cache.  After the code is locked in cache, the following initialization 
;  commands are issued to prepare SDRAM for reading and writing:
;
;  -- Enable SDRAM controller
;  -- Issue Precharge command
;  -- Wait 50 SDRAM cycles (63 AHB1 cycles if SDRAM=100MHz and AHB1=125MHz)
;  --  *Note that the 50 cycle delay is only neccessary for XA10
;  --   XA4 and XA1 do not require a delay between SDRAM commands
;  --   Additionally, the delays in this example are determined by
;  --   the clock frequencies involved.  If different clock frequencies
;  --   are used, delays will have to be re-calculated.
;  -- Issue Refresh command
;  -- Wait 50 SDRAM cycles
;  -- Issue 2nd Refresh command
;  -- Wait 50 SDRAM cycles
;  -- Issue Load Mode command to load SDRAM_MODE0 into SDRAM device.
;  -- Wait 50 SDRAM cycles
;
;  Following this sequence, the SDRAM will be ready for reading and writing.
;
;***************************************************************************

    adr r1,CACHE_THIS_CODE_START                    ;-Load begin of SDRAM
                                                    ;  init code
    adr r2,CACHE_THIS_CODE_END                      ;-Load end of SDRAM
                                                    ;  init code
    adr r3,CACHE_THIS_CODE2_START                   ;-Load begin of SDRAM
                                                    ;  init wait function
    adr r4,CACHE_THIS_CODE2_END                     ;-Load end of SDRAM
                                                    ;  init wait function

SDR_Load_Cache                                      ;-Lock SDRAM init code
    mcr p15,0,r1,c7,c13,1                           ;  into instruction cache
    add r1,r1,#8
    cmp r1,r2
    ble SDR_Load_Cache

SDR_Load_Cache2                                     ;-Lock SDRAM wait
    mcr p15,0,r3,c7,c13,1                           ;  function into
    add r3,r3,#8                                    ;  instruction cache
    cmp r3,r4
    ble SDR_Load_Cache2



INIT_SDRAM

;Load bit masks for register SDRAM_INIT

    ldr     r2, =0x8000                             ;-Enable bit mask
    ldr     r3, =0xC000                             ;-Precharge bit mask
    ldr     r4, =0x8800                             ;-Refresh bit mask
    ldr     r5, =0xA000                             ;-Load Mode bit mask
    ldr     r6, =(EXC_REGISTERS_BASE + 0x328)       ;-Load address of AHB1-COUNT

CACHE_THIS_CODE_START

    ldr     r0, =(EXC_REGISTERS_BASE + 0x41C)       ;-Enable SDRAM controller
    ldr     r1, [r0]                                ;  by setting enable bit of
    orr     r1, r1, r2                              ;  SDRAM_INIT
    str     r1, [r0]

    str     r3, [r0]                                ;-Issue Precharge cmd
                                                    ;  by setting Precharge
                                                    ;  bit of SDRAM_INIT

    ldr     r9, =63
    bl      WAIT_FUNCTION                           ;-Wait for 63 AHB1 cycles

    str     r4, [r0]                                ;-Issue Refresh command
                                                    ;  by setting Refresh bit
                                                    ;  of SDRAM_INIT

    ldr     r9, =63
    bl      WAIT_FUNCTION                           ;-Wait for 63 AHB1 cycles

    str     r4, [r0]                                ;-Issue Refresh command
                                                    ;  by setting Refresh bit
                                                    ;  of SDRAM_INIT

    ldr     r9, =63
    bl      WAIT_FUNCTION                           ;-Wait for 63 AHB1 cycles


    str     r5, [r0]                                ;-Issue Load Mode cmd
                                                    ;  by setting Load Mode
                                                    ;  bit of SDRAM_INIT

    ldr     r9, =63
    bl      WAIT_FUNCTION                           ;-Wait for 63 AHB1 cycles

CACHE_THIS_CODE_END
                                                    ;-SDRAM is now ready for
                                                    ;  reading and writing.


;***************************************************************************
;                          Configure PLD
;
;  This section configures the PLD portion of the device using the PLD 
;  configuration peripheral in the Embedded Stripe.  First, we set the 
;  configuration clock to 7.8125 MHz by dividing the AHB2 clock (62.6MHz)
;  by 8 in the register CONFIG_CLOCK.  Then we check the lock bit of 
;  CONFIG_CONTROL to make sure the PLD configuration logic is not locked.  
;  If it is locked, we branch to an error vector (PLD_LOCKED).
;
;  At this point, the boot code, including the contents of the SBI file are
;  located in both SRAM0 and in flash at EBI0.  However, SRAM0 is not large
;  enought to hold all of the PLD image.  We only copied as much of the flash
;  to SRAM0 as would fit.  Because of this, we have to load the SBI file into
;  the PLD from flash.  Here we load the address of sbi_start, which will be
;  the SRAM0 copy.  Adding the EBI0 offset to this address will yield the
;  address of the flash copy of the SBI file.
;
;  The PLD is configured by reading words from the SBI file and writing them
;  to to the CONFIG_DATA register.  When the busy bit is cleared, the next
;  word of SBI data can be written to CONFIG_DATA.  When the last word of
;  data is written, we wait for the CO bit of CONFIG_CONTROL to be cleared, 
;  indicating that configuration is compete.  We also check the E bit of
;  CONFIG_CONTROL to assure there were no errors.
;
;***************************************************************************

CONFIGURE_PLD

    ldr     r0, =(EXC_REGISTERS_BASE + 0x144)       ;-Set config_clock period
    ldr     r1, =0x4                                ;  to 7.8125MHz with
    str     r1, [r0]                                ;  CONFIG_CLOCK reg (AHB2/8)

    ldr     r0, =(EXC_REGISTERS_BASE + 0x140)       ;-Check Lock bit of
    ldr     r1, [r0]                                ;  CONFIG_CONTROL
    and     r2, r1, #0x1
    cmp     r2, #0x1
    beq     PLD_LOCKED

    orr     r2, r1, #0x2                            ;-Set CO bit of
    str     r2, [r0]                                ;  CONFIG_CONTROL

    ldr     r0,=sbi_start                           ;-Set address of sbi_start
    add		r0, r0, #0x20000000
    ldr     r1, =(EXC_REGISTERS_BASE + 0x8)         ;-Load address of IDCODE reg
    ldr     r2, [r1]                                ;-Load IDCODE from device
    ldr     r3, [r0, #4]                            ;-Load IDCODE from SBI file
    cmp     r2, r3                                  ;-Compare two IDCODE's
    bne     SBI_IDCODE_ERROR                        ;-Take error vector if two
                                                    ;  IDCODE's dont match

    ldr     r0,=sbi_start                           ;-Now look at flash copy of SBI
    add		r0, r0, #0x40000000
    ldmia   r0,{r1-r4}                              ;-Load the first 4 words
    add     r3, r3, r0                              ;-Add coffset to get address of
                                                    ;  first word of config data
    add     r0, r3, r4                              ;-Add csize to get address of
                                                    ;  last word of config data
    ldr     r2, =(EXC_REGISTERS_BASE + 0x148)       ;-Load address of CONFIG_DATA
                                                    ;  register
    ldr     r4, =(EXC_REGISTERS_BASE + 0x140)       ;-Load address of CONFIG_CONTROL
                                                    ;  register
    ldr     r5, =0x04                               ;-Load Busy Bit mask

CONFIGURE_LOOP
    ldr     r1, [r3], #4                            ;-Load a word of data
    str     r1, [r2]                                ;-Write data to CONFIG_DATA
BUSY_BIT_LOOP
    ldr     r6, [r4]                                ;-Load CONFIG_CONTROL
    and     r7, r6, r5                              ;-Mask Busy Bit
    cmp     r7, #0x4                                ;-Check if Busy Bit is set
    beq     BUSY_BIT_LOOP                           ;-If not, load more data

    cmp     r3, r0                                  ;-Loop until end of SBI file
    bne     CONFIGURE_LOOP

WAIT_FOR_CO_TO_BE_CLEARED                           ;-Wait for CO bit to be cleared
    ldr     r6, [r4]                                ;-Load CONFIG_CONTROL reg
    and     r6, r6, #0x2                            ;-Mask CO bit
    cmp     r6, #0x2                                ;-Loop until CO is '0'
    beq     WAIT_FOR_CO_TO_BE_CLEARED

CHECK_ERROR_BIT                                     ;-Check E bit
    ldr     r6, [r4]                                ;-Load CONFIG_CONTROL reg
    and     r7, r6, #0x010                          ;-Mask E Bit
    cmp     r7, #0x010                              ;-Take error vector if '1'
    beq     CONFIG_ERROR

                                                    ;-PLD should now be in
                                                    ;  user mode.

PLD_CONFIG_DONE

;***************************************************************************
;                          RESET_WATCHDOG_TIMER
;
;  This section initializes and resets the watchdog timer by writing the   
;  trigger value to the register WDOG_CR, then writing the magic value 
;  0xA5A5A5A5 to the register WDOG_RELOAD
;
;***************************************************************************

RESET_WATCHDOG_TIMER

    ldr     r0, =(EXC_REGISTERS_BASE + 0xA00)       ;-Load register
    ldr     r1, =0x3FFFFFF0                         ;  WDOG_CR
    str     r1, [r0]                                ;  Trigger value
    												;  = 0x3FFFFFF0

    ldr     r0, =(EXC_REGISTERS_BASE + 0xA08)       ;-Load register
    ldr     r1, =0xA5A5A5A5                         ;  WDOG_RELOAD
    str     r1, [r0]                                ;  Reset WD timer

RESET_WATCHDOG_TIMER_DONE

END_LOOP                                            

;***************************************************************************
;*********************** BRANCH TO USER CODE HERE **************************
;***************************************************************************

    b END_LOOP                                      


;***************************************************************************
;                            WAIT_FUNCTION
;
;  This function waits for a specified number of AHB1 cycles by reading the 
;  register AHB1_COUNT.
;
;  r9 - Parameter that contains number of AHB1 cycles to wait
;
;***************************************************************************

CACHE_THIS_CODE2_START

WAIT_FUNCTION
    ldr     r7, [r6]                                ;-Load value of AHB1_COUNT
    add     r7, r7, r9                              ;-r9 contains cycles to wait
                                                    ;  Load r7 with terminal count
WAIT_LOOP
    ldr     r8, [r6]                                ;-Load value of AHB1_COUNT
    cmp     r7, r8                                  ;-Compare to terminal count
    bhi     WAIT_LOOP                               ;-Loop until we get there

    mov     pc, lr                                  ;-Return from function

CACHE_THIS_CODE2_END


;***************************************************************************
;                           Error Vectors
;
;  These are the error vectors taken when errors are encountered in the boot
;  process.  These handlers simply trap the execution of code with an 
;  infinite loop.  It is the users responsibility to design meaningful error 
;  handlers.
;
;***************************************************************************

PLD_LOCKED                                          ;-Error vector if PLD is locked
    b PLD_LOCKED

CONFIG_ERROR                                        ;-Error vector if PLD config
    b CONFIG_ERROR                                  ;  sets error flag

ID_Error                                            ;-Error vector if IDCODE does
    b ID_Error                                      ;  not match expected value

SBI_IDCODE_ERROR                                    ;-Error vector if IDCODE does
    b SBI_IDCODE_ERROR                              ;  not match SBI file


;***************************************************************************
;                           Interrupt Handlers
;
;  These are the interrupt handlers that are run when interrupts are 
;  encountered.  These handlers simply trap the execution of code with an 
;  infinite loop.  It is the users responsibility to design meaningful 
;  interrupt handlers.
;
;***************************************************************************

UDEFHND
    b   UDEFHND

SWIHND
    b   SWIHND

PABTHND
    b   PABTHND

DABTHND
    b   DABTHND

UNEXPECTED
    b   UNEXPECTED

IRQHND
    b   IRQHND

FIQHND
    b   FIQHND


;***************************************************************************
;                          Include SBI file
;
;  In this section, a new data section named sbi_data is declared.  The 
;  INCBIN directive tells the assembler to insert the file boot_example.sbi
;  in pure binary form.  The file is not interpreted in any way.  During
;  the PLD configuration portion of the boot process, this file is read
;  using the sbi_start label.  The SBI file is written to the PLD 
;  configuration peripheral to configure the PLD portion of the device.
;
;***************************************************************************

    AREA sbi_data, DATA, READONLY

sbi_start

    INCBIN boot_example.sbi

sbi_end


;***************************************************************************
;                       End of assembly source file
;***************************************************************************
    END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合久久鬼色| 激情伊人五月天久久综合| 亚洲va欧美va人人爽| 久久99精品国产.久久久久久| 国产成人啪免费观看软件| 91黄色免费观看| 中国色在线观看另类| 免费成人美女在线观看| 色呦呦网站一区| 国产精品丝袜在线| 精品无人码麻豆乱码1区2区 | 日韩亚洲国产中文字幕欧美| 国产精品另类一区| 麻豆精品国产91久久久久久| 欧美亚洲国产一区二区三区| 国产精品网站导航| 国产伦精品一区二区三区免费| 91浏览器入口在线观看| 国产精品美女久久久久久久| 国产真实乱对白精彩久久| 欧美一区二区在线看| 香蕉影视欧美成人| 欧美视频一区二区三区| 亚洲欧洲av在线| 成人动漫在线一区| 国产精品水嫩水嫩| 成人黄色av网站在线| 国产欧美日韩在线| 国产盗摄女厕一区二区三区| 久久蜜桃一区二区| 国产黑丝在线一区二区三区| 精品国产成人系列| 激情五月激情综合网| 精品噜噜噜噜久久久久久久久试看| 日本成人在线电影网| 91精品国模一区二区三区| 蜜臀av一区二区在线观看| 欧美电影免费提供在线观看| 久久电影国产免费久久电影 | 日韩一级在线观看| 久久国产福利国产秒拍| 精品理论电影在线观看| 国产精品18久久久久久久久| 久久精品人人做人人爽人人| 不卡的看片网站| 亚洲在线中文字幕| 欧美一区二区三区精品| 久久精品国产成人一区二区三区| 久久这里只有精品视频网| 成人免费观看视频| 亚洲精品久久久久久国产精华液 | 成人午夜视频网站| 亚洲精品成a人| 91精品国产综合久久久久久| 国产一区二区三区高清播放| 国产精品美女久久久久aⅴ| 91国偷自产一区二区开放时间 | 中文字幕亚洲区| 欧美日韩午夜精品| 国产伦理精品不卡| 一区二区三区四区不卡视频| 欧美一区二区黄| 成人黄色小视频在线观看| 亚洲成a人在线观看| 精品国产乱码久久久久久免费 | 国产一区二区三区美女| 亚洲精选一二三| 日韩精品综合一本久道在线视频| 国产传媒日韩欧美成人| 亚洲一区二区中文在线| 精品美女被调教视频大全网站| heyzo一本久久综合| 日韩在线卡一卡二| 国产精品乱码妇女bbbb| 日韩免费看的电影| 91老司机福利 在线| 久久精品国产成人一区二区三区| 亚洲人妖av一区二区| 欧美一区二区私人影院日本| 暴力调教一区二区三区| 日韩成人精品在线| 亚洲靠逼com| 欧美激情一区二区在线| 欧美一区二区黄色| 欧美在线观看18| 丁香天五香天堂综合| 美女一区二区视频| 午夜精品免费在线观看| 国产精品国产三级国产普通话99| 日韩一区二区三区三四区视频在线观看| 成人午夜激情影院| 久久99九九99精品| 天天爽夜夜爽夜夜爽精品视频| 国产精品久久久久久久久快鸭 | 日韩美女视频一区二区| 日韩欧美激情一区| 欧美美女直播网站| 色综合网色综合| 成人精品在线视频观看| 国产成人精品1024| 国产资源在线一区| 久久精品二区亚洲w码| 午夜国产精品一区| 亚洲国产精品久久艾草纯爱| 亚洲免费观看在线观看| 亚洲欧美在线视频| 国产精品成人在线观看| 中文字幕av一区二区三区免费看| 精品久久久久久久久久久久包黑料| 日韩欧美综合在线| 欧美日韩你懂得| 欧美吻胸吃奶大尺度电影 | 亚洲国产精品久久艾草纯爱| 伊人色综合久久天天| 亚洲精品视频在线| 亚洲综合一区二区| 亚洲午夜av在线| 亚洲成av人片| 日本在线不卡视频| 日本女人一区二区三区| 久久精品国产成人一区二区三区| 另类小说综合欧美亚洲| 蜜臀av在线播放一区二区三区| 久久精品国产精品亚洲综合| 韩国欧美国产1区| 国产精品2024| 成人av动漫在线| 欧美在线|欧美| 91精品国产91久久综合桃花| 欧美xingq一区二区| 26uuu欧美日本| 亚洲色欲色欲www在线观看| 亚洲美女一区二区三区| 午夜影院在线观看欧美| 麻豆国产精品官网| 懂色av中文一区二区三区| 91蜜桃免费观看视频| 欧美区视频在线观看| 欧美xxxxxxxxx| 亚洲欧洲性图库| 日韩精品成人一区二区在线| 国产久卡久卡久卡久卡视频精品| 国产99久久精品| 欧美这里有精品| 精品999在线播放| 日韩毛片高清在线播放| 日韩精品电影在线观看| 风间由美性色一区二区三区| 91福利精品视频| 精品国产sm最大网站免费看| 1024国产精品| 美腿丝袜一区二区三区| 一本色道亚洲精品aⅴ| 欧美一区二区三区喷汁尤物| 国产精品高潮久久久久无| 午夜精品视频在线观看| 成人高清视频在线| 欧美一级夜夜爽| 亚洲一区二区在线免费观看视频 | 久久综合给合久久狠狠狠97色69| 中文字幕亚洲欧美在线不卡| 免费av网站大全久久| 97精品视频在线观看自产线路二| 欧美卡1卡2卡| 亚洲女性喷水在线观看一区| 国产精品资源在线观看| 欧美日韩精品欧美日韩精品| 欧美国产一区二区在线观看 | 亚洲国产中文字幕在线视频综合 | 老色鬼精品视频在线观看播放| av在线不卡网| 欧美成人三级电影在线| 亚洲成人综合在线| 成av人片一区二区| 久久精品人人爽人人爽| 美国一区二区三区在线播放| 欧美在线观看18| 一区二区三区高清在线| av高清不卡在线| 国产日韩欧美激情| 国产一区二区看久久| 日韩视频123| 日韩精品午夜视频| 欧美日韩国产区一| 亚洲综合一区二区精品导航| 93久久精品日日躁夜夜躁欧美| 久久久精品人体av艺术| 蜜桃免费网站一区二区三区| 欧美精品精品一区| 午夜久久久久久| 欧美性一区二区| 亚洲最大色网站| 欧美日韩国产首页| 午夜欧美大尺度福利影院在线看| 一本大道av一区二区在线播放 | 婷婷久久综合九色国产成人| 色哟哟国产精品免费观看| 亚洲欧美日韩一区| 在线亚洲+欧美+日本专区| 亚洲美女一区二区三区|