Recap - Always vs Initial
Teil des Abschnitts Grundlagen der Verilog-Journey von Coddy. Lektion 51 von 90.
Aufgabe
always vs initial
Vervollständige beide block, damit dieser counter korrekt funktioniert.
Was zu tun ist:
- Der
initial-block solltecountzum Zeitpunkt 0 auf 0 initialisieren. - Der
always-block solltecountbei jeder steigenden Taktflanke um 1 erhöhen.
Probier es selbst
module counter;
reg clk;
reg [3:0] count;
// Taktgenerator (bereits gegeben)
always #5 clk = ~clk;
// TODO: Add initial block to set count = 0
// TODO: Add always block to increment count on posedge clk
endmoduleAlle Lektionen in Grundlagen
1Einführung
Was ist VerilogHardware vs. SoftwareIhr erstes ModulKommentareAbstraktionsebenen des Designs4Operators 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Übe selbstständig: Online-Verilog-Compiler