TeamVoss / VossII

The source code to the Voss II Hardware Verification Suite
Apache License 2.0
53 stars 13 forks source link

Symbolic simulation results are not as expected #19

Open cccccc96 opened 1 year ago

cccccc96 commented 1 year ago

I am learning the use of VOSS2, and I tried to write a very simple STE code for Memory testing. For this Memory, write at time 1 and read at time 2. But the result of symbolic simulation of output singal "io_dataOut" at moment 2 is X, I don't know where is my problem?

module mem(
  input         clock,
  input  [31:0] io_dataIn,
  output [31:0] io_dataOut,
  input  [4:0]  io_addr,
  input         csen_n,
  input         wren_n
);
 reg [31:0] mem [4:0];
 always @(posedge clock) begin
     if(wren_n && !csen_n)
         mem[io_addr] <= io_dataIn;
 end
 always @(posedge clock) begin
     if(!wren_n && !csen_n)
         io_dataOut <= mem[io_addr];
 end
endmodule