Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

CRC Error insertion and detection

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?
 

ThisIsNotSam

Advanced Member level 5
Joined
Apr 6, 2016
Messages
1,975
Helped
351
Reputation
702
Reaction score
344
Trophy points
83
Activity points
9,893
you can use the force command in the simulator or the verilog version of force
 

rrucha

Member level 3
Joined
Jul 17, 2019
Messages
66
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
675
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?
 

ThisIsNotSam

Advanced Member level 5
Joined
Apr 6, 2016
Messages
1,975
Helped
351
Reputation
702
Reaction score
344
Trophy points
83
Activity points
9,893
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.
 

rrucha

Member level 3
Joined
Jul 17, 2019
Messages
66
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
675
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.
 

Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top