data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v
 line:57: before: "@"
1: b'%Warning-STMTDLY: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:43: Unsupported: Ignoring delay on this delayed statement.\n     forever #5 pro_clk = !pro_clk;\n             ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:57: syntax error, unexpected \'@\'\n     @ (negedge pro_clk)\n     ^\n%Warning-STMTDLY: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:55: Unsupported: Ignoring delay on this delayed statement.\n     #20\n     ^\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:63: syntax error, unexpected \'@\'\n     @ (negedge pro_clk)\n     ^\n%Warning-STMTDLY: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:68: Unsupported: Ignoring delay on this delayed statement.\n     #1 transmit_store = data_send;\n     ^\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:69: syntax error, unexpected \'@\'\n     @ (negedge pro_clk)\n     ^\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:77: syntax error, unexpected \'@\'\n     @ (posedge ss[0])\n     ^\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:85: syntax error, unexpected \'@\'\n     @ (negedge pro_clk)\n     ^\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:91: syntax error, unexpected else\n     end else begin\n         ^~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:97: syntax error, unexpected $display\n         $display("Data received from spi slave verified", $time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:99: syntax error, unexpected $display\n         $display("Data receive failed",$time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:143: syntax error, unexpected $display\n         $display("Data received from spi slave verified", $time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:145: syntax error, unexpected $display\n         $display("Data receive failed",$time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:189: syntax error, unexpected $display\n         $display("Data received from spi slave verified", $time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:191: syntax error, unexpected $display\n         $display("Data receive failed",$time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:235: syntax error, unexpected $display\n         $display("Data received from spi slave verified", $time);\n         ^~~~~~~~\n%Error: data/full_repos/permissive/117851934/ddr_layout_V5/ip/old/SPI_master_test.v:237: syntax error, unexpected $display\n         $display("Data receive failed",$time);\n         ^~~~~~~~\n%Error: Cannot continue\n        ... See the manual and https://verilator.org for more assistance.\n'
module SPI_master_test;
     
 wire [7:0] data_bus;
 wire mosi;
 wire sclk;
 wire [7:0] ss;



 reg miso;               
 reg CS;
 reg [1:0] addr;
 reg pro_clk;
 reg WR,RD;


 SPI_Master tb ( miso, mosi, sclk, ss, data_bus, CS, addr, pro_clk, WR, RD);



 reg [7:0] data_send;
 reg [7:0] transmit_store;
 reg [7:0] data_receive;
 reg [7:0] miso_data;
 reg [7:0] mosi_data;


 assign data_bus = data_send;


 initial
   begin
     pro_clk = 0;
     forever #5 pro_clk = !pro_clk;
   end
   
 initial 
   begin
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 0;
     addr = 0;
     miso = 0;
     
     #20

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = 0;            
     addr = 0;

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("Transmit Buffer loaded");
     $display ("SS[0] = 0, CPHA = 0, CPOL = 0 at time:",$time);
     $display ("Observe Waveform for spi clock frequency, spi data changing at falling egde, valid at rising edge");
     CS = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[0])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b10001001;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at rising edge and valid at falling edge");
     $display ("SS[4] = 0, CPHA = 0, CPOL = 1 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[4])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b11110010;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at rising edge and valid at falling edge");
     $display ("SS[7] = 0, CPHA = 1, CPOL = 0 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[7])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b01111100;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at falling edge and valid at rising edge");
     $display ("SS[3] = 0, CPHA = 1, CPOL = 1 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[3])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end
     @ (negedge pro_clk)
     $display ("\n PASS: hit break to stop simulation");
       
 end


 initial 
 begin

     #20
     miso_data = $random;
     @ (negedge ss[0])
     miso = miso_data[7];
     @ (posedge sclk)
     mosi_data[7] = mosi; 
     @ (negedge sclk)
     miso = miso_data[6];
     @ (posedge sclk)
     mosi_data[6] = mosi;
     @ (negedge sclk)
     miso = miso_data[5];
     @ (posedge sclk)
     mosi_data[5] = mosi;
     @ (negedge sclk)
     miso = miso_data[4];
     @ (posedge sclk)
     mosi_data[4] = mosi;
     @ (negedge sclk)
     miso = miso_data[3];
     @ (posedge sclk)
     mosi_data[3] = mosi;
     @ (negedge sclk)
     miso = miso_data[2];
     @ (posedge sclk)
     mosi_data[2] = mosi;
     @ (negedge sclk)
     miso = miso_data[1];
     @ (posedge sclk)
     mosi_data[1] = mosi;
     @ (negedge sclk)
     miso = miso_data[0];
     @ (posedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[4])
     miso_data = $random;
     miso = miso_data[7];
     @ (negedge sclk)
     mosi_data[7] = mosi; 
     @ (posedge sclk)
     miso = miso_data[6];
     @ (negedge sclk)
     mosi_data[6] = mosi;
     @ (posedge sclk)
     miso = miso_data[5];
     @ (negedge sclk)
     mosi_data[5] = mosi;
     @ (posedge sclk)
     miso = miso_data[4];
     @ (negedge sclk)
     mosi_data[4] = mosi;
     @ (posedge sclk)
     miso = miso_data[3];
     @ (negedge sclk)
     mosi_data[3] = mosi;
     @ (posedge sclk)
     miso = miso_data[2];
     @ (negedge sclk)
     mosi_data[2] = mosi;
     @ (posedge sclk)
     miso = miso_data[1];
     @ (negedge sclk)
     mosi_data[1] = mosi;
     @ (posedge sclk)
     miso = miso_data[0];
     @ (negedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[7])
     miso_data = $random;
     @ (posedge sclk)
     miso = miso_data[7];
     @ (negedge sclk)
     mosi_data[7] = mosi; 
     @ (posedge sclk)
     miso = miso_data[6];
     @ (negedge sclk)
     mosi_data[6] = mosi;
     @ (posedge sclk)
     miso = miso_data[5];
     @ (negedge sclk)
     mosi_data[5] = mosi;
     @ (posedge sclk)
     miso = miso_data[4];
     @ (negedge sclk)
     mosi_data[4] = mosi;
     @ (posedge sclk)
     miso = miso_data[3];
     @ (negedge sclk)
     mosi_data[3] = mosi;
     @ (posedge sclk)
     miso = miso_data[2];
     @ (negedge sclk)
     mosi_data[2] = mosi;
     @ (posedge sclk)
     miso = miso_data[1];
     @ (negedge sclk)
     mosi_data[1] = mosi;
     @ (posedge sclk)
     miso = miso_data[0];
     @ (negedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[3])
     miso_data = $random;
     @ (negedge sclk)
     miso = miso_data[7];
     @ (posedge sclk)
     mosi_data[7] = mosi; 
     @ (negedge sclk)
     miso = miso_data[6];
     @ (posedge sclk)
     mosi_data[6] = mosi;
     @ (negedge sclk)
     miso = miso_data[5];
     @ (posedge sclk)
     mosi_data[5] = mosi;
     @ (negedge sclk)
     miso = miso_data[4];
     @ (posedge sclk)
     mosi_data[4] = mosi;
     @ (negedge sclk)
     miso = miso_data[3];
     @ (posedge sclk)
     mosi_data[3] = mosi;
     @ (negedge sclk)
     miso = miso_data[2];
     @ (posedge sclk)
     mosi_data[2] = mosi;
     @ (negedge sclk)
     miso = miso_data[1];
     @ (posedge sclk)
     mosi_data[1] = mosi;
     @ (negedge sclk)
     miso = miso_data[0];
     @ (posedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     
 end


 endmodule
module SPI_master_test;

     
 wire [7:0] data_bus;
 wire mosi;
 wire sclk;
 wire [7:0] ss;



 reg miso;               
 reg CS;
 reg [1:0] addr;
 reg pro_clk;
 reg WR,RD;


 SPI_Master tb ( miso, mosi, sclk, ss, data_bus, CS, addr, pro_clk, WR, RD);



 reg [7:0] data_send;
 reg [7:0] transmit_store;
 reg [7:0] data_receive;
 reg [7:0] miso_data;
 reg [7:0] mosi_data;


 assign data_bus = data_send;


 initial
   begin
     pro_clk = 0;
     forever #5 pro_clk = !pro_clk;
   end
   
 initial 
   begin
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 0;
     addr = 0;
     miso = 0;
     
     #20

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = 0;            
     addr = 0;

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("Transmit Buffer loaded");
     $display ("SS[0] = 0, CPHA = 0, CPOL = 0 at time:",$time);
     $display ("Observe Waveform for spi clock frequency, spi data changing at falling egde, valid at rising edge");
     CS = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[0])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b10001001;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at rising edge and valid at falling edge");
     $display ("SS[4] = 0, CPHA = 0, CPOL = 1 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[4])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b11110010;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at rising edge and valid at falling edge");
     $display ("SS[7] = 0, CPHA = 1, CPOL = 0 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[7])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end

     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     RD = 0;
     data_send = 8'b01111100;            
     addr = 0;
     @ (negedge pro_clk)
     CS = 1;
     WR = 1;
     data_send = $random; 
     addr = 2'b10;
     #1 transmit_store = data_send;
     @ (negedge pro_clk)
     $display ("\n Transmit Buffer reloaded");
     $display ("Observe Waveform for spi clock frequency, spi data changing at falling edge and valid at rising edge");
     $display ("SS[3] = 0, CPHA = 1, CPOL = 1 at time:",$time);
     CS = 0;
     RD = 0;
     WR = 0;
     data_send = 8'bz;
     
     @ (posedge ss[3])
     #20
     

     @ (negedge pro_clk)
     CS = 1;
     RD = 1;
     addr = 2'b01;
     @ (negedge pro_clk)
     data_receive = data_bus;
     @ (negedge pro_clk)
     if (data_receive[0]) begin
         $display("Interrupt detected at time:", $time);
         addr = 2'b11;
     end else begin
         $display("Interrupt detect failed at time:", $time);
     end
     @ (negedge pro_clk)
     data_receive = data_bus;
     if (data_bus == miso_data) begin
         $display("Data received from spi slave verified", $time);
     end else begin
         $display("Data receive failed",$time);
     end
     @ (negedge pro_clk)
     $display ("\n PASS: hit break to stop simulation");
       
 end


 initial 
 begin

     #20
     miso_data = $random;
     @ (negedge ss[0])
     miso = miso_data[7];
     @ (posedge sclk)
     mosi_data[7] = mosi; 
     @ (negedge sclk)
     miso = miso_data[6];
     @ (posedge sclk)
     mosi_data[6] = mosi;
     @ (negedge sclk)
     miso = miso_data[5];
     @ (posedge sclk)
     mosi_data[5] = mosi;
     @ (negedge sclk)
     miso = miso_data[4];
     @ (posedge sclk)
     mosi_data[4] = mosi;
     @ (negedge sclk)
     miso = miso_data[3];
     @ (posedge sclk)
     mosi_data[3] = mosi;
     @ (negedge sclk)
     miso = miso_data[2];
     @ (posedge sclk)
     mosi_data[2] = mosi;
     @ (negedge sclk)
     miso = miso_data[1];
     @ (posedge sclk)
     mosi_data[1] = mosi;
     @ (negedge sclk)
     miso = miso_data[0];
     @ (posedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[4])
     miso_data = $random;
     miso = miso_data[7];
     @ (negedge sclk)
     mosi_data[7] = mosi; 
     @ (posedge sclk)
     miso = miso_data[6];
     @ (negedge sclk)
     mosi_data[6] = mosi;
     @ (posedge sclk)
     miso = miso_data[5];
     @ (negedge sclk)
     mosi_data[5] = mosi;
     @ (posedge sclk)
     miso = miso_data[4];
     @ (negedge sclk)
     mosi_data[4] = mosi;
     @ (posedge sclk)
     miso = miso_data[3];
     @ (negedge sclk)
     mosi_data[3] = mosi;
     @ (posedge sclk)
     miso = miso_data[2];
     @ (negedge sclk)
     mosi_data[2] = mosi;
     @ (posedge sclk)
     miso = miso_data[1];
     @ (negedge sclk)
     mosi_data[1] = mosi;
     @ (posedge sclk)
     miso = miso_data[0];
     @ (negedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[7])
     miso_data = $random;
     @ (posedge sclk)
     miso = miso_data[7];
     @ (negedge sclk)
     mosi_data[7] = mosi; 
     @ (posedge sclk)
     miso = miso_data[6];
     @ (negedge sclk)
     mosi_data[6] = mosi;
     @ (posedge sclk)
     miso = miso_data[5];
     @ (negedge sclk)
     mosi_data[5] = mosi;
     @ (posedge sclk)
     miso = miso_data[4];
     @ (negedge sclk)
     mosi_data[4] = mosi;
     @ (posedge sclk)
     miso = miso_data[3];
     @ (negedge sclk)
     mosi_data[3] = mosi;
     @ (posedge sclk)
     miso = miso_data[2];
     @ (negedge sclk)
     mosi_data[2] = mosi;
     @ (posedge sclk)
     miso = miso_data[1];
     @ (negedge sclk)
     mosi_data[1] = mosi;
     @ (posedge sclk)
     miso = miso_data[0];
     @ (negedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     

     @ (negedge ss[3])
     miso_data = $random;
     @ (negedge sclk)
     miso = miso_data[7];
     @ (posedge sclk)
     mosi_data[7] = mosi; 
     @ (negedge sclk)
     miso = miso_data[6];
     @ (posedge sclk)
     mosi_data[6] = mosi;
     @ (negedge sclk)
     miso = miso_data[5];
     @ (posedge sclk)
     mosi_data[5] = mosi;
     @ (negedge sclk)
     miso = miso_data[4];
     @ (posedge sclk)
     mosi_data[4] = mosi;
     @ (negedge sclk)
     miso = miso_data[3];
     @ (posedge sclk)
     mosi_data[3] = mosi;
     @ (negedge sclk)
     miso = miso_data[2];
     @ (posedge sclk)
     mosi_data[2] = mosi;
     @ (negedge sclk)
     miso = miso_data[1];
     @ (posedge sclk)
     mosi_data[1] = mosi;
     @ (negedge sclk)
     miso = miso_data[0];
     @ (posedge sclk)
     mosi_data[0] = mosi;
     #5 
     if(mosi_data == transmit_store) begin
         $display("Data transmitted to spi slave verified", $time );
     end else begin
         $display("Data Transmit to spi slave failed !", $time );
     end
     
 end


 endmodule