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

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [rtl/] [8051/] [oc8051_cy_select.v] - Blame information for rev 21

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dinesha
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  8051 alu carry select module                                ////
4
////                                                              ////
5
////  This file is part of the 8051 cores project                 ////
6
////  http://www.opencores.org/cores/8051/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////   Multiplexer wiht whitch we select carry in alu             ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   nothing                                                    ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Simon Teran, simont@opencores.org                     ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE.  See the GNU Lesser General Public License for more ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from http://www.opencores.org/lgpl.shtml                     ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//
44
// CVS Revision History
45
//
46
// $Log: not supported by cvs2svn $
47
// Revision 1.3  2003/04/02 11:26:21  simont
48
// updating...
49
//
50
// Revision 1.2  2002/09/30 17:33:59  simont
51
// prepared header
52
//
53
//
54
 
55
// synopsys translate_off
56
`include "oc8051_timescale.v"
57
// synopsys translate_on
58
 
59
`include "oc8051_defines.v"
60
 
61
 
62
module oc8051_cy_select (cy_sel, cy_in, data_in, data_out);
63
//
64
// cy_sel       (in)  carry select, from decoder (see defines.v) [oc8051_decoder.cy_sel -r]
65
// cy_in        (in)  carry input [oc8051_psw.data_out[7] ]
66
// data_in      (in)  ram data input [oc8051_ram_sel.bit_out]
67
// data_out     (out) data output [oc8051_alu.srcCy]
68
//
69
 
70
input [1:0] cy_sel;
71
input cy_in, data_in;
72
 
73
output data_out;
74
reg data_out;
75
 
76
always @(cy_sel or cy_in or data_in)
77
begin
78
  case (cy_sel) /* synopsys full_case parallel_case */
79
    `OC8051_CY_0: data_out = 1'b0;
80
    `OC8051_CY_PSW: data_out = cy_in;
81
    `OC8051_CY_RAM: data_out = data_in;
82
    `OC8051_CY_1: data_out = 1'b1;
83
  endcase
84
end
85
 
86
endmodule

powered by: WebSVN 2.1.0

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