Recap - Logic Gate Circuit
Part of the Fundamentals section of Coddy's Verilog journey. Lesson 42 of 90.
Challenge
This challenge combines everything you learned in this chapter about gate primitives. You will build a circuit using multiple gates.
What to do:
Build a circuit with:
- Inputs:
a,b,c - Outputs:
out1,out2,out3
Logic:
out1=a AND bout2=b OR cout3=a XOR c
Use gate primitives (and, or, xor) to create these outputs.
Try it yourself
module logic_circuit (
input a,
input b,
input c,
output out1,
output out2,
output out3
);
// TODO: Add AND gate for out1 (a & b)
// TODO: Add OR gate for out2 (b | c)
// TODO: Add XOR gate for out3 (a ^ c)
endmoduleAll lessons in Fundamentals
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 LogicPractice on your own: Online Verilog compiler