-
Notifications
You must be signed in to change notification settings - Fork 1
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
About fsm function of "Interface" trait. #16
Comments
First of all, your understanding of the concept of the HazardFlow is correct.
Yes. In the HazardFlow compiler, the fsm function is not actually executed (which would lead to a panic). Instead, the HazardFlow compiler captures the High-level IR generated by the Rust compiler and extracts information about the input / output / state types ( Thanks for the question, we will add a brief explanation of the above process to the code and the documentation. FYI: The HazardFlow compiler implementation can be found in the hazardflow directory, though it is okay to omit the implementation of the compiler. |
@minseongg With respect to "fetch" pipeline stage, And each of them consists of two submodules again. And the distinguishable characteristic is that the resolver type of intermediary interface of such two sub-modules is So I wonder what is the motivation that And I wonder the reason why resolver type of intermediary interface is Thank you. |
Let me explain the structure and the role of each submodule in the
Here, the Our design motivation for the This design pattern is used quite commonly in our combinator implementation. For example:
So, the answers to your questions are:
The reason is that more generic combinators' resolver type of ingress interface is I hope this answers your question; feel free to ask further questions. |
Thanks to your elaborate explanation, I got the intention of such sub module design. So, module prefixed with "naked" will additionally put its state into ingress resolver. Then, I wonder in which scenario such additional state is necessary. 1.At first, I've come up with superscalar architecture or out-of-order cpu that requires internal queues in its each pipeline. 2.Another scenario I've thought for was hazard.
"Sub" instruction in decode stage(M1) should be noticed that its source(r3) & destination(r1) registers are not ready. Then, "Sub" decode stage(M1) will receive resolver signal which contains states of afterward modules(M2, M3) and it will clean up such states by In other words, states of afterward modules are cumulated by In my opinion, "producing states in resolver" and "consuming states of afterward modules" is implemented by Can I ask you to check whether my understanding is proper or not. |
Yes, your understanding is correct. In general, resolving the structural hazard (related to your first scenario) requires only a ready bit, so there is no need to use Also, it seems correct to understand as "producing states in resolver" in |
Answer to Question 1:Implementing the For example, let's assume that An example of the cycle-level behavior would be as follows:
To address this problem, we could add an additional FIFO at Answer to Question 2:Yes, it is right. Good job! +) Could you please create a new issue for further questions unrelated to the title? Your questions will be very helpful to other students, but they might be difficult to find by looking at only the title. |
We have updated the hazardflow repository:
|
Closing, feel free to reopen if you have further questions! |
I've gone through CPU-core pipelined stage implemented by HazardFlow designs.
In my understanding, each pipeline(fetch, decode, ...) and its sub-pipelines are implemented by module that is connected to aside modules via "Interface" object such as I<VrH<P, R>, D>.
And each submodules have their own specialized functionality such "source", "filter", "map" , etc.
Such specialized functionalities are based on fundamental function "fsm" of "Interface" trait that outputs egress payload, ingress resolver based on egress resolver and ingress payload. (+state).
Then, when I 've gone through specific "fsm" function body, just "panic!(compiler magic)" mentioned.
Then, I wonder what happened we build our own high level hazardflow hdl.
Although, only "panic" statements is left in "fsm" function body, is such fundamental function(fsm) compiled properly into low level hdl like verilog?
The text was updated successfully, but these errors were encountered: