RTL Studio Open IDE

Logic Gates

Bitwise Mask AND/OR 8-bit

An 8-bit combinational logic module that performs bitwise AND or OR operations based on a mode select signal.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

Bitwise Mask AND/OR 8-bit is a Verilog reference block in the Logic Gates catalog. AND, OR, XOR, and other combinational gate and boolean logic primitives. Marked Easy: a small block you can read, simulate, and synthesize in one sitting.

This IP implements an 8-bit bitwise logic unit supporting both AND and OR operations. The operation is selected via a single mode control signal.

This module provides a simple and efficient way to perform bitwise masking operations. It is suitable for applications requiring dynamic data filtering or modification.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Bitwise Mask AND/OR 8-bit.
  2. Read the Verilog module in the editor. The catalog line for this block: An 8-bit combinational logic module that performs bitwise AND or OR operations based on a mode select signal.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Features

  • Supports 8-bit data and mask inputs.
  • Selectable bitwise AND or OR operation.
  • Combinational logic with zero latency.
  • Simple interface suitable for datapath integration.

Ports

PortDirectionWidthDescription
datainput8Data input vector
maskinput8Mask input vector
modeinput1Operation select (0=AND, 1=OR)
youtput8Result output vector

Verification

The testbench covers all functional modes and edge cases.

Test CaseDescriptionExpected ResultStatus
TC1Mode 0, mask 0x00y = 0x00PASS
TC2Mode 0, mask 0xFFy = dataPASS
TC3Mode 0, partial masky = 0x0FPASS
TC4Mode 1, mask 0x00y = dataPASS
TC5Mode 1, mask 0xFFy = 0xFFPASS
TC6Mode 1, partial masky = 0xF0PASS
TC7Mode 1, mixed data/masky = 0xFFPASS
TC8Mode 0, mixed data/masky = 0x00PASS

All 8 test cases passed successfully. Simulation waveform data is available in sim/dump.vcd.

More in Logic Gates

All Logic Gates blocks