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.

[SOLVED] even parity check with data flow operators

Status
Not open for further replies.

mohsansaleem

Newbie level 3
Joined
Mar 2, 2016
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
72
hi
I want to build even parity check for the data of size [7:0] with data flow operators ?
can anyone help me , :)
thanx
 

like ,

Code:
assign parity_bit =(data_in[0]^data_in[1])^(data_in[2]^data_in[3])^(data_in[4]^data_in[5])^(data_in[6]^data_in[7]);
or

Code:
assign parity_bit =(data_in[7]^data_in[6])^(data_in[5]^data_in[4])^(data_in[3]^data_in[2])^(data_in[1]^data_in[0]);
 

so will use this statment without brackets

Code:
 assign parity_bit =(data_in[7]^data_in[6])^(data_in[5]^data_in[4])^(data_in[3]^data_in[2])^(data_in[1]^data_in[0]);
to get even parity ??
 

Yes. Brackets aren't needed.

- - - Updated - - -

Sure, even parity. Check yourself with pencil and paper method.
 

Instead of all that typing, use the reduction XOR operator e.g. assign even_parity = ^data_in
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top