Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions