Recap - Always vs Initial
Coddy Verilog 여정의 기초 섹션에 포함된 레슨. 90개 중 51번째.
챌린지
always와 initial 비교
이 카운터가 올바르게 작동하도록 두 블록을 모두 완성하세요.
할 일:
initial블록은 시간 0에count를 0으로 초기화해야 합니다.always블록은 클록의 각 상승 에지에서count를 1씩 증가시켜야 합니다.
직접 해보기
module counter;
reg clk;
reg [3:0] count;
// 클록 생성기 (이미 주어짐)
always #5 clk = ~clk;
// TODO: count = 0으로 설정하는 initial 블록 추가
// TODO: posedge clk에서 count를 증가시키는 always 블록 추가
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 Design5Operators 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 컴파일러