Skip to content

Superscalar frontend #630

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

Merged
merged 29 commits into from
Apr 13, 2024
Merged

Superscalar frontend #630

merged 29 commits into from
Apr 13, 2024

Conversation

xThaid
Copy link
Contributor

@xThaid xThaid commented Mar 26, 2024

  • the frontend is able to fetch many instructions in one cycle
  • the fetch unit can also redirect itself, when for example it decodes a JAL instruction
  • I added a simple branch prediction (branches jumping backwards predict as taken)

Benchmarks: https://github.com/xThaid/coreblocks/actions/runs/8599901154

TODO:

@xThaid xThaid added the enhancement New feature or request label Mar 26, 2024
@xThaid xThaid force-pushed the superscalar_frontend branch from bda7878 to 83aeeae Compare March 31, 2024 15:10
@xThaid xThaid mentioned this pull request Mar 31, 2024
@xThaid xThaid force-pushed the superscalar_frontend branch 3 times, most recently from 7a83fff to 38ba7df Compare April 2, 2024 13:44
@xThaid xThaid force-pushed the superscalar_frontend branch from 38ba7df to 82eff00 Compare April 2, 2024 20:25
@xThaid xThaid marked this pull request as ready for review April 3, 2024 08:39
@tilk
Copy link
Member

tilk commented Apr 8, 2024

This FENCE test fail is weird. Is this a LSU bug, which somehow wasn't detected by all the other tests?

@xThaid xThaid mentioned this pull request Apr 9, 2024
@xThaid xThaid requested review from piotro888 and lekcyjna123 April 12, 2024 09:10
Copy link
Contributor

@lekcyjna123 lekcyjna123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I left few comments but they can be solved under different PR.

self.resume = Method(i=self.gen_params.get(FetchLayouts).resume)
self.stall_exception = Method()
self.stall_exception.add_conflict(self.resume, Priority.LEFT)
It is a temporary workaround for a fetch buffer until the rest of the core becomes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is a workaround, but general. It should be in transactron library in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have another use case, I'll be happy to move it.


# For now assume that the fetch block is 4 bytes long (a machine word).
assert self.gen_params.fetch_block_bytes == 4
self.clean.add_conflict(self.write, Priority.LEFT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean is last definition in module, so it is not needed to add conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_conflict also prohibits the methods from running simultaneously. I am using this semantics in the fetch unit to guarantee that whenever we have a stall signal, no instruction can leave the fetch unit (even in the same cycle).

("fibonacci", "fibonacci.asm", 1200 * 2, {2: 2971215073}, basic_core_config),
("fibonacci_mem", "fibonacci_mem.asm", 610 * 2, {3: 55}, basic_core_config),
("fibonacci", "fibonacci.asm", 500, {2: 2971215073}, basic_core_config),
("fibonacci_mem", "fibonacci_mem.asm", 400, {3: 55}, basic_core_config),
("csr", "csr.asm", 200, {1: 1, 2: 4}, full_core_config),
("exception", "exception.asm", 200 * 2, {1: 1, 2: 2}, basic_core_config),
("exception_mem", "exception_mem.asm", 200 * 2, {1: 1, 2: 2}, basic_core_config),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there possibility to reduce rest of test duration?

@tilk tilk merged commit 92e5a1f into kuznia-rdzeni:master Apr 13, 2024
github-actions bot pushed a commit that referenced this pull request Apr 13, 2024
@tilk tilk added this to the Superscalarity milestone Oct 22, 2024
tilk pushed a commit to kuznia-rdzeni/transactron that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants