OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [orpsocv2/] [rtl/] [verilog/] [or1200/] [or1200_parity_chk.v] - Blame information for rev 483

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 482 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200 Parity Checking                                      ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6
////  http://opencores.org/project,or1k                           ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Parity bit checking, combinatorial. Presumes single bit of  ////
10
////  parity supplied to check against. Signals error on parity   ////
11
////  mismatch.                                                   ////
12
////                                                              ////
13
////  To Do:                                                      ////
14
////                                                              ////
15
////  Author(s):                                                  ////
16
////      - Julius Baxter,  julius@opencores.org                  ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2011 Authors and OPENCORES.ORG                 ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
 
45
 
46
// synopsys translate_off
47
`include "timescale.v"
48
// synopsys translate_on
49
`include "or1200_defines.v"
50
 
51
module or1200_parity_chk
52
  (
53
   d_i,
54
   p_i,
55
   err_o
56
   );
57
 
58
   // Width of data we check parity for.
59
   parameter dw = 8;
60
 
61
   input [dw-1:0] d_i; // Data word in
62
   input          p_i; // Parity bit in
63
   output         err_o; // Error indicator out
64
 
65 483 julius
   // Is nice if X's don't propegate through here during simulation, so use
66
   // !==
67
   assign err_o = ((^d_i[dw-1:0]) !== p_i);
68
 
69 482 julius
endmodule // or1200_parity_chk
70
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.