Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7. Consider the following mathematical expression: 3 y = sigmou a) Draw a DFG for the above code segment. Write the operations on the nodes
7. Consider the following mathematical expression: 3 y = sigmou a) Draw a DFG for the above code segment. Write the operations on the nodes and registers (i.e. namespace) on the edges for each DFG. Note that the sigmoid function can be represented as a single node in the DFG b) Suppose we want to execute the DFG you generated in the previous question on a virtual dataflow machine. How many cycles does it take to execute the DFG? Note that each operation takes one cycle c) For the DFG, write an instruction sequence in terms of the registers and operations you used in the previous question. d) Convert each instruction sequence to static single assignment (SSA) form. Let us use the alpha notation (a) to name the registers, as we did in class. Assume you have infinite number of registers e) Suppose we are generating instructions for a target architecture. Let us assume our target architecture has only two units that can perform arithmetic operations. In this case, how many cycles does it take to execute the DFG? Assume that each operation takes one cycle. f) Now suppose we want to generate instructions for stack machine instead of dataflow machine. Write the instruction sequence for a stack machine such as Java Virtual Machine that represents the expression given in the problem. 7. Consider the following mathematical expression: 3 y = sigmou a) Draw a DFG for the above code segment. Write the operations on the nodes and registers (i.e. namespace) on the edges for each DFG. Note that the sigmoid function can be represented as a single node in the DFG b) Suppose we want to execute the DFG you generated in the previous question on a virtual dataflow machine. How many cycles does it take to execute the DFG? Note that each operation takes one cycle c) For the DFG, write an instruction sequence in terms of the registers and operations you used in the previous question. d) Convert each instruction sequence to static single assignment (SSA) form. Let us use the alpha notation (a) to name the registers, as we did in class. Assume you have infinite number of registers e) Suppose we are generating instructions for a target architecture. Let us assume our target architecture has only two units that can perform arithmetic operations. In this case, how many cycles does it take to execute the DFG? Assume that each operation takes one cycle. f) Now suppose we want to generate instructions for stack machine instead of dataflow machine. Write the instruction sequence for a stack machine such as Java Virtual Machine that represents the expression given in the
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started