feat: implement SRAM support for ICS55 in tc_usb2_packet_ram and add corresponding test

This commit is contained in:
maksyuki committed 2026-08-23 12:04:13 +08:00
1 parent 83161a11d2
commit 692b924c23
3 files changed
+99 -1

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
// Copyright (c) 2026 Yuchi Miao <miaoyuchi@ict.ac.cn>
// retroSoC is licensed under Mulan PSL v2.
module SRAM_4096X32_M8_BW (
input logic [11:0] A,
input logic [31:0] D,
input logic CEB,
input logic CLK,
input logic GWEB,
input logic [31:0] WEB,
input logic MARE,
input logic [ 3:0] MAR,
output logic [31:0] Q
);
logic [31:0] s_memory[0:4095];
always_ff @(posedge CLK) begin
if (!CEB) begin
if (!GWEB) begin
for (int bit_index = 0; bit_index < 32; bit_index++) begin
if (!WEB[bit_index]) begin
s_memory[A][bit_index] <= D[bit_index];
end
end
end else begin
Q <= s_memory[A];
end
end
end
endmodule