R
Rick C
Guest
Gowin Synthesis User Guide SUG550
semi-dual-port B-SRAM
module read_first_wp_pre_1(data_out, data_in, waddr, raddr,clk,
rst,ce, wre);
output [10:0]data_out;
input [10:0]data_in;
input [6:0]raddr,waddr;
input clk, rst,ce, wre;
reg [10:0] mem [127:0];
reg [10:0] data_out;
always@(posedge clk)
if(ce |wre)
data_out <= mem[raddr];
always @(posedge clk)
if (rst)
mem[waddr] <= data_in;
else if (ce | !wre) mem[waddr] <= data_in;
endmodule
Correct me if I\'m wrong, but isn\'t if(ce |wre) going to OR the clock enable and the write enable? Anyone seen a BRAM work that way?
Also, anyone think anything is odd about an async reset signal on a sync BRAM? It\'s not even a reset of the whole memory, just the addressed location.. Even odder is the circuit diagram they show runs the rst signal to the output register only. Heck, the output register is optional.
https://www.gowinsemi.com/upload/database_doc/1232/document/5f7befe0a7c86.pdf
B-SRAM & S-SRAM User Guide
You will need to create an account and log in first.
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
semi-dual-port B-SRAM
module read_first_wp_pre_1(data_out, data_in, waddr, raddr,clk,
rst,ce, wre);
output [10:0]data_out;
input [10:0]data_in;
input [6:0]raddr,waddr;
input clk, rst,ce, wre;
reg [10:0] mem [127:0];
reg [10:0] data_out;
always@(posedge clk)
if(ce |wre)
data_out <= mem[raddr];
always @(posedge clk)
if (rst)
mem[waddr] <= data_in;
else if (ce | !wre) mem[waddr] <= data_in;
endmodule
Correct me if I\'m wrong, but isn\'t if(ce |wre) going to OR the clock enable and the write enable? Anyone seen a BRAM work that way?
Also, anyone think anything is odd about an async reset signal on a sync BRAM? It\'s not even a reset of the whole memory, just the addressed location.. Even odder is the circuit diagram they show runs the rst signal to the output register only. Heck, the output register is optional.
https://www.gowinsemi.com/upload/database_doc/1232/document/5f7befe0a7c86.pdf
B-SRAM & S-SRAM User Guide
You will need to create an account and log in first.
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209