Recap - Timing Control
Coddy Verilog 여정의 기초 섹션에 포함된 레슨. 90개 중 72번째.
챌린지
이 챌린지는 delay, gate delay, assignment delay, timescale 및 clock generation에 대한 이해도를 평가합니다.
수행할 작업:
timescaledirective를1ns / 1ps와 함께 Add- 5 time units마다 toggles하는 clock을 Generate
- 3 time unit gate delay가 있는 AND gate를 Add
- assignment delay를 사용하여 2 time units after
a를b에 assign (a는 immediately Read)
직접 해보기
// TODO: timescale 지시문 추가 (1ns / 1ps)
module timing_challenge;
reg clk;
reg a, b;
wire out;
initial begin
clk = 0;
end
// TODO: 5 시간 단위마다 토글되는 클록 생성
// TODO: 3 시간 단위 지연이 있는 AND 게이트 추가 (입력 a, b, 출력 out)
initial begin
$monitor("Time %0t: clk=%b, a=%b, b=%b, out=%b", $time, clk, a, b, out);
a = 1;
// TODO: 할당 지연을 사용하여 2 시간 단위 후에 a를 b에 할당
// 지금 a를 읽고, 2 시간 단위 후에 b에 할당
#20;
$finish;
end
endmodule기초의 모든 레슨
4Operators Part 1
Arithmetic OperatorsModulo OperatorComparison OperatorsRecap - Simple MathBitwise Operators7Assign And Gates
Continuous AssignmentAssign With OperatorsBuilt In Gate PrimitivesAND OR NOT GatesXOR XNOR GatesRecap - Logic Gate Circuit10Decision Making
If StatementIf - ElseRecap - Simple ComparatorCase StatementCasex And CasezRecap - ALU Design13Timing And Delays
What Are DelaysGate DelaysAssignment DelaysTimescale DirectiveClock GenerationRecap - Timing Control5Operators Part 2
Logical OperatorsReduction OperatorsShift OperatorsConcatenation OperatorConditional OperatorRecap - Operator Challenge3Number System
Binary RepresentationSized NumbersUnsized NumbersNegative NumbersSpecial Values X And ZRecap - Number Formats6Modules
Module StructureInput And Output PortsInout PortsModule InstantiationPort Mapping By NamePort Mapping By OrderRecap - Build A Module9Procedural Blocks
Always BlockInitial BlockSensitivity ListBlocking AssignmentNon Blocking AssignmentRecap - Always vs Initial15Traffic Light Controller
Defining The StatesState Machine Logic직접 연습해 보세요: 온라인 Verilog 컴파일러