Skip to content

Latest commit

 

History

History

Day-40

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

This Verilog module,

palindrome_checker, takes an 8-bit input data_in and outputs a signal is_palindrome, which is high (1) if the input is a palindrome and low (0) if it is not.

The module first flips the input data using data_in_flipped, and then it reverses the order of the bits to create reversed_data. Finally, it checks if the original input data_in is equal to reversed_data to determine if it's a palindrome.

Here's a Verilog testbench for the 8-bit palindrome checker module:

The testbench includes three test cases:

  1. Input 11011010, which is not a palindrome.
  2. Input 10101101, which is a palindrome.
  3. Input 11110000, which is not a palindrome.

The testbench uses a clock signal, and $display and $monitor statements are used to display the simulation time, input data, and the output is_palindrome signal. The simulation terminates after all test cases have been executed.