Skip to content

Commit

Permalink
spi-host: Fix outstanding issues (pulp-platform/snitch#394)
Browse files Browse the repository at this point in the history
* spi_host: More fixes (pulp-platform/snitch#390, pulp-platform/snitch#393)

* vendor: Add `spi_host` fix
  • Loading branch information
paulsc96 authored Apr 26, 2022
1 parent 8de1915 commit bf1dd1d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/vendor/lowrisc_opentitan/spi_host/rtl/spi_host_fsm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ module spi_host_fsm
if (idle_cntr_q == 4'h0) begin
prestall_st_d = WaitLead;
end else begin
prestall_st_d = WaitIdle;
prestall_st_d = CSBSwitch;
end
end
IdleCSBActive: begin
Expand Down Expand Up @@ -483,7 +483,7 @@ module spi_host_fsm

assign wr_en_internal = byte_starting & cmd_wr_en;
assign shift_en_internal = bit_shifting;
assign rd_en_internal = byte_ending & cmd_rd_en;
assign rd_en_internal = byte_ending & cmd_rd_en_q;
assign speed_o = cmd_speed;
assign sample_en_d = byte_starting | shift_en_o;
assign full_cyc_o = full_cyc;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 097522a7c17011156b55a3aab4139a82d2eb0760 Mon Sep 17 00:00:00 2001
From: Paul Scheffler <[email protected]>
Date: Mon, 25 Apr 2022 17:42:16 +0200
Subject: [PATCH] spi_host: More fixes (#390, #393)

---
rtl/spi_host_fsm.sv | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rtl/spi_host_fsm.sv b/rtl/spi_host_fsm.sv
index 9c28a41..3e01bff 100644
--- a/rtl/spi_host_fsm.sv
+++ b/rtl/spi_host_fsm.sv
@@ -291,7 +291,7 @@ module spi_host_fsm
if (idle_cntr_q == 4'h0) begin
prestall_st_d = WaitLead;
end else begin
- prestall_st_d = WaitIdle;
+ prestall_st_d = CSBSwitch;
end
end
IdleCSBActive: begin
@@ -483,7 +483,7 @@ module spi_host_fsm

assign wr_en_internal = byte_starting & cmd_wr_en;
assign shift_en_internal = bit_shifting;
- assign rd_en_internal = byte_ending & cmd_rd_en;
+ assign rd_en_internal = byte_ending & cmd_rd_en_q;
assign speed_o = cmd_speed;
assign sample_en_d = byte_starting | shift_en_o;
assign full_cyc_o = full_cyc;
--
2.16.5

0 comments on commit bf1dd1d

Please sign in to comment.