|
- `timescale 1ns / 1ps
- //////////////////////////////////////////////////////////////////////////////////
- // Company:
- // Engineer:
- //
- // Create Date: 02.03.2021 12:56:39
- // Design Name:
- // Module Name: Relbty_seq32
- // Project Name:
- // Target Devices:
- // Tool Versions:
- // Description:
- //
- // Dependencies:
- //
- // Revision:
- // Revision 0.01 - File Created
- // Additional Comments:
- //
- //////////////////////////////////////////////////////////////////////////////////
-
-
- module relt_seq_32 (
- input wire en_32,
- output reg [9:0] out_32,
- input wire [9:0] adr_32); // address- 8 deep memory
- // Declare a memory rom of 8 4-bit registers. The indices are 0 to 7:
- (* synthesis, rom_block = "ROM_CELL XYZ01" *) reg [9:0] rom[0:31];
- // (* synthesis, logic_block *) reg [3:0] rom [0:7];
- initial begin
- rom[0] = 10'd0;
- rom[1] = 10'd1;
- rom[2] = 10'd2;
- rom[3] = 10'd4;
- rom[4] = 10'd8;
- rom[5] = 10'd16;
- rom[6] = 10'd3;
- rom[7] = 10'd5;
- rom[8] = 10'd9;
- rom[9] = 10'd6;
- rom[10] = 10'd17;
- rom[11] = 10'd10;
- rom[12] = 10'd18;
- rom[13] = 10'd12;
- rom[14] = 10'd20;
- rom[15] = 10'd24;
- rom[16] = 10'd7;
- rom[17] = 10'd11;
- rom[18] = 10'd19;
- rom[19] = 10'd13;
- rom[20] = 10'd14;
- rom[21] = 10'd21;
- rom[22] = 10'd26;
- rom[23] = 10'd25;
- rom[24] = 10'd22;
- rom[25] = 10'd28;
- rom[26] = 10'd15;
- rom[27] = 10'd23;
- rom[28] = 10'd27;
- rom[29] = 10'd29;
- rom[30] = 10'd30;
- rom[31] = 10'd31;
- end
- always @ (*)
- begin
- if (en_32)
- //assign out_32 = rom[adr_32];
- out_32 = rom[adr_32];
- else
- out_32 = 32'd0;
- end
- endmodule
- /*10'd31, 10'd30, 10'd29, 10'd27, 10'd23, 10'd15, 10'd28, 10'd22, 10'd25, 10'd26, 10'd21, 10'd14, 10'd13,
- 10'd19, 10'd11, 10'd7, 10'd24, 10'd20, 10'd12, 10'd18, 10'd10, 10'd17, 10'd6, 10'd9, 10'd5, 10'd3, 10'd16, 10'd8, 10'd4, 10'd2, 10'd1, 10'd0} */
- //endmodule
|