Recap - Timing Control
CoddyのVerilogジャーニー「基礎」セクションの一部。レッスン 72/90。
チャレンジ
このチャレンジでは、遅延、gate delay、assignment delay、timescale、そして clock の生成についての理解をテストします。
実行すること:
timescaledirective with1ns / 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は直ちに Read)
自分で試してみよう
// TODO: タイムスケールディレクティブを追加 (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オンラインコンパイラ