You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Relbty_seq32.v 1.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. `timescale 1ns / 1ps
  2. //////////////////////////////////////////////////////////////////////////////////
  3. // Company:
  4. // Engineer:
  5. //
  6. // Create Date: 02.03.2021 12:56:39
  7. // Design Name:
  8. // Module Name: Relbty_seq32
  9. // Project Name:
  10. // Target Devices:
  11. // Tool Versions:
  12. // Description:
  13. //
  14. // Dependencies:
  15. //
  16. // Revision:
  17. // Revision 0.01 - File Created
  18. // Additional Comments:
  19. //
  20. //////////////////////////////////////////////////////////////////////////////////
  21. module relt_seq_32 (
  22. input wire en_32,
  23. output reg [9:0] out_32,
  24. input wire [9:0] adr_32); // address- 8 deep memory
  25. // Declare a memory rom of 8 4-bit registers. The indices are 0 to 7:
  26. (* synthesis, rom_block = "ROM_CELL XYZ01" *) reg [9:0] rom[0:31];
  27. // (* synthesis, logic_block *) reg [3:0] rom [0:7];
  28. initial begin
  29. rom[0] = 10'd0;
  30. rom[1] = 10'd1;
  31. rom[2] = 10'd2;
  32. rom[3] = 10'd4;
  33. rom[4] = 10'd8;
  34. rom[5] = 10'd16;
  35. rom[6] = 10'd3;
  36. rom[7] = 10'd5;
  37. rom[8] = 10'd9;
  38. rom[9] = 10'd6;
  39. rom[10] = 10'd17;
  40. rom[11] = 10'd10;
  41. rom[12] = 10'd18;
  42. rom[13] = 10'd12;
  43. rom[14] = 10'd20;
  44. rom[15] = 10'd24;
  45. rom[16] = 10'd7;
  46. rom[17] = 10'd11;
  47. rom[18] = 10'd19;
  48. rom[19] = 10'd13;
  49. rom[20] = 10'd14;
  50. rom[21] = 10'd21;
  51. rom[22] = 10'd26;
  52. rom[23] = 10'd25;
  53. rom[24] = 10'd22;
  54. rom[25] = 10'd28;
  55. rom[26] = 10'd15;
  56. rom[27] = 10'd23;
  57. rom[28] = 10'd27;
  58. rom[29] = 10'd29;
  59. rom[30] = 10'd30;
  60. rom[31] = 10'd31;
  61. end
  62. always @ (*)
  63. begin
  64. if (en_32)
  65. //assign out_32 = rom[adr_32];
  66. out_32 = rom[adr_32];
  67. else
  68. out_32 = 32'd0;
  69. end
  70. endmodule
  71. /*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,
  72. 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} */
  73. //endmodule