Codiode

Basic Module Ports

EasyVerilog / SystemVerilogBuildFree62 solved

A module is its port list first and its logic second. This one takes three condition flags and turns them into one decision.

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 the problem's testbench. You get the waveform back, not a stored answer.

Free to solve. A Codiode account keeps your progress.

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.

Part of Verilog Syntax and Language Basics

Problem 1 of 25 in the Verilog Syntax and Language Basics track.

Related problems

Browse all problems · Verilog practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.