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

📄 mips.mac

📁 atmel7s256使用IAR工具开发例程。测试芯片的MIPS性能。
💻 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.mac
;- Object               : Main loop function can be assembly in ARM or THUMB
;-                        This function read DATA in data area with or without
;-			  Wait state
;-                        It is loop of 40 instruction with 3 loss cycle for 
;-			  read external memory (Need know wait state) and one 
;-			  pipeline break
;- Compilation flag     : None
;-
;- 1.0 02/Sep/04 JPP    : Creation
;------------------------------------------------------------------------------


;------------------------------------------------------------------------------
;- Area Definition
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;- Macro                : MIP
;- Parameter            : None
;- 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
;------------------------------------------------------------------------------
;- (TC) Counter Clock Disable Command

		

MIPS    	MACRO  
		LOCAL	loop
            	EXTERN   cmpt_loop
 
	    
	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,#0]		; 
	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	    

        ENDM

⌨️ 快捷键说明

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