Assignment 7 System Design Through VERILOG - Unit 8 - Week 7 - Test Benches
Assignment 7 System Design Through VERILOG - Unit 8 - Week 7 - Test Benches
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL)
»
System Design Through VERILOG (course)
Register for Certification
exam
Assignment 7
(https://examform.nptel.ac.in/2022_04/exam_form/dashboard)
output y;
online course work? ()
input a,b,s;
assign y = (s)?b:a;
Week 1: Introduction to
endmodule
Verilog ()
wire Y;
parameter stop_time=50;
Week 3: Gate level
mux_2 × 1 M1 (.y(Y),.a(A),.b(B),.s(S));
initial #stop_time $finish;
Week 4: Switch level
initial begin
modeling ()
#10 S=0;
behavioral modeling ()
endmodule
circuits ()
1) At t = 0, the values of S, A, B,
and Y are respectively 1 point
Lec 18: Verilog modeling of
counters (unit?
0,0,1 and 0
unit=48&lesson=49)
0,0,1 and 1
Lec 19: Verilog modeling of
1,0,1 and 0
sequence detector (unit?
1,0,1 and 1
unit=48&lesson=50)
2) At t = 5, the values of S, A, B, and Y are
respectively 1 point
Lec 20: Verilog modeling
FSMs and shift registers
0,1,0 and 0
(unit?unit=48&lesson=51)
1,1,0 and 1
Quiz: Assignment 6
0,0,1 and 1
(assessment?name=90)
1,0,1 and 1
Week 6: Feedback form
(unit?unit=48&lesson=52) 3) At t = 15, the values of S, A, B, and Y are respectively 1 point
Solution: Assignment 6
0,1,0 and 0
(unit?unit=48&lesson=53)
1,1,0 and 0
Week 7: Test benches ()
0,0,1 and 1
1,0,1 and 0
Lec 21: Combinational
circuit examples (unit? 4) At t = 25, the values of S, A, B and Y are respectively 1 point
unit=54&lesson=55)
0,0,1 and 1
Lec 22: Sequential circuit
examples (unit?
1,0,1 and 0
unit=54&lesson=56)
0,1,0 and 1
input D,Clk,Reset;
Quiz: Assignment 7
always
@(negedge Clk)
(assessment?name=91) if
(Reset)
Q
= 1’b0;
Week 7: Feedback form
else
(unit?unit=54&lesson=59)
Q
<= D;
`timescale 1ns /
1ps
Week 8: Case studies ()
module DFF_tb;
// Inputs
Download () reg D;
reg Clk;
// Outputs
Session ()
wire Qbar;
// Instantiate
the Design Under Test (DUT)
Transcripts ()
// Initialize
Inputs
Clk = 1'b0;
forever #10
Clk = ~Clk;
end
initial begin
D=0; Reset = 1;
#13 Reset=0;
#18 D=1;
#37 Reset=1;
end
endmodule
0,0
0,1
1,0
1,1
0,0
0,1
1,0
1,1
0,0
0,1
1,0
1,1
You may submit any number of times before the due date. The final submission will be considered for grading.
Submit Answers