Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch Instructions and their next ones #1

Open
aklsh opened this issue Apr 3, 2020 · 0 comments
Open

Branch Instructions and their next ones #1

aklsh opened this issue Apr 3, 2020 · 0 comments

Comments

@aklsh
Copy link
Owner

aklsh commented Apr 3, 2020

I have this issue that if a conditional branch instruction (A) has an instruction following it (B), then B will not be executed properly. It will stay in the instruction for only one cycle. In that cycle hold and jump will both be 0.

This makes the Program Counter to jump to the next instruction after one cycle only.

I do not want to change the code in the PC.v file, by adding more ports, but, if it is absolutely necessary, then fine. I believe it is a problem with how I implemented the FSM for the branch instructions (with only 1 state - where I assign the jump and jumpLine values), but I don't know how to modify the FSM to avoid this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant