Comments (3)
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.
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.
df9ecc0 seems to fix the problem.
from hrm-cpu.
Related Issues (20)
- Not marking ControlUnit.state as FSM state register: Register has an initialization value. HOT 1
- tester.v should start with reset=1 HOT 1
- Support compact instructions
- Add prog mode, to input new prog via serial
- Assembler: Wrong macro decoding for /A1
- ../../mem_wrapper.v:45: warning: Port 4 (rst) of XALU expects 1 bits, got 32. HOT 2
- Build latest iverilog in toolchain
- Carve Memory out of HRM-CPU
- Typo in the wiki HOT 1
- Add documentation web site HOT 2
- Have Makefile support toolchain versions HOT 10
- Look at doing some GUI testing
- MMIO, Add Buttons
- Integrate hrmasm in GUI
- Generate MODULE_tb.v template from MODULE.v file HOT 1
- Add BTNs & LEDs to GUI
- Formal verification (Help wanted)
- Tests in Python?
- GUI will loop if INSTR=INBOX, & Inbox is empty & user press F4 (next INSTR) HOT 1
- CPU / IR : Missing else clause and initial value for reg?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hrm-cpu.