RTL Studio Open IDE

Logic Gates

8-Bit NAND Reduction

Computes the NAND of all bits in an 8-bit input vector.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

8-Bit NAND Reduction 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 NAND reduction gate. It computes the NAND of all bits in an 8-bit input vector. The output is low only when all input bits are high.

This IP provides a simple and efficient 8-bit NAND reduction. It is suitable for control logic and parity-like checks. The design is fully combinational with zero latency.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 8-Bit NAND Reduction.
  2. Read the Verilog module in the editor. The catalog line for this block: Computes the NAND of all bits in an 8-bit input vector.
  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.

Architecture

The design uses a single continuous assignment statement. It reduces the 8-bit input using the bitwise AND operator. The result is inverted to produce the NAND output.

Ports

PortDirectionWidthDescription
dataInput[7:0]Input data vector
yOutput1NAND reduction result

Verification

The testbench verifies three specific scenarios. Test Case 1 checks the all-ones input condition. Test Case 2 checks the all-zeros input condition. Test Case 3 checks a mixed-bit input condition. All test cases passed successfully in simulation.

Test CaseInputExpected OutputStatus
TC18'hFF1'b0PASS
TC28'h001'b1PASS
TC38'hAB1'b1PASS

More in Logic Gates

All Logic Gates blocks