2008-11-22 22:40:25 +01:00
|
|
|
// File: rom.v
|
2012-12-21 14:36:07 +01:00
|
|
|
// Generated by MyHDL 0.8dev
|
|
|
|
// Date: Fri Dec 21 14:32:36 2012
|
2010-07-02 13:24:04 +02:00
|
|
|
|
2008-11-22 22:40:25 +01:00
|
|
|
|
|
|
|
`timescale 1ns/10ps
|
|
|
|
|
|
|
|
module rom (
|
|
|
|
dout,
|
|
|
|
addr
|
|
|
|
);
|
2010-07-02 13:24:04 +02:00
|
|
|
// ROM model
|
2008-11-22 22:40:25 +01:00
|
|
|
|
|
|
|
output [7:0] dout;
|
|
|
|
reg [7:0] dout;
|
|
|
|
input [3:0] addr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-02 13:24:04 +02:00
|
|
|
|
|
|
|
|
2008-11-22 22:40:25 +01:00
|
|
|
always @(addr) begin: ROM_READ
|
|
|
|
case (addr)
|
2010-10-10 21:43:16 +02:00
|
|
|
0: dout = 17;
|
|
|
|
1: dout = 134;
|
|
|
|
2: dout = 52;
|
|
|
|
default: dout = 9;
|
2008-11-22 22:40:25 +01:00
|
|
|
endcase
|
|
|
|
end
|
|
|
|
|
|
|
|
endmodule
|