发几verilog基础题
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.
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.
^_^ 我遇到过一个公司喜欢考n分频电路 至今没有找到很好的设计
北大青鸟APTECH授权培训中心
岳阳北大青鸟APTECH依托北京大学雄厚的师资力量和技术背景,引进世界一流的IT培训机构印度APTECH公司先进的、符合市场需求的软件工程师认证系列课程,以培养专业化的软件工程师为目的。2004年10月,岳阳电脑学校北大青鸟APTECH“飞”入岳阳,创建了国际化、标准化的计算机IT人才培养基地------北大青鸟APTECH(岳阳南湖)授权培训中心。
北大青鸟APTECH(岳阳南湖)授权培训中心地处岳阳市青年东路346号(市教育局对面),教学环境优雅、教学设施齐备,中心配有咨询室、阅览室、液晶显示器机房、多媒体教室、学员实训基地等供学员全面学习的环境。岳阳电脑培训中心严格遵照ISO9001质量标准体系的要求,面向行业、面向社会。以完善的管理、优秀的师资、先进的设备、不断更新的课程、先进的教学方法、优秀的教学质量以及完善的就业推荐体系,为社会提供计算机软件教育。
岳阳it培训成立至今,已得到了岳阳市委市政府及各大媒体的高度重视与关注。其中《岳阳晚报》、《长江信息报》、《洞庭之声》都有大篇幅的报道,并受岳阳人民广播电台邀请参加了节目录制。北大青鸟学费岳阳南湖中心本着对学员负责、对企业负责、对社会负责的服务宗旨,将立足于IT技术发展前沿,与IT 企业紧密合作,不断强化自身管理,严格保证教学质量,以先进的教学方法、优质教育产品和规范的经营管理为社会各界培养和输送高素质的IT 专业人才 。
回头研究一下
thanks,
学习了!
木有答案么?
