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

Subversion Repositories instruction_list_pipelined_processor_with_peripherals

[/] [instruction_list_pipelined_processor_with_peripherals/] [trunk/] [hdl/] [tcPreset.v] - Blame information for rev 10

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

Line No. Rev Author Line
1 10 maheshpalv
////////////////////////////////////////////////////////////////////////////////////////////////
2
////                                                                                                                    ////
3
////                                                                                                                    ////
4
////    This file is part of the project                                                                                        ////
5
////    "instruction_list_pipelined_processor_with_peripherals"                                                         ////
6
////                                                                                                                    ////
7
////  http://opencores.org/project,instruction_list_pipelined_processor_with_peripherals        ////
8
////                                                                                                                    ////
9
////                                                                                                                    ////
10
////                             Author:                                                                                ////
11
////                            - Mahesh Sukhdeo Palve                                                                                                  ////
12
////                                                                                                                                                                            ////
13
////////////////////////////////////////////////////////////////////////////////////////////////
14
////////////////////////////////////////////////////////////////////////////////////////////////
15
////                                                                                                                                                                            ////
16
////                                                                                                                                                            ////
17
////                                                                                                                    ////
18
////                                    This source file may be used and distributed without                    ////
19
////                                    restriction provided that this copyright statement is not               ////
20
////                                    removed from the file and that any derivative work contains             ////
21
////                                    the original copyright notice and the associated disclaimer.            ////
22
////                                                                                                                    ////
23
////                                    This source file is free software; you can redistribute it              ////
24
////                                    and/or modify it under the terms of the GNU Lesser General              ////
25
////                                    Public License as published by the Free Software Foundation;            ////
26
////                                    either version 2.1 of the License, or (at your option) any              ////
27
////                                    later version.                                                          ////
28
////                                                                                                                    ////
29
////                                    This source is distributed in the hope that it will be                  ////
30
////                                    useful, but WITHOUT ANY WARRANTY; without even the implied              ////
31
////                                    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR                 ////
32
////                                    PURPOSE.  See the GNU Lesser General Public License for more            ////
33
////                                    details.                                                                ////
34
////                                                                                                                    ////
35
////                                    You should have received a copy of the GNU Lesser General               ////
36
////                                    Public License along with this source; if not, download it              ////
37
////                                    from http://www.opencores.org/lgpl.shtml                                ////
38
////                                                                                                                    ////
39
////////////////////////////////////////////////////////////////////////////////////////////////
40 3 maheshpalv
 
41
`include "timescale.v"
42
`include "defines.v"
43
 
44
 
45
module tcPreset (tcPresetEn, presetIn, tcAddr, presetOut);
46
 
47
        input tcPresetEn;
48
        input [`tcPresetLen-1:0] presetIn;
49
        input [`tcAddrLen-1:0] tcAddr;
50
 
51
        output [(`tcPresetLen*`tcNumbers)-1:0] presetOut;
52
 
53
        reg [`tcPresetLen-1:0] presets [`tcNumbers-1:0];
54
 
55
 
56
        always @ *
57
        begin
58
                if (tcPresetEn)
59
                begin
60
                        presets[tcAddr] = presetIn;
61
                end
62
        end
63
 
64
        assign presetOut[`tcPresetLen-1:0] = presets[0];
65
        assign presetOut[(`tcPresetLen*2)-1:`tcPresetLen] = presets[1];
66
        assign presetOut[(`tcPresetLen*3)-1:(`tcPresetLen*2)] = presets[2];
67
        assign presetOut[(`tcPresetLen*4)-1:(`tcPresetLen*3)] = presets[3];
68
        assign presetOut[(`tcPresetLen*5)-1:(`tcPresetLen*4)] = presets[4];
69
        assign presetOut[(`tcPresetLen*6)-1:(`tcPresetLen*5)] = presets[5];
70
        assign presetOut[(`tcPresetLen*7)-1:(`tcPresetLen*6)] = presets[6];
71 7 maheshpalv
//      assign presetOut[(`tcPresetLen*8)-1:(`tcPresetLen*7)] = presets[7];
72
//      assign presetOut[(`tcPresetLen*9)-1:(`tcPresetLen*8)] = presets[8];
73
//      assign presetOut[(`tcPresetLen*10)-1:(`tcPresetLen*9)] = presets[9];
74
//      assign presetOut[(`tcPresetLen*11)-1:(`tcPresetLen*10)] = presets[10];
75
//      assign presetOut[(`tcPresetLen*12)-1:(`tcPresetLen*11)] = presets[11];
76
//      assign presetOut[(`tcPresetLen*13)-1:(`tcPresetLen*12)] = presets[12];
77
//      assign presetOut[(`tcPresetLen*14)-1:(`tcPresetLen*13)] = presets[13];
78
//      assign presetOut[(`tcPresetLen*15)-1:(`tcPresetLen*14)] = presets[14];
79
//      assign presetOut[(`tcPresetLen*16)-1:(`tcPresetLen*15)] = presets[15];
80 3 maheshpalv
 
81
 
82
endmodule

powered by: WebSVN 2.1.0

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