Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CRC Error insertion and detection

Status
Not open for further replies.

rrucha

Member level 3
Joined
Jul 17, 2019
Messages
66
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
675
Hello,

I have the auto generated CRC parallel verilog code for muti-bit data stream. I even wrote a testbench to check the CRC. Now I want to write a testbench that injects random errors and detects it. How can i do that in verilog?
 

you can use the force command in the simulator or the verilog version of force
 

you can use the force command in the simulator or the verilog version of force

How will I detect it? Do I need to make the testbench such that it will emulate the receiver (receive the appended message, divide it by the polynomial and check if final answer is 0). So I will randomly inject errors and also check for it?
 

How will I detect it? Do I need to make the testbench such that it will emulate the receiver (receive the appended message, divide it by the polynomial and check if final answer is 0). So I will randomly inject errors and also check for it?

it's probably easier to have two instances of the design, one that you insert errors and one that you don't. provide the same inputs and see if the outputs match.
 

it's probably easier to have two instances of the design, one that you insert errors and one that you don't. provide the same inputs and see if the outputs match.

So what you are saying is, 1. Check the CRC for a message without error 2. Check the CRC for a message with error. See if CRC1=CRC2; which they obviously wont be. And since the CRC with an injected error does not match the original CRC, there is an error in the message. Am I right? No need to emulate the receiver.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top