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/] [tcAccum.v] - Blame information for rev 7

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

Line No. Rev Author Line
1 3 maheshpalv
 
2
`include "timescale.v"
3
`include "defines.v"
4
 
5
 
6
module tcAccum (tcAccumRead, tcAddr, tcAccumIn, tcAccumOut);
7
 
8
        input tcAccumRead;
9
        input [`tcAddrLen-1:0] tcAddr;
10
        input [(`tcAccLen*`tcNumbers)-1:0] tcAccumIn;
11
 
12
        output [`tcAccLen-1:0] tcAccumOut;
13
 
14
        wire [`tcAccLen-1:0] ACC_all [`tcNumbers-1:0];    // used in continuous assignment
15
        reg [`tcAccLen-1:0] tcAccumOut;
16
 
17
 
18
        always @ (tcAccumRead or tcAddr)
19
        begin
20
                if (tcAccumRead)
21
                begin
22
                        tcAccumOut = ACC_all[tcAddr];
23
                        $write ("       reading t/c accumulated value   : module tcAccum        ");
24
                end
25
        end
26
 
27
        assign ACC_all[0] = tcAccumIn[`tcAccLen-1:0];
28
        assign ACC_all[1] = tcAccumIn[(`tcAccLen*2)-1:`tcAccLen];
29
        assign ACC_all[2] = tcAccumIn[(`tcAccLen*3)-1:(`tcAccLen*2)];
30
        assign ACC_all[3] = tcAccumIn[(`tcAccLen*4)-1:(`tcAccLen*3)];
31
        assign ACC_all[4] = tcAccumIn[(`tcAccLen*5)-1:(`tcAccLen*4)];
32
        assign ACC_all[5] = tcAccumIn[(`tcAccLen*6)-1:(`tcAccLen*5)];
33
        assign ACC_all[6] = tcAccumIn[(`tcAccLen*7)-1:(`tcAccLen*6)];
34
        assign ACC_all[7] = tcAccumIn[(`tcAccLen*8)-1:(`tcAccLen*7)];
35 7 maheshpalv
//      assign ACC_all[8] = tcAccumIn[(`tcAccLen*9)-1:(`tcAccLen*8)];
36
//      assign ACC_all[9] = tcAccumIn[(`tcAccLen*10)-1:(`tcAccLen*9)];
37
//      assign ACC_all[10] = tcAccumIn[(`tcAccLen*11)-1:(`tcAccLen*10)];
38
//      assign ACC_all[11] = tcAccumIn[(`tcAccLen*12)-1:(`tcAccLen*11)];
39
//      assign ACC_all[12] = tcAccumIn[(`tcAccLen*13)-1:(`tcAccLen*12)];
40
//      assign ACC_all[13] = tcAccumIn[(`tcAccLen*14)-1:(`tcAccLen*13)];
41
//      assign ACC_all[14] = tcAccumIn[(`tcAccLen*15)-1:(`tcAccLen*14)];
42
//      assign ACC_all[15] = tcAccumIn[(`tcAccLen*16)-1:(`tcAccLen*15)];
43 3 maheshpalv
 
44
 
45
endmodule

powered by: WebSVN 2.1.0

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