在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3036|回复: 6

发几verilog基础题

[复制链接]
发表于 2008-12-17 19:05:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
1. Is this a valid, synthesizable, use of a for loop?

module for_loop();

reg [8:0] A, B;
integer i;
parameter N=8;
always@(B)
begin
for (i=1; i<=N; i=i+1)
A[i-1]=B;
A[N] = A[N-1];
end
endmodule

2. Assuming the code above is synthesizable, Which of the following continuous assignment statements would have the closest meaning?

A. assign A = B << 1;
B. assign A = B <<< 1;
C. assign A = B >> 1;
D. assign A = B >>> 1;

3. If the following logic is built exactly as described, which test vector sensitizes a stuck-at-0 fault at "e" and propagates it to the output "g".


module (a, b, c, d, e, f, g);
input a, b, c, d;
output e, f, g;

assign e = a & b;
assign f = c ^ e;
assign g = d | f;

endmodule

A. {a, b, c, d} = 4’b0010;
B. {a, b, c, d} = 4’b1100;
C. {a, b, c, d} = 4’b1111;
D. {a, b, c, d} = 4’b0101;
E. None of the above

4. Consider the following two test fixtures.

// Fixture A
parameter delay1 =
parameter delay2 =
initial
begin
B = 1’b0;
#20 A = 1’b1;
#delay1 A = 1’b0;
#delay2 B = 1'b1;
end

// Fixture B
initial
fork
B = 1’b0;
#20 A = 1’b1;
#40 A = 1’b0;
#60 B = 1’b1;
join

For these two fixtures to produce the same waveforms, delay1 and delay2 have to be set
as follows:

A. delay1 = 40; delay2 = 60;
B. delay1 = 30; delay2 = 20;
C. delay1 = 30; delay2 = 30;
D. delay1 = 20; delay2 = 20;
E. None of these are correct

5. In verification, most of the effort should be applied at the system (complete chip) level. Which of the following statements gives the best reason as to why?


A. Most of the bugs in a design are in the netlist wiring it together.
B. Most of the bugs in a design are due to poorly understood interactions between different modules.
C. This is the fastest way to verify the individual modules that make up the design.
D. Most of the bugs in a design occur because of poorly designed interfaces, e.g. buses.
E. None of the above are remotely a good reason.

6. Consider the following specify block:

specify
specparam A0spec = 1 : 2 : 3;
specparam A1spec = 2 : 3 : 4;
(a => b) = (A0spec, A1spec);
endspecify

This is defining the following:

A. Rising, falling and steady delay from input a to output b of 1, 2, and 3 ns respectively when a is 0, and 2, 3, and 4 ns when a is 1.
B. Minimum, typical and maximum delay from input a to output b of 1, 2, and 3 ns on a rising edge at B, and 2, 3 and 4 ns on a falling edge.
C. Non-blocking assignment of a to b with minimum, typical and maximum delay of 1, 2 and 3ns.
D. Setup time requirements for the flip-flop with output B.
发表于 2008-12-17 21:31:06 | 显示全部楼层
1. Is this a valid, synthesizable, use of a for loop?
module for_loop();
reg [8:0] A, B;
integer i;
parameter N=8;
always@(B)
begin
for (i=1; i<=N; i=i+1)
A[i-1]=B;
A[N] = A[N-1];
end
endmodule
2. Assuming the code above is synthesizable, Which of the following continuous assignment statements would have the closest meaning?
A. assign A = B << 1;
B. assign A = B <<< 1;
C. assign A = B >> 1;
D. assign A = B >>> 1;
3. If the following logic is built exactly as described, which test vector sensitizes a stuck-at-0 fault at "e" and propagates it to the output "g".
module (a, b, c, d, e, f, g);
input a, b, c, d;
output e, f, g;
assign e = a & b;
assign f = c ^ e;
assign g = d | f;
endmodule
A. {a, b, c, d} = 4’b0010;
B. {a, b, c, d} = 4’b1100;
C. {a, b, c, d} = 4’b1111;
D. {a, b, c, d} = 4’b0101;
E. None of the above
4. Consider the following two test fixtures.
// Fixture A
parameter delay1 =
parameter delay2 =
initial
begin
B = 1’b0;
#20 A = 1’b1;
#delay1 A = 1’b0;
#delay2 B = 1'b1;
end
// Fixture B
initial
fork
B = 1’b0;
#20 A = 1’b1;
#40 A = 1’b0;
#60 B = 1’b1;
join
For these two fixtures to produce the same waveforms, delay1 and delay2 have to be set
as follows:
A. delay1 = 40; delay2 = 60;
B. delay1 = 30; delay2 = 20;
C. delay1 = 30; delay2 = 30;
D. delay1 = 20; delay2 = 20;
E. None of these are correct
5. In verification, most of the effort should be applied at the system (complete chip) level. Which of the following statements gives the best reason as to why?
A. Most of the bugs in a design are in the netlist wiring it together.
B. Most of the bugs in a design are due to poorly understood interactions between different modules.
C. This is the fastest way to verify the individual modules that make up the design.
D. Most of the bugs in a design occur because of poorly designed interfaces, e.g. buses.
E. None of the above are remotely a good reason.
6. Consider the following specify block:
specify
specparam A0spec = 1 : 2 : 3;
specparam A1spec = 2 : 3 : 4;
(a => b) = (A0spec, A1spec);
endspecify
This is defining the following:
A. Rising, falling and steady delay from input a to output b of 1, 2, and 3 ns respectively when a is 0, and 2, 3, and 4 ns when a is 1.
B. Minimum, typical and maximum delay from input a to output b of 1, 2, and 3 ns on a rising edge at B, and 2, 3 and 4 ns on a falling edge.
C. Non-blocking assignment of a to b with minimum, typical and maximum delay of 1, 2 and 3ns.
D. Setup time requirements for the flip-flop with output B.
发表于 2009-2-27 00:06:35 | 显示全部楼层
^_^  我遇到过一个公司喜欢考n分频电路 至今没有找到很好的设计
发表于 2009-2-27 08:32:18 | 显示全部楼层

北大青鸟APTECH授权培训中心

岳阳北大青鸟APTECH依托北京大学雄厚的师资力量和技术背景,引进世界一流的IT培训机构印度APTECH公司先进的、符合市场需求的软件工程师认证系列课程,以培养专业化的软件工程师为目的。2004年10月,岳阳电脑学校北大青鸟APTECH“飞”入岳阳,创建了国际化、标准化的计算机IT人才培养基地------北大青鸟APTECH(岳阳南湖)授权培训中心。

  北大青鸟APTECH(岳阳南湖)授权培训中心地处岳阳市青年东路346号(市教育局对面),教学环境优雅、教学设施齐备,中心配有咨询室、阅览室、液晶显示器机房、多媒体教室、学员实训基地等供学员全面学习的环境。岳阳电脑培训中心严格遵照ISO9001质量标准体系的要求,面向行业、面向社会。以完善的管理、优秀的师资、先进的设备、不断更新的课程、先进的教学方法、优秀的教学质量以及完善的就业推荐体系,为社会提供计算机软件教育。

  岳阳it培训成立至今,已得到了岳阳市委市政府及各大媒体的高度重视与关注。其中《岳阳晚报》、《长江信息报》、《洞庭之声》都有大篇幅的报道,并受岳阳人民广播电台邀请参加了节目录制。北大青鸟学费岳阳南湖中心本着对学员负责、对企业负责、对社会负责的服务宗旨,将立足于IT技术发展前沿,与IT 企业紧密合作,不断强化自身管理,严格保证教学质量,以先进的教学方法、优质教育产品和规范的经营管理为社会各界培养和输送高素质的IT 专业人才 。
发表于 2009-2-27 09:52:46 | 显示全部楼层
回头研究一下
发表于 2009-2-27 14:40:45 | 显示全部楼层
thanks,
学习了!!
发表于 2009-2-27 17:28:12 | 显示全部楼层
木有答案么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-18 22:18 , Processed in 0.022616 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表