mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 12:57:23 -04:00
Fixed sublte bug in the spi_fifo which allows for spurious write to fifo. Fixed fpga zsbl so that is uses read fifo interrupt pending (IP) rather than transmit fifo IP. Resolves issue with stalled load reading the wrong fifo status.
This commit is contained in:
parent
d311ee238c
commit
7358c1fe67
3 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
uint8_t spi_txrx(uint8_t byte) {
|
||||
spi_sendbyte(byte);
|
||||
waittx();
|
||||
waitrx();
|
||||
return spi_readbyte();
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ static inline void waittx() {
|
|||
}
|
||||
|
||||
static inline void waitrx() {
|
||||
while(read_reg(SPI_IP) & 2) {}
|
||||
while(!(read_reg(SPI_IP) & 2)) {}
|
||||
}
|
||||
|
||||
static inline uint8_t spi_readbyte() {
|
||||
|
|
|
@ -26,7 +26,7 @@ module spi_fifo #(parameter M=3, N=8)( // 2^M entries of N bits
|
|||
|
||||
assign rdata = mem[raddr];
|
||||
always_ff @(posedge PCLK)
|
||||
if (winc & ~wfull) mem[waddr] <= wdata;
|
||||
if (winc & wen & ~wfull) mem[waddr] <= wdata;
|
||||
|
||||
// write and read are enabled
|
||||
always_ff @(posedge PCLK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue