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

Added --permissive-dual-issue flag #27

Merged
merged 10 commits into from
Sep 11, 2023
Merged

Added --permissive-dual-issue flag #27

merged 10 commits into from
Sep 11, 2023

Conversation

Emoun
Copy link
Member

@Emoun Emoun commented Sep 4, 2023

'--permissive-dual-issue' flag is meant to test the effect of allowing some instructions of the instructions currently disallowed in the second issue slot.

Currently this enables loads, stores, and branches in the second issue slot with the following requirement:
Only 1 instructions of each kind may be enabled in a bundle, i.e., if there are two loads in a bundle an error will be thrown if they are both enabled. This "check" is done in the simulator at runtime and is thus a guarantee the programmer/compiler provides. The idea is the hardware can treat a violation as undefined behavior (i.e., hardware can do whatever it wants).

I have chosen to allow a store and a load to be enabled in the same bundle. This is assuming the load and store hardware is separate and may be able to execute a load and a store simultaneously , which does seem to be common but I haven't checked whether Patmos can easily implement this.

Also fixed #17

@schoeberl
Copy link
Member

OK, good idea. However, I would not allow a load and store both enabled. This is hard to support in hardware.

@Emoun
Copy link
Member Author

Emoun commented Sep 4, 2023

Ok, I'll disallow store and load together.

Like other loads/stores, stack load/store now only allowed in second
issue slot when using the '--permissive-dual-issue' flag.

Also no longer allows two stack loads/stores enabled in the same bundle.
This is because implemented allowing that in hardware would be difficult.
@Emoun
Copy link
Member Author

Emoun commented Sep 7, 2023

I have added 2 more cases to the bundling:

  1. Disallow 2 main-memory targeting instructions. E.g., cannot do a data-cache load and a call the call must fetch instruction and the cache might miss.
  2. Disallow 2 stack operations like in Stack load/store bundled with stack cache management instruction #25 (this is a temporary solution until that issue is decided)

Question: Does it make sense to allow a stack load/store with, e.g., a call (even if the call will need to load memory)? This is currently allowed

Now also cannot bundle two main-memory operations and two stack operations.
@schoeberl
Copy link
Member

schoeberl commented Sep 8, 2023 via email

@Emoun
Copy link
Member Author

Emoun commented Sep 10, 2023

What do you mean by "not good"? Are there any hardware limitations you can think of?
The compiler could take advantage of allowing it.

@schoeberl
Copy link
Member

schoeberl commented Sep 10, 2023 via email

@Emoun
Copy link
Member Author

Emoun commented Sep 10, 2023

But here we are talking about only stack load/stores, which don't touch main memory, so no contention there.

@schoeberl
Copy link
Member

You are right.

@Emoun
Copy link
Member Author

Emoun commented Sep 11, 2023

Ok, I will keep the rules and requirements as is right now.

Also, commented out code as specified in #28 .

@Emoun Emoun merged commit 0bd9c4e into t-crest:master Sep 11, 2023
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

Successfully merging this pull request may close these issues.

-h gives conflicting information regarding default data cache kind
2 participants