Coding & Line Codes
8-Bit Parallel Descrambler
Combinational 8-bit parallel descrambler using a fixed XOR mask to reverse scrambling operations.
About this block
Simulate it in the Verilog IDE
8-Bit Parallel Descrambler is a Verilog reference block in the Coding & Line Codes catalog. Line codes, serializers, and digital encoding/decoding blocks. Marked Easy: a small block you can read, simulate, and synthesize in one sitting.
This IP implements a combinational 8-bit parallel descrambler. It reverses a fixed XOR scrambling operation using a predefined mask. The design is purely combinational with no internal state or clock dependency.
The module applies a bitwise XOR operation between the input data and a constant mask. The mask value is defined as 8'hB7 in the RTL. This operation is symmetric, meaning applying the same mask again restores the original data.
This IP provides a simple, efficient method for reversing a fixed XOR scramble. It is suitable for applications requiring lightweight data obfuscation reversal. The design is synthesizable and has been verified via Icarus Verilog.
- Choose Open in IDE. RTL Studio loads the packaged workspace for 8-Bit Parallel Descrambler.
- Read the Verilog module in the editor. The catalog line for this block: Combinational 8-bit parallel descrambler using a fixed XOR mask to reverse scrambling operations.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- 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.
Ports
| Port Name | Direction | Width | Description |
|---|---|---|---|
| data_in | Input | [7:0] | 8-bit data input to be descrambled |
| data_out | Output | [7:0] | 8-bit data output after descrambling |
Architecture
The following diagram illustrates the data flow within the module.
The core logic is a single assignment statement: assign data_out = data_in ^ 8'hB7;
Verification
The testbench verifies the functionality against expected XOR results. All test cases passed successfully during simulation.
| Test Case | Input Hex | Expected Output | Actual Output | Status |
|---|---|---|---|---|
| TC1 | 0x00 | 0xB7 | 0xB7 | PASS |
| TC2 | 0xFF | 0x48 | 0x48 | PASS |
| TC3 | 0x5A | 0xED | 0xED | PASS |
| TC4 | 0xA5 | 0x12 | 0x12 | PASS |
| TC5 | 0x3C | 0x8B | 0x8B | PASS |
| TC6 | 0x00-0x28 | data_in ^ 0xB7 | Correct | PASS |
Simulation logs confirm zero errors across all manual and loop-based tests. Use the RtlStudio Waveform tab with sim/dump.vcd to inspect signal transitions.
More in Coding & Line Codes
- 4-Bit Hex to 7-Segment Display Decoder
- 4b/6b Run-Length Limited Encoder
- 8-Bit Differential Encoder/Decoder (NRZ-D) — L1 Upgrade — L2 Upgrade
- 8-bit Huffman Encoder (Static Table)
- 8-Bit Manchester Encoder (IEEE 802.3 Compliant)
- 8-Bit Nibble-Swap Endian Converter — L1 Upgrade — L2 Upgrade
- 8-Bit Run-Length Decoder (RLE)
- 8b/10b Encoder and Decoder
- Additive Scrambler 8-bit — L2 Upgrade
- Bit Unstuffer After 5 Ones — L2 Upgrade
- Golay (24,12) Encoder with Syndrome Calculator
- Hamming (7,4) Decoder
- Hamming (7,4) Encoder
- HDLC Bit Stuffing (5 Ones)
- HDLC Bit-Stuff Remover
- NRZ-to-NRZI Line Encoder — L2 Upgrade