Giter VIP home page Giter VIP logo

Comments (3)

adumont avatar adumont commented on August 24, 2024

try using w_full_n instead of o_err as FIFO full flag.
(note: w_full_n doesn't seem to be negative logic deespite the _n... It becomes 1 when the FIFO gets full, and 0 again when it gets freed).

from hrm-cpu.

adumont avatar adumont commented on August 24, 2024

Also review ZipCPU/wbuart32#3 (comment) :

you are using the wrong signal to know if the FIFO is full or now. The err signal is set if you actually overflow the FIFO, and then cleared when you reset the FIFO to acknowledge the error--just as you noticed.

To know if the FIFO is actually full, you need to check the bottom bit of the status register, o_status. On a receive FIFO, where RXFIFO == 1'b1, this will be true if anything is within the FIFO that may then be read. For a transmit FIFO, where RXFIFO == 1'b0, this will be true if the FIFO is not full and so something may be written to the FIFO.

Alternatively, bits [11:2] contain the number of items in the FIFO. You can use those as well to check if the FIFO is full. In other words, when ((status & 0xffc) == 0xffc) you also know that the FIFO is full.

from hrm-cpu.

adumont avatar adumont commented on August 24, 2024

df9ecc0 seems to fix the problem.

from hrm-cpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.