Recap - Number Formats
Coddy'nin Verilog Journey'sinin Temeller bölümünün bir parçası. Ders 18 / 90.
Görev
Belirtilen biçimlerde doğru değerleri yazarak kodu tamamlayın.
Yapılacaklar:
adeğerini, decimal 170 için 8-bit binary (10101010) olarak ayarlayınbdeğerini, 255 için 8-bit decimal olarak ayarlayıncdeğerini, FF için 16-bit hex olarak ayarlayınddeğerini, bit 2'si X olan (others 1) 4-bit bir değer olarak ayarlayınedeğerini, all bit Z olacak şekilde (4 bit) ayarlayın
Kendin dene
module number_formats;
wire [7:0] a, b;
wire [15:0] c;
wire [3:0] d, e;
assign a = ______; // 170 için 8-bit ikili
assign b = ______; // 255 için 8-bit ondalık
assign c = ______; // FF için 16-bit onaltılık
assign d = ______; // 4-bit: bit 2 X, diğerleri 1
assign e = ______; // 4-bit: tüm bitler Z
initial begin
$display("a = %b", a);
$display("b = %b", b);
$display("c = %h", c);
$display("d = %b", d);
$display("e = %b", e);
$finish;
end
endmoduleTemeller bölümündeki tüm dersler
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 LogicKendi başına pratik yap: Online Verilog derleyicisi