Skip to main content

Verification Engineer or Senior Verification Engineer SOC at MIPS India

Hello Dear Readers, Currently, at MIPS India  vacancy for a Verification Engineer or Senior Verification Engineer SOC role. We are seeking an experienced Verification Engineer or Senior Verification Engineer SOC. This position involves extensive hands-on experience with CPU verification using industry-standard functional verification methodologies, formal verification, and constrained random generators, and reference model-based checkers. The candidate must be able to take critical decisions and completely own verification closure for a block or feature. This position involves cross-functional interaction with CPU designers and architects and working across sites to ensure high-quality CPU designs for customers. You will: Take full ownership and drive verification efforts to closure Work closely with designers and architects to understand specifications at unit/top level Understand use cases and develop functional test plans Develop directed tests written in C, Assembly, and SystemVeri

ARM Assembly Language Practice Question And Answer Part-3

 Hello Dear Readers, 

Today in this post I will provide some basics to advanced ARM's assembly language practice QA part-3, I have used the Keil tool for code writing.

Q-1). Create a stack that starts from address 0x5000 and contains 5 values, and the stack pointer always points to the uppermost value.

Code:

; program to create stack and store 5 values 

area stack, code, readonly 

entry 

ldr r13,=0x5000 

ldr r1,=10 

ldr r2,=11 

ldr r3,=12 

ldr r4,=13 

ldr r5,=14 

STMDB SP!,{r1-r5} 

add r4,r3,r5 

end 

Output:


Q-2). 
Write a code to find the multiplication of 10 numbers stored consecutively starting from 0x4000.

Code:

; program of the multiplication of the 10 numbers 

area mul, code, readonly 

entry 

mov r0,#0x4000 

mov r1,#9 

ldr r2,[r0] 

next 

  add r0,r0,#4 

  ldr r3,[r0] 

  muls r2,r3,r2 

  subs r1,r1,#1 

   bne next 

   add r0,r0,#44 

   str r2,[r0]

stop b stop 

end

Output:


Q-3). Write an assembly language program to perform dot product of two vectors using a subroutine. Pass arguments to the subroutine using pass-by-stack technique.

Code:

; program of product two vector 

sram_base equ 0x00004000 

area paasbystack, code, readonly 

entry 

ldr sp,=sram_base 

mov r0,#2 ; vector 1 scaler in x direction 

mov r1,#4 ; scaler in y direction 

mov r2,#2 

mov r3,#2 

STMIA sp!,{r0-r3} 

BL loop 

LDMDB sp!,{r0-r3} 

stop b stop 

loop 

  STMIA sp!,{r4-r6,lr} 

  ldr r5,[sp, #-0x20] 

  ldr r6,[sp, #-0x1c] 

 mul r4,r5,r6 

 ldr r5,[sp, #-0x18]

 ldr r6,[sp, #-0x14]

 mla r4,r5,r6,r4 

 str r4,[sp, #-0x20]

 LDMDB sp!,{r4-r6,pc}

 End 

Output:


Q-4). Write an assembly language program to reverse a string without using any other memory location.

Code:

; program of the reverse string 

area string, code,readonly 

CR EQU 0x0D 

entry 

ldr r0,=data 

ldr r2,=0x40000000 

ldr r3,=0x40000020 

mov r4,#00 

up 

 ldrb r5,[r0],#1 

 cmp r5,#CR 

 strb r5,[r2],#1 

 add r4,r4,#1 

 BNE up 

 sub r4,r4,#1 

 sub r2,r2,#2 

  BNE down 

down 

  ldrb r6,[r2] 

 strb r6,[r3],#1 

 sub r2,r2,#1 

 subs r4,r4,#1 

 BNE down 

stop b stop 

data dcb "DAIICT",CR 

end

Output:

Q-5). Count the number of alphabets in a string.

Code:

area count,code,readonly 

ENTRY 

 LDR R0, =0 ; length = 0 

 LDR R1, =data ;

loop 

  LDRB R2, [R1] ; load next byte of string 

  CMP R2, #0 

 BEQ again ; finished if 0

 ADD R0, R0, #1 ; length += 1 

 ADD R1, R1, #1 ; R1 -> next byte in s 

 B loop ; next byte 

again 

  stop B stop 

data DCB "daiict" 

end

Output:


Q-6). Write a code to find the count of even numbers from 8 numbers stored consecutively starting from 0x4000.

Code:

area even,code,readonly 

SRAM EQU 0X4000 

entry 

 LDR R0, =0X8 

 LDR R1, =0X0 

 LDR R2, =0X1 

 LDR SP, =SRAM 

loop2 

  LDMIA SP!, {R3} 

  ANDS R3, R3, R2 

  BEQ loop 

  SUBS R0, R0, #1 

  BNE loop 

  BEQ STOP 

loop 

   ADD R1, R1, #1

   SUBS R0, R0, #1 

   BNE loop2 

STOP B STOP 

END 

Output:


Q-7). Write an assembly language program to solve the expression x^2+y^2 using a subroutine. Pass arguments to the subroutine using both pass-by-register and pass-by-reference techniques.

Code:

AREA equ,CODE,READONLY 

SRAM EQU 0X4000 

ENTRY 

LDR SP, =SRAM 

LDR R0, =0X5 

BL loop 

MOV R4, R2 

LDR R0, =0X6 

BL loop 

MOV R5, R2 

ADDS R7, R4, R5 

STOP B STOP 

loop 

   STMIA SP!, {LR} 

   MOV R1, R0

   MULS R2, R1, R0

   LDMDB SP!, {PC} 

END

Output:


Q-8). Write an assembly language program to check whether a string is a palindrome or not using a subroutine. Pass arguments to the subroutine using the pass-by-reference technique.

Code:

AREA plan, CODE, READONLY 

ENTRY 

LDR SP, =SRAM 

LDR R8, =SRAM +100 

BL check

LDR R2, =0X4000 

LDR R3, =0X4100 

LDR R4, [R2] 

LDR R5, [R3] 

STMIA R8, {R4,R5}

BL same

STOP B STOP 

check 

  STMIA SP!, {LR} 

  LDR R0, =DATA 

  LDR R2, =0x4000

  LDR R4, =0X5 

l2 

  LDRB R5, [R0] 

  STRB R5, [R2] 

  ADD R0, R0, #1 

  ADD R2, R2, #1 

  SUBS R4, R4, #1 

  BNE l2 

 SUB R2, R2, #1 

  LDR R4, =0X5

  LDR R3, =0x4100

loop 

   LDRB R6, [R2] 

   STRB R6, [R3] 

   SUB R2, R2, #1 

    ADD R3, R3, #1 

    SUBS R4, R4, #1 

    BNE loop 

    LDMDB SP!, {PC} 

same 

     STMIA SP!, {LR} 

     LDMIA R8, {R9-R10} 

     CMP R9, R10 

     LDREQ R11, =0X11111111 

     LDMDB SP!, {PC}

SRAM EQU 0X5000 

DATA DCB "VIVVIV"

END

Output:


Q-9). Write an assembly language program to find the GCD of two numbers using a subroutine. Pass arguments to the subroutine using pass-by-stack technique.

Code:

AREA program, CODE, READONLY 

SRAM EQU 0X4000 

ENTRY 

LDR SP, =SRAM 

LDR R1, =0X9 

LDR R2, =0X5

STMIA SP!, {R1-R2} 

AGAIN 

  BL GCD 

  BNE AGAIN 

STOP B STOP 

GCD 

  STMIA SP!, {LR} 

   LDR R8, [SP, #-8]

   LDR R9, [SP, #-12]

   CMP R9, R8

   SUBSGT R9, R9, R8

   SUBSLT R8, R8, R9

   STR R8, [SP, #-8]

   STR R9, [SP, #-12] 

END

Output:


Connect with me 




Comments

Post a Comment

Popular posts from this blog

SDC (Synopsys Design Constraints) contents part 4

Today, we will be discussing the remaining constraints mentioned in the SDC, which pertain to timing exceptions and design rules. This is the final part of the SDC contents. This is going to be interesting, especially with multicycle paths. Take time to read and try to comprehend. 10. set_max_transition     By setting max transition value, our design checks that all ports and pins are meeting the specified limits mentioned in SDC. If these are not satisfied then timing report will give DRVs (design rule violations) in terms of slack. This is specified as               set_max_transition 0.5  UBUF1/A setting maximum limit of 500ps on pin A of Buffer1. 11. set_max_capacitance     This is same as max transition, setting the maximum capacitance value. if our design not meeting this value then violation will occur. This will also reports under design rule violations in terms of slack.     set_max_capacitance 0.7 [all_nets] setting maximum capacitance of 700fF on all nets. similarly, set_max

Apprenticeship CAI at MediaTek Bangalore

Hello Dear Readers,   Currently at MediaTek Bangalore vacancy for an Apprenticeship CAI role. Job Description: B.Tech degree in Electrical/Electronics Engineering with a strong educational background in Digital circuit design Experience in physical design of high performance design with frequencies > 2 Ghz. Experienced in hierarchical design, budgeting, multiple voltage domains and multiple clock domains. Strong skills with Cadence Encounter. Solid understanding of STA and timing constraints. Experienced in working on advanced process nodes (16nm). Strong expertise in Physical Verification to debug LVS/DRC issues at the block level. Requirement: B.Tech degree in Electrical/Electronics Engineering with strong educational background in Digital circuit design Experience in physical design of high performance design with frequencies > 2 Ghz. Experienced in hierarchical design, budgeting, multiple voltage domains and multiple clock domains. Strong skills with Cadence Encounter. Solid

IC Physical Design (PnR) at Ulkasemi

Hello Dear Readers,   Ulkasemi  has a vacancy for an IC Physical Design (PnR) role. Job Overview: As a full-time Trainee Engineer, the individual will be working on IC Physical Design implementation from RTL to GDSII to create design databases ready for manufacturing with a special focus on power, performance & area optimization with next-generation state-of-the-art process technologies. Job Responsibilities: Perform physical design implementation which includes Floor planning, Power Planning, Clock Tree Synthesis, Place and Route, ECO, Logic Equivalence checks Timing analysis, physical & electrical verification, driving the sign-off closure meeting schedule, and design goals Develop flow, methodologies, and automation scripts for various implementation steps Follow the instructions, compile documents, prepare deliverables, and report to the team lead Should remain up to date with the latest technology trends Educational Qualification:   B.Sc/M.Sc   in EEE or equivalent degree