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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [bench/] [verilog/] [registers.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 olivier.gi
//----------------------------------------------------------------------------
2
// Copyright (C) 2001 Authors
3
//
4
// This source file may be used and distributed without restriction provided
5
// that this copyright statement is not removed from the file and that any
6
// derivative work contains the original copyright notice and the associated
7
// disclaimer.
8
//
9
// This source file is free software; you can redistribute it and/or modify
10
// it under the terms of the GNU Lesser General Public License as published
11
// by the Free Software Foundation; either version 2.1 of the License, or
12
// (at your option) any later version.
13
//
14
// This source is distributed in the hope that it will be useful, but WITHOUT
15
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17
// License for more details.
18
//
19
// You should have received a copy of the GNU Lesser General Public License
20
// along with this source; if not, write to the Free Software Foundation,
21
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22
//
23
//----------------------------------------------------------------------------
24
// 
25
// *File Name: registers.v
26
// 
27
// *Module Description:
28
//                      openMSP430 testbench
29
//
30
// *Author(s):
31
//              - Olivier Girard,    olgirard@gmail.com
32
//
33
//----------------------------------------------------------------------------
34
 
35
// CPU registers
36
//======================
37
 
38
wire       [15:0] r0    = dut.openMSP430_0.execution_unit_0.register_file_0.r0;
39
wire       [15:0] r1    = dut.openMSP430_0.execution_unit_0.register_file_0.r1;
40
wire       [15:0] r2    = dut.openMSP430_0.execution_unit_0.register_file_0.r2;
41
wire       [15:0] r3    = dut.openMSP430_0.execution_unit_0.register_file_0.r3;
42
wire       [15:0] r4    = dut.openMSP430_0.execution_unit_0.register_file_0.r4;
43
wire       [15:0] r5    = dut.openMSP430_0.execution_unit_0.register_file_0.r5;
44
wire       [15:0] r6    = dut.openMSP430_0.execution_unit_0.register_file_0.r6;
45
wire       [15:0] r7    = dut.openMSP430_0.execution_unit_0.register_file_0.r7;
46
wire       [15:0] r8    = dut.openMSP430_0.execution_unit_0.register_file_0.r8;
47
wire       [15:0] r9    = dut.openMSP430_0.execution_unit_0.register_file_0.r9;
48
wire       [15:0] r10   = dut.openMSP430_0.execution_unit_0.register_file_0.r10;
49
wire       [15:0] r11   = dut.openMSP430_0.execution_unit_0.register_file_0.r11;
50
wire       [15:0] r12   = dut.openMSP430_0.execution_unit_0.register_file_0.r12;
51
wire       [15:0] r13   = dut.openMSP430_0.execution_unit_0.register_file_0.r13;
52
wire       [15:0] r14   = dut.openMSP430_0.execution_unit_0.register_file_0.r14;
53
wire       [15:0] r15   = dut.openMSP430_0.execution_unit_0.register_file_0.r15;
54
 
55
 
56
// RAM cells
57
//======================
58
 
59
wire       [15:0] mem200 = {dut.ram_8x512_hi_0.inst.mem[0],  dut.ram_8x512_lo_0.inst.mem[0]};
60
wire       [15:0] mem202 = {dut.ram_8x512_hi_0.inst.mem[1],  dut.ram_8x512_lo_0.inst.mem[1]};
61
wire       [15:0] mem204 = {dut.ram_8x512_hi_0.inst.mem[2],  dut.ram_8x512_lo_0.inst.mem[2]};
62
wire       [15:0] mem206 = {dut.ram_8x512_hi_0.inst.mem[3],  dut.ram_8x512_lo_0.inst.mem[3]};
63
wire       [15:0] mem208 = {dut.ram_8x512_hi_0.inst.mem[4],  dut.ram_8x512_lo_0.inst.mem[4]};
64
wire       [15:0] mem20A = {dut.ram_8x512_hi_0.inst.mem[5],  dut.ram_8x512_lo_0.inst.mem[5]};
65
wire       [15:0] mem20C = {dut.ram_8x512_hi_0.inst.mem[6],  dut.ram_8x512_lo_0.inst.mem[6]};
66
wire       [15:0] mem20E = {dut.ram_8x512_hi_0.inst.mem[7],  dut.ram_8x512_lo_0.inst.mem[7]};
67
wire       [15:0] mem210 = {dut.ram_8x512_hi_0.inst.mem[8],  dut.ram_8x512_lo_0.inst.mem[8]};
68
wire       [15:0] mem212 = {dut.ram_8x512_hi_0.inst.mem[9],  dut.ram_8x512_lo_0.inst.mem[9]};
69
wire       [15:0] mem214 = {dut.ram_8x512_hi_0.inst.mem[10], dut.ram_8x512_lo_0.inst.mem[10]};
70
wire       [15:0] mem216 = {dut.ram_8x512_hi_0.inst.mem[11], dut.ram_8x512_lo_0.inst.mem[11]};
71
wire       [15:0] mem218 = {dut.ram_8x512_hi_0.inst.mem[12], dut.ram_8x512_lo_0.inst.mem[12]};
72
wire       [15:0] mem21A = {dut.ram_8x512_hi_0.inst.mem[13], dut.ram_8x512_lo_0.inst.mem[13]};
73
wire       [15:0] mem21C = {dut.ram_8x512_hi_0.inst.mem[14], dut.ram_8x512_lo_0.inst.mem[14]};
74
wire       [15:0] mem21E = {dut.ram_8x512_hi_0.inst.mem[15], dut.ram_8x512_lo_0.inst.mem[15]};
75
wire       [15:0] mem220 = {dut.ram_8x512_hi_0.inst.mem[16], dut.ram_8x512_lo_0.inst.mem[16]};
76
wire       [15:0] mem222 = {dut.ram_8x512_hi_0.inst.mem[17], dut.ram_8x512_lo_0.inst.mem[17]};
77
wire       [15:0] mem224 = {dut.ram_8x512_hi_0.inst.mem[18], dut.ram_8x512_lo_0.inst.mem[18]};
78
wire       [15:0] mem226 = {dut.ram_8x512_hi_0.inst.mem[19], dut.ram_8x512_lo_0.inst.mem[19]};
79
wire       [15:0] mem228 = {dut.ram_8x512_hi_0.inst.mem[20], dut.ram_8x512_lo_0.inst.mem[20]};
80
wire       [15:0] mem22A = {dut.ram_8x512_hi_0.inst.mem[21], dut.ram_8x512_lo_0.inst.mem[21]};
81
wire       [15:0] mem22C = {dut.ram_8x512_hi_0.inst.mem[22], dut.ram_8x512_lo_0.inst.mem[22]};
82
wire       [15:0] mem22E = {dut.ram_8x512_hi_0.inst.mem[23], dut.ram_8x512_lo_0.inst.mem[23]};
83
wire       [15:0] mem230 = {dut.ram_8x512_hi_0.inst.mem[24], dut.ram_8x512_lo_0.inst.mem[24]};
84
wire       [15:0] mem232 = {dut.ram_8x512_hi_0.inst.mem[25], dut.ram_8x512_lo_0.inst.mem[25]};
85
wire       [15:0] mem234 = {dut.ram_8x512_hi_0.inst.mem[26], dut.ram_8x512_lo_0.inst.mem[26]};
86
wire       [15:0] mem236 = {dut.ram_8x512_hi_0.inst.mem[27], dut.ram_8x512_lo_0.inst.mem[27]};
87
wire       [15:0] mem238 = {dut.ram_8x512_hi_0.inst.mem[28], dut.ram_8x512_lo_0.inst.mem[28]};
88
wire       [15:0] mem23A = {dut.ram_8x512_hi_0.inst.mem[29], dut.ram_8x512_lo_0.inst.mem[29]};
89
wire       [15:0] mem23C = {dut.ram_8x512_hi_0.inst.mem[30], dut.ram_8x512_lo_0.inst.mem[30]};
90
wire       [15:0] mem23E = {dut.ram_8x512_hi_0.inst.mem[31], dut.ram_8x512_lo_0.inst.mem[31]};
91
wire       [15:0] mem240 = {dut.ram_8x512_hi_0.inst.mem[32], dut.ram_8x512_lo_0.inst.mem[32]};
92
wire       [15:0] mem242 = {dut.ram_8x512_hi_0.inst.mem[33], dut.ram_8x512_lo_0.inst.mem[33]};
93
wire       [15:0] mem244 = {dut.ram_8x512_hi_0.inst.mem[34], dut.ram_8x512_lo_0.inst.mem[34]};
94
wire       [15:0] mem246 = {dut.ram_8x512_hi_0.inst.mem[35], dut.ram_8x512_lo_0.inst.mem[35]};
95
wire       [15:0] mem248 = {dut.ram_8x512_hi_0.inst.mem[36], dut.ram_8x512_lo_0.inst.mem[36]};
96
wire       [15:0] mem24A = {dut.ram_8x512_hi_0.inst.mem[37], dut.ram_8x512_lo_0.inst.mem[37]};
97
wire       [15:0] mem24C = {dut.ram_8x512_hi_0.inst.mem[38], dut.ram_8x512_lo_0.inst.mem[38]};
98
wire       [15:0] mem24E = {dut.ram_8x512_hi_0.inst.mem[39], dut.ram_8x512_lo_0.inst.mem[39]};
99
wire       [15:0] mem250 = {dut.ram_8x512_hi_0.inst.mem[40], dut.ram_8x512_lo_0.inst.mem[40]};
100
wire       [15:0] mem252 = {dut.ram_8x512_hi_0.inst.mem[41], dut.ram_8x512_lo_0.inst.mem[41]};
101
wire       [15:0] mem254 = {dut.ram_8x512_hi_0.inst.mem[42], dut.ram_8x512_lo_0.inst.mem[42]};
102
wire       [15:0] mem256 = {dut.ram_8x512_hi_0.inst.mem[43], dut.ram_8x512_lo_0.inst.mem[43]};
103
wire       [15:0] mem258 = {dut.ram_8x512_hi_0.inst.mem[44], dut.ram_8x512_lo_0.inst.mem[44]};
104
wire       [15:0] mem25A = {dut.ram_8x512_hi_0.inst.mem[45], dut.ram_8x512_lo_0.inst.mem[45]};
105
wire       [15:0] mem25C = {dut.ram_8x512_hi_0.inst.mem[46], dut.ram_8x512_lo_0.inst.mem[46]};
106
wire       [15:0] mem25E = {dut.ram_8x512_hi_0.inst.mem[47], dut.ram_8x512_lo_0.inst.mem[47]};
107
wire       [15:0] mem260 = {dut.ram_8x512_hi_0.inst.mem[48], dut.ram_8x512_lo_0.inst.mem[48]};
108
wire       [15:0] mem262 = {dut.ram_8x512_hi_0.inst.mem[49], dut.ram_8x512_lo_0.inst.mem[49]};
109
wire       [15:0] mem264 = {dut.ram_8x512_hi_0.inst.mem[50], dut.ram_8x512_lo_0.inst.mem[50]};
110
wire       [15:0] mem266 = {dut.ram_8x512_hi_0.inst.mem[51], dut.ram_8x512_lo_0.inst.mem[51]};
111
wire       [15:0] mem268 = {dut.ram_8x512_hi_0.inst.mem[52], dut.ram_8x512_lo_0.inst.mem[52]};
112
wire       [15:0] mem26A = {dut.ram_8x512_hi_0.inst.mem[53], dut.ram_8x512_lo_0.inst.mem[53]};
113
wire       [15:0] mem26C = {dut.ram_8x512_hi_0.inst.mem[54], dut.ram_8x512_lo_0.inst.mem[54]};
114
wire       [15:0] mem26E = {dut.ram_8x512_hi_0.inst.mem[55], dut.ram_8x512_lo_0.inst.mem[55]};
115
wire       [15:0] mem270 = {dut.ram_8x512_hi_0.inst.mem[56], dut.ram_8x512_lo_0.inst.mem[56]};
116
wire       [15:0] mem272 = {dut.ram_8x512_hi_0.inst.mem[57], dut.ram_8x512_lo_0.inst.mem[57]};
117
wire       [15:0] mem274 = {dut.ram_8x512_hi_0.inst.mem[58], dut.ram_8x512_lo_0.inst.mem[58]};
118
wire       [15:0] mem276 = {dut.ram_8x512_hi_0.inst.mem[59], dut.ram_8x512_lo_0.inst.mem[59]};
119
wire       [15:0] mem278 = {dut.ram_8x512_hi_0.inst.mem[60], dut.ram_8x512_lo_0.inst.mem[60]};
120
wire       [15:0] mem27A = {dut.ram_8x512_hi_0.inst.mem[61], dut.ram_8x512_lo_0.inst.mem[61]};
121
wire       [15:0] mem27C = {dut.ram_8x512_hi_0.inst.mem[62], dut.ram_8x512_lo_0.inst.mem[62]};
122
wire       [15:0] mem27E = {dut.ram_8x512_hi_0.inst.mem[63], dut.ram_8x512_lo_0.inst.mem[63]};
123
wire       [15:0] mem280 = {dut.ram_8x512_hi_0.inst.mem[64], dut.ram_8x512_lo_0.inst.mem[64]};
124
 
125
 
126
// ROM cells
127
//======================
128
reg   [15:0] rom_mem [2047:0];
129
 
130
// Interrupt vectors
131
wire  [15:0] irq_vect_15 = rom_mem[(1<<(`ROM_MSB+1))-1];  // RESET Vector
132
wire  [15:0] irq_vect_14 = rom_mem[(1<<(`ROM_MSB+1))-2];  // NMI
133
wire  [15:0] irq_vect_13 = rom_mem[(1<<(`ROM_MSB+1))-3];  // IRQ 13
134
wire  [15:0] irq_vect_12 = rom_mem[(1<<(`ROM_MSB+1))-4];  // IRQ 12
135
wire  [15:0] irq_vect_11 = rom_mem[(1<<(`ROM_MSB+1))-5];  // IRQ 11
136
wire  [15:0] irq_vect_10 = rom_mem[(1<<(`ROM_MSB+1))-6];  // IRQ 10
137
wire  [15:0] irq_vect_09 = rom_mem[(1<<(`ROM_MSB+1))-7];  // IRQ  9
138
wire  [15:0] irq_vect_08 = rom_mem[(1<<(`ROM_MSB+1))-8];  // IRQ  8
139
wire  [15:0] irq_vect_07 = rom_mem[(1<<(`ROM_MSB+1))-9];  // IRQ  7
140
wire  [15:0] irq_vect_06 = rom_mem[(1<<(`ROM_MSB+1))-10]; // IRQ  6
141
wire  [15:0] irq_vect_05 = rom_mem[(1<<(`ROM_MSB+1))-11]; // IRQ  5
142
wire  [15:0] irq_vect_04 = rom_mem[(1<<(`ROM_MSB+1))-12]; // IRQ  4
143
wire  [15:0] irq_vect_03 = rom_mem[(1<<(`ROM_MSB+1))-13]; // IRQ  3
144
wire  [15:0] irq_vect_02 = rom_mem[(1<<(`ROM_MSB+1))-14]; // IRQ  2
145
wire  [15:0] irq_vect_01 = rom_mem[(1<<(`ROM_MSB+1))-15]; // IRQ  1
146
wire  [15:0] irq_vect_00 = rom_mem[(1<<(`ROM_MSB+1))-16]; // IRQ  0
147
 
148
 
149
// CPU internals
150
//======================
151
 
152
wire mclk = dut.openMSP430_0.mclk;
153
wire puc  = dut.openMSP430_0.puc;

powered by: WebSVN 2.1.0

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