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

Subversion Repositories thor

[/] [thor/] [trunk/] [rtl/] [verilog/] [Thor_livetarget.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2013,2015  Robert Finch, Stratford
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch<remove>@finitron.ca
6
//       ||
7
//
8
// This source file is free software: you can redistribute it and/or modify 
9
// it under the terms of the GNU Lesser General Public License as published 
10
// by the Free Software Foundation, either version 3 of the License, or     
11
// (at your option) any later version.                                      
12
//                                                                          
13
// This source file is distributed in the hope that it will be useful,      
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
16
// GNU General Public License for more details.                             
17
//                                                                          
18
// You should have received a copy of the GNU General Public License        
19
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
20
//
21
//
22
// Thor SuperScalar
23
// Live Target logic
24
//
25
// ============================================================================
26
//
27
//1675 LUTs
28
module Thor_livetarget(iqentry_v,iqentry_stomp,iqentry_cmt,tgt0,tgt1,tgt2,tgt3,tgt4,tgt5,tgt6,tgt7,livetarget,
29
        iqentry_0_livetarget,
30
        iqentry_1_livetarget,
31
        iqentry_2_livetarget,
32
        iqentry_3_livetarget,
33
        iqentry_4_livetarget,
34
        iqentry_5_livetarget,
35
        iqentry_6_livetarget,
36
        iqentry_7_livetarget
37
);
38
parameter NREGS = 111;
39
input [7:0] iqentry_v;
40
input [7:0] iqentry_stomp;
41
input [7:0] iqentry_cmt;
42
input [6:0] tgt0;
43
input [6:0] tgt1;
44
input [6:0] tgt2;
45
input [6:0] tgt3;
46
input [6:0] tgt4;
47
input [6:0] tgt5;
48
input [6:0] tgt6;
49
input [6:0] tgt7;
50
output [NREGS:1] livetarget;
51
output [NREGS:1] iqentry_0_livetarget;
52
output [NREGS:1] iqentry_1_livetarget;
53
output [NREGS:1] iqentry_2_livetarget;
54
output [NREGS:1] iqentry_3_livetarget;
55
output [NREGS:1] iqentry_4_livetarget;
56
output [NREGS:1] iqentry_5_livetarget;
57
output [NREGS:1] iqentry_6_livetarget;
58
output [NREGS:1] iqentry_7_livetarget;
59
 
60
wire [6:0] iqentry_tgt [0:7];
61
assign iqentry_tgt[0] = tgt0;
62
assign iqentry_tgt[1] = tgt1;
63
assign iqentry_tgt[2] = tgt2;
64
assign iqentry_tgt[3] = tgt3;
65
assign iqentry_tgt[4] = tgt4;
66
assign iqentry_tgt[5] = tgt5;
67
assign iqentry_tgt[6] = tgt6;
68
assign iqentry_tgt[7] = tgt7;
69
 
70
wire [NREGS:1] iq0_out;
71
wire [NREGS:1] iq1_out;
72
wire [NREGS:1] iq2_out;
73
wire [NREGS:1] iq3_out;
74
wire [NREGS:1] iq4_out;
75
wire [NREGS:1] iq5_out;
76
wire [NREGS:1] iq6_out;
77
wire [NREGS:1] iq7_out;
78
 
79
reg [NREGS:1] livetarget;
80
 
81
decoder7 iq0(.num(iqentry_tgt[0]), .out(iq0_out));
82
decoder7 iq1(.num(iqentry_tgt[1]), .out(iq1_out));
83
decoder7 iq2(.num(iqentry_tgt[2]), .out(iq2_out));
84
decoder7 iq3(.num(iqentry_tgt[3]), .out(iq3_out));
85
decoder7 iq4(.num(iqentry_tgt[4]), .out(iq4_out));
86
decoder7 iq5(.num(iqentry_tgt[5]), .out(iq5_out));
87
decoder7 iq6(.num(iqentry_tgt[6]), .out(iq6_out));
88
decoder7 iq7(.num(iqentry_tgt[7]), .out(iq7_out));
89
 
90
integer n;
91
always @*
92
        for (n = 1; n < NREGS+1; n = n + 1)
93
                livetarget[n] <= iqentry_0_livetarget[n] | iqentry_1_livetarget[n] | iqentry_2_livetarget[n] | iqentry_3_livetarget[n] |
94
                        iqentry_4_livetarget[n] | iqentry_5_livetarget[n] | iqentry_6_livetarget[n] | iqentry_7_livetarget[n]
95
                        ;
96
assign
97
        iqentry_0_livetarget = {NREGS{iqentry_v[0]}} & {NREGS{~iqentry_stomp[0]}} & iq0_out,
98
        iqentry_1_livetarget = {NREGS{iqentry_v[1]}} & {NREGS{~iqentry_stomp[1]}} & iq1_out,
99
        iqentry_2_livetarget = {NREGS{iqentry_v[2]}} & {NREGS{~iqentry_stomp[2]}} & iq2_out,
100
        iqentry_3_livetarget = {NREGS{iqentry_v[3]}} & {NREGS{~iqentry_stomp[3]}} & iq3_out,
101
        iqentry_4_livetarget = {NREGS{iqentry_v[4]}} & {NREGS{~iqentry_stomp[4]}} & iq4_out,
102
        iqentry_5_livetarget = {NREGS{iqentry_v[5]}} & {NREGS{~iqentry_stomp[5]}} & iq5_out,
103
        iqentry_6_livetarget = {NREGS{iqentry_v[6]}} & {NREGS{~iqentry_stomp[6]}} & iq6_out,
104
        iqentry_7_livetarget = {NREGS{iqentry_v[7]}} & {NREGS{~iqentry_stomp[7]}} & iq7_out;
105
 
106
endmodule
107
 
108
module decoder7 (num, out);
109
input [6:0] num;
110
output [127:1] out;
111
 
112
wire [127:0] out1;
113
 
114
assign out1 = 127'd1 << num;
115
assign out = out1[127:1];
116
 
117
endmodule

powered by: WebSVN 2.1.0

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