Please help me with test bench for sending serial 8 bit data for crc5 in verilog

CRC5=X^5+X^4+X^2+1
I HAVE WRITTEN CRC CODE FOR SERIAL BIT DATA IN FOLLOWING
I DIDNT GET TEST BENCH FOR SENDING 11110101

module crc5(data,clear, clk,out);
input data,clk,clear;
output [4:0]out;
reg[4:0]out;
wire lfsr;
assign lfsr= data^ out[4];
always @(posedge clk or posedge clear)
begin
if (clear)
begin
out = 0;
end
else begin
out[4] = out[3];
out[3] = out[2] ^ lfsr;
out[2] = out[1];
out[1] = out[0] ^ lfsr;
out[0] = lfsr;
end
end
endmodule
PLEASE HELP ME!!!

In reply to ajit sinam:
You need to first clarify your verification requirements, and once you understand them, specify the verification environment (the approach), and then the coding is the simplest thing. Specifically, for this small example, what are your goals? For example,

  1. Drive the DUT with a pseudo-random serial data stream
  2. The input sream should bave a coverage such that …
  3. At every TBD event, the expected output should be …

In your design and verification environment, consider using SystemVerilog instead of Verilog.
Consider using the SystemVerilog randomize function for driving the stimulus vectors. Also consider using SystemVerilog assertions in the verification.

From my extensive experience with forums, you get responses for generic types of questions related to language use, or usage of an approach, or a problem that is weird. You do not get answers in doing code for you, or try to debug your code. Anyway, an advice.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us

  • SystemVerilog Assertions Handbook 4th Edition, 2016 ISBN 978-1518681448
  • A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
  • Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
  • Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
  • Component Design by Example ", 2001 ISBN 0-9705394-0-1
  • VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
  • VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115