fix(scheduler): defer warp_pcs[0] init out of reset block (#334)#357
Open
gautamdev17 wants to merge 1 commit into
Open
fix(scheduler): defer warp_pcs[0] init out of reset block (#334)#357gautamdev17 wants to merge 1 commit into
gautamdev17 wants to merge 1 commit into
Conversation
…u#334) Non-constant reset assignment (base_dcrs.startup_addr) inside if(reset) is illegal in ASIC synthesis. Introduces 'initialized' flag: reset block uses constants only; warp_pcs[0] and active_warps[0] set atomically one cycle after reset deassertion so warp 0 never schedules with PC=0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #334
Problem
warp_pcs[0]was being assigned frombase_dcrs.startup_addrinside the reset block. This is not allowed in ASIC synthesis,reset assignments must be constants, not runtime signals.Fix
Added a
reg initializedflag that starts at0on reset. On the first cycle after reset,warp_pcs[0]andactive_warps[0]are loaded together, so warp 0 only becomes schedulable once it has the correct boot address. All other scheduler logic runs normally after that.This adds one extra cycle before the first instruction is fetched,which has no practical impact.