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.

Parity generation code

Status
Not open for further replies.

veeraj_patil

Newbie level 5
Newbie level 5
Joined
Jun 8, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Bangalore,India
Visit site
Activity points
57
I this syntax for generating parity correct ???

input [1:0] data;
output parity ;

assign parity=^(data);


Strange behavior ..giving mixture of odd and even parity.
Here's the result.

data parity
00 0
01 1
10 0
11 1

- - - Updated - - -

Ok got it,its correct.

parity=data(1)^data(0)
 

I this syntax for generating parity correct ???

input [1:0] data;
output parity ;

assign parity=^(data);


Strange behavior ..giving mixture of odd and even parity.
Here's the result.

data parity
00 0
01 1
10 0
11 1

it should be ok - something else you are doing is wrong !
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top