考研

当前位置 /首页/学习经验/考研/列表

AMD笔试试题

PART I: C++

AMD笔试试题

1. static global variable vs normal global variable; static local variable vs normal global variable.

2. how to get current source file's filename and current line number using c++?

3. use variable "a" to represent below contents

1) "a" is a pointer to a integer,int *a;

2) "a" is a pointer to a pointer to an integer. int **a;

3) "a" is an array of 10 integers int a[10];

4) "a" is an array to 10 pointers of integers int *a[10];

5) "a" is a pointer to an array of 10 integers int (*a)[10]

6) "a" is a pointer to a function that takes an integer argument and returns an integer.

int (*a)(int);

7) "a" is a pointer of 10 pointers to functions that takes an integer argument and returns an integer int (*a[10])(int)

4. In c++ class, why does the destructor usually use virtual function? why doesnot use virtual function as constructor?

5. What's the purpose of below function, func(2009)

omitted (count how many 1s in the binary of n)

6. write a recursive function to reverse a one-way linked list and return the head node.

PART II. Verilog

1. Computer architecture. Please draw the 5level pipeline structure of classic MIPS CPU.

2. What's "Gray Code"? Please list the advantage of "Gray code". and implement (in verilog) a 2-bit Gray counter.

3. What's the difference between synchronous fifoand asynchronous fifo? Please list the keys when asynchronous fifo.

4. Use verilog the write a state-machine to cache a sequence of 11001101

5. Use verilog to design a 8-bit comparer (only with atomic operator like "~, &, |, ^ and d=a?b:c)

6. Describe an algorithm (fastest) to find the position of the highest bit 1 in a 16-bit unsigned integer.

PART Linux Design Verification and Computer Graphics

1. Regular expression_r of IP address.

2. Linux command. List 5 history commands entered.

3. Shell programming. Please count the total line number of all the .c, , es under directory "mydir"

4. Perl programming. Given arbitrary two strings, str1 and str2, and a file of name fn. write a program to replace all str1 in fn with str2.

5. Design verification. What's the significance of coverage in Design Verification? Please list kinds of coverage and illuminate their function. How to improve coverage ?

6. Computer Graphics. what's the difference between flat shading and gourand shading?

7. Computer Graphics. what's the main advantage to render scene from Vertax and Index?

8. Computer Graphics. Please describe the stages of how to transform a model space vertax?

9. Computer Graphics. What's viewport clipping?

10. Computer Graphics. What's the disadvantage to use Mipmap?

笔试题

1.选择下面哪一个是时序电路。四个选项分别是ADD XOR Latch D-Flop

2.问系统工作的`最大时钟频率是否跟Hold time有关,并说明理由

3.画出下面两个代码综合出来的电路图,并说明原因

a:if(aflag)

begin

opt1 <= a;

opt2 <= b;

end

esle

begin

opt1 <= c;

opt2 <= d;

end

always@(posedge clk)

out_data <= opt1 +opt2;

b: if(aflag)

out_data <= a+b;

else

opt2 <= d;

end

always@(posedge clk)

out_data <= opt1 +opt2;

b: if(aflag)

out_data <= a+b;

else

out_data <= c+d;

4.用图表说明下列脚本命令

a: set_multicycle_path 4 -setup -from dffa/cp -to dffb/d

b: set_multicycle_path 4 -setup -from dffa/cp -to dffb/d

set_multicycle_path 4 -hold -from dffa/cp -to dffb/d

//这三个命令不一定完全正确,凭记忆大概是这个样子的

5. 5分频,用Verilog HDL/VHDL实现

6. `timescale 1ns/1ps 与`timescale 1ns/50ps分别代表的意义以及区别

7.分别用shell以及perl(或任一你熟知的脚本语言)将当前目录下所有".c"文件后缀改成""

TAG标签:笔试 AMD 试题 #