CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Combinational Logic

Basic Module Ports

EasyVerilog / SystemVerilogBuildFree

Digital control paths frequently require simple combinational logic blocks to evaluate multiple condition flags into a single decision signal. A basic module definition establishes the fundamental interface between this logic block and the rest of the system.

This module evaluates three 1-bit inputs to compute a single 1-bit output. The output evaluates to 1 if both input a and input b are asserted, or if the override input c is asserted. Otherwise, the output evaluates to 0.

This circuit is entirely combinational. There is no clock or reset signal. The output must reflect the current state of the inputs continuously and immediately.

| Signal | Direction | Width | Description | |--------|-----------|-------|-------------| | a | input | 1 | First condition flag | | b | input | 1 | Second condition flag | | c | input | 1 | Override condition flag | | out | output | 1 | Resulting decision signal |

Constraints

  • The module must be named solution.
  • The output must be strictly combinational.
  • Do not use any sequential logic elements such as latches or flip-flops.
  • The output must evaluate to 0 when all inputs are 0.

Topics

Combinational LogicSyntaxVerilog Basics

Solve this problem

Write the module in Verilog, SystemVerilog or VHDL. Your submission is compiled and simulated against a real testbench — you get the waveform back, not a stored answer.

Free to solve. A Codiode account keeps your progress.

Sign in to solve

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • Single Continuous AssignmentEasy
  • Ternary Operator MuxEasy
  • Basic Vector ConcatenationEasy
  • Underscores for ReadabilityEasy
  • Left Hand Side ConcatenationEasy
  • Inout Port MechanicsEasy
  • Explicit Binary LiteralsEasy
  • Hexadecimal and Octal LiteralsEasy

Browse all problems · Learning tracks