ROM128X1.v
927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// $Header: /root/leakn64/depot/rf/hw/debug/xilinx/ROM128X1.v,v 1.1 2003/04/01 21:47:36 berndt Exp $
/*
FUNCTION : ROM 128x1
*/
`timescale 100 ps / 10 ps
module ROM128X1 (O, A0, A1, A2, A3, A4, A5, A6);
parameter INIT = 128'h00000000000000000000000000000000;
output O;
input A0, A1, A2, A3, A4, A5, A6;
wire dout;
wire [6:0] adr;
reg mem [0:127];
reg [15:0] count;
buf b0 (adr[6], A6);
buf b1 (adr[5], A5);
buf b2 (adr[4], A4);
buf b3 (adr[3], A3);
buf b4 (adr[2], A2);
buf b5 (adr[1], A1);
buf b6 (adr[0], A0);
buf b7 (O, dout);
initial begin
for(count = 0; count < 128; count = count + 1)
mem[count] = INIT[count];
end
assign dout = mem[adr];
specify
(A6 => O) = (1, 1);
(A5 => O) = (1, 1);
(A4 => O) = (1, 1);
(A3 => O) = (1, 1);
(A2 => O) = (1, 1);
(A1 => O) = (1, 1);
(A0 => O) = (1, 1);
endspecify
endmodule