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

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 tcLoad (tcLoadEn, tcAddr, dnIn, ttIn, cuIn, cdIn, tcLoadOut);
7
 
8
        input tcLoadEn;
9
        input [`tcAddrLen-1:0] tcAddr;
10
        input [`tcNumbers-1:0] dnIn, ttIn, cuIn, cdIn;
11
 
12
        output [7:0] tcLoadOut;
13
 
14
        reg [`tcNumbers-1:0] dnInReg, ttInReg, cuInReg, cdInReg;
15
 
16
        wire dnSel, ttSel, cuSel, cdSel;
17
 
18
        always @ *
19
        begin
20
                dnInReg = dnIn;
21
                ttInReg = ttIn;
22
                cuInReg = cuIn;
23
                cdInReg = cdIn;
24
        end
25
 
26
        assign dnSel = dnInReg[tcAddr];
27
        assign ttSel = ttInReg[tcAddr];
28
        assign cuSel = cuInReg[tcAddr];
29
        assign cdSel = cdInReg[tcAddr];
30
 
31
        assign tcLoadOut = {4'b0, dnSel, ttSel, cuSel, cdSel};
32
 
33
endmodule

powered by: WebSVN 2.1.0

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