-
Notifications
You must be signed in to change notification settings - Fork 8
add sw_testbench #50
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
add sw_testbench #50
Conversation
add sw testbench; add FF between RF and ALU
|
||
always @(posedge clk) begin | ||
dataA <= rd1; | ||
dataB <= rd2; | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So i think figured out what was the issue with the sw
-- it was not really related to the PC using the single clock cycle stuff; the real problem was that the dataA
and dataB
registers here, because they technically already existed in the RF implementation (i.e. the reads were "clocked"); so this was adding another clock cycle basically.
Both approaches are correct, but i think your implementation is probably more inline with how the diagram is layed out -- the sync register is outside of RF and the reads are combinational ; i pushed the update to your PR along with the test bench fixes and it should be good to go now
add sw testbench; add FF between RF and ALU