P
ptrnxt
Guest
Here's the code. read_data is all X's which X pessimism is turned on in the simulator. Any ideas how to fix it? Thanks!
wire [15:0] dout = read_data;
always @*
if (~(&dout)) // keep incrementing till saturation
data = (dout + 16'd1);
else
data = 16'hFFFF;
always @(posedge clk)
if (rst) begin
en <= 1'b0;
adr <= 8'd0;
end else if (busy) begin
en <= cnt[4];
adr <= ram_adr;
always @(posedge clk)
we <= update;
REGF_SP_HD_256x16_m2b1w0c1p1d0t1_wrapper mem(
.CLK (clk),
.WE (we),
.ME (en),
.ADR (adr[7:0]),
.D (data[15:0]),
.PIPEME (1'b1),
.LS (1'b0),
.DS (1'b0),
.SD (1'b0),
.Q (),
.QP (read_data[15:0])
);
wire [15:0] dout = read_data;
always @*
if (~(&dout)) // keep incrementing till saturation
data = (dout + 16'd1);
else
data = 16'hFFFF;
always @(posedge clk)
if (rst) begin
en <= 1'b0;
adr <= 8'd0;
end else if (busy) begin
en <= cnt[4];
adr <= ram_adr;
always @(posedge clk)
we <= update;
REGF_SP_HD_256x16_m2b1w0c1p1d0t1_wrapper mem(
.CLK (clk),
.WE (we),
.ME (en),
.ADR (adr[7:0]),
.D (data[15:0]),
.PIPEME (1'b1),
.LS (1'b0),
.DS (1'b0),
.SD (1'b0),
.Q (),
.QP (read_data[15:0])
);