⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mips_ghs.mac

📁 ATMEL AT91RM9200开发板配套光盘上的全部示例程序
💻 MAC
字号:
;------------------------------------------------------------------------------
;-    ATMEL Microcontroller Software Support  -   ROUSSET -
;------------------------------------------------------------------------------
; The software is delivered "AS IS" without warranty or condition of any
; kind, either express, implied or statutory. This includes without
; limitation any warranty or condition with respect to merchantability or
; fitness for any particular purpose, or against the infringements of
; intellectual property rights of others.
;------------------------------------------------------------------------------
;- File source          : mips_ghs.mac
;- Object               : Main loop function can be assembly in ARM or THUMB
;-                        This function read DATA in data area with or without
;-			  Wait state
;-
;- 1.0 13/JAN/03 JPP    : Creation
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;- Macros               : MIPS_MEA
;- Parameter
;- Treatments           : Infinite loop for measurement in thumb modes
;-                        It is loop of 40 instruction with 3 loss cycle for 
;-			  read external memory (Need know wait state) and one 
;-			  pipeline break
;- Called Functions     : None
;- Called Macros        : None
;------------------------------------------------------------------------------
;- (TC) Counter Clock Disable Command
#define AT91C_TC_CLKDIS     0x02
	    .import cmpt_loop
            
            .macro	MIPS_MEA	label
	    .macrolocal loop
label:	    
	ldr	r2,=cmpt_loop	; 1 cycle read pointer and 2 external data access
	mov	r0,#0		; 1 cycle
loop:
	nop 	                ; 1
	nop 	                ; 2
	nop 	                ; 3
	nop 	                ; 4
	nop 	                ; 5
	nop 	                ; 6
	nop 	                ; 7
	nop 	                ; 8
	nop 	                ; 9
	nop 	                ; 10

	nop 	                ; 1
	nop 	                ; 2
	nop 	                ; 3
	nop 	                ; 4
	nop 	                ; 5
	nop 	                ; 6
	nop 	                ; 7
	nop 	                ; 8
	nop 	                ; 9
	nop 	                ; 10

	nop 	                ; 1
	nop 	                ; 2
	nop 	                ; 3
	nop 	                ; 4
	nop 	                ; 5
	nop 	                ; 6
	nop 	                ; 7
	nop 	                ; 8
	nop 	                ; 9
	nop 	                ; 10

	nop 	                ; 1
	nop 	                ; 2
	nop 	                ; 3
	nop 	                ; 4
	nop 	                ; 5
	nop 	                ; 6
; loop increment
	add	   r0, r0, #1	; 7
; test loop                     
	ldrh	r1,[r2]		; 8 + data read access 32 bits data 2 lose cycle and wait
	cmp	r1,#0           ; 9
	beq	loop		; 10 + break pipe 2 lose cycles
; return in interworking
	str	r0,[r2,#4]	;  data read access 32 bits data 2 lose cycle
	bx 	r14
       .type	label,$function
       .size	label,.-label


            .endm
	    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -