In reply to haykp:
It’s most likely due to a race condition between spi_sck and spi_cs. You are essentially evaluating spi_cs after the @(posedge spi_sck). If it is 1, then it waits for the next @(posedge spi_sck). If spi_sck doesn’t have a posedge after spi_cs is 0, then you will be stuck waiting for the nest @(posedge spi_sck), which when that occurs, spi_cs is back to the value of 1.