CpSc 418		Assignment 1			Due:  27 Sept. 2001


Homework is due in class on 27 Sept. 2001.  You can submit your assignment
electronically using the 'handin' program on the undergraduate servers.
If you use handin, the name for this assignment is:
	assn1

If you would like to receive your scores by e-mail, please write
your e-mail address next to your name on your solution.

If you have questions about the homework or find an error in any of the
questions, please post a message to ubc.courses.cpsc.418.  I give extra
credit to the first person to find any particular error, where first is
determined by the time stamp on the newsposting.  If the error prevents
the correct solution of the problem, the extra credit is the full value
of the affected problem.  Reporting typos and grammatical errors earns
token extra credit points.


1.  (30 points)  Scaling laws.  For each quantity named below, determine
	a reasonable estimate of the doubling (or halving) time for the
	quantity.  For each estimate, state how you determined it,
	how long it takes at this rate to get a 2x, 10x, and 1000x
	growth (or 1/2, 1/10, and 1/1000 for decreasing quantities).
  a.  (5 points) Memory bandwidth
  b.  (5 points) Memory latency
  c.  (5 points) Population of Canada
  d.  (5 points) Population of England or China (or some other country
		that doesn't have large immigration).
  e.  (5 points) Compare your answers to 1.a and 1.b.  What conclusions do you
	draw?  What are some implications for computer architecture?
  f.  (5 points) Working backwards from your answer to 1.d., in what year
		would the population of this country have been 1 if
		the current trend applied arbitrarily far backwards?
		What conclusions can you make?

  HINT:  This question is an invitation to go to the library, surf the web,
  	 and pay attention while reading the papers for this class and
	 attending lectures.


2.  (30 points)  We read papers about the Sony Playstation 2 and the
	Microsoft X box.  The PS2 paper is nearly two years old, and
	the X box paper is nearly a year and a half old.  Find one or
	two more recent sources of information about each of these.
	Be sure to provide full citation data for your sources and
	answer at least three of the questions below.
	  For each question, a reasonable answer should be 3-10 sentences
	long.  Excessively long answers may annoy the instructor or TA
	and result in reduced credit.
  a.  When is the Xbox expected to be available?
  b.  What is the current market for the PS2?
  c.  Have either of the consoles changed significantly since
	the descriptions in the papers?
  d.  Do the architectural choices described in the papers seem to have
	significant impact on market success?
  e.  Did you find anything else interesting about these game consoles?



3.  (35 points)  Compare the PowerPC III processor with the Pentium 4.
	  For each question, a reasonable answer should be 3-10 sentences
	long.  Excessively long answers may annoy the instructor or TA
	and result in reduced credit.
  a.  (5 points) For what kind of workload is each processor designed?
  b.  (10 points) How does this affect the pipeline design?
  c.  (10 points) How does this affect the memory system design?
  d.  (10 points) What else is affected by these focus on different workloads?
	


If you are registered for CpSc 418, do ONE of questions 4 or 5.
If you are registered for CpSc 538A, do BOTH questions.

4. (35 points)  Assume that wires in a 0.13 micron process have a
    capacitance of 20*10^-18 Farads/micron and a resistance of 0.1
    ohms/micron.  The delay of a wire can be approximated by:
      0.4 RC
    where R is the total resistance of the wire (i.e. resistance per
    unit length times the length), and C is the total capacitance of
    the wire.
  a.  (10 points)  What are the delays for wires of lengths:
	 1 millimeters
	 5 millimeters
	10 millimeters
	15 millimeters
      Draw a plot of delay versus length for lengths from 0 to 20 millimeters.

  b.  (10 points)  The delay of long wires can be reduced by introducing
	buffers.  Instead of having:
	    Source ----------------------------------------------- Destination
	you get
	    Source ------buf-----buf-----buf-----buf-----buf------ Destination
	In this case, the total delay is the delay of all of the segments
	plus the delay of all of the buffers.  For a 0.13 micron process,
	assume that a buffer has a delay of 50 picoseconds.
	  To minimize the delay of sending a signal from a source to
	a destination that are separated by 15 millimeters, how many
	buffers should you use?  You can assume that the buffers are
	should be evenly spaced along the wire.

  c.  (15 points)  To minimize the delay of sending a signal a distance
	of X millimeters, how many buffers should you use (as a function
	of X)?

  d.  (10 points EXTRA CREDIT)  Prove that if you use m buffers, spacing
	them evenly along the wire minimizes the total delay.

   


5.  (35 points) Silicon has an atomic weight of 28.0855 grams/mole and a
	density of 2.33 grams/cm^3.  For an n-channel MOSFET, assume that
	the p- channel region has a 5*10^17 holes/cm^3.

  a.  (5 points)  If the source and drain of a transistor are separated by
	0.15 microns, how many silicon atoms is this length?

  b.  (5 points)  What is the ratio of silicon atoms to doping atoms in
	the channel?

  c.  (20 points)  Consider an electron that wanders into the p- channel.
	I'm just interested in the motion of the electron across the channel.
	What is the probability that the electron crosses the channel
	(from source to drain) without encountering a hole even though
	the gate voltage is 0 (i.e. the transistor should be turned off)?
	The rest of this question walks you through how to determine
	this probability.
	  If most of the motion of the electron is thermal motion (rather
	than drift due to the electric field between the source and drain),
	we can model this as a random walk.  Here's how:
	  1.  At each step, assume that the electron take a step of
		one silicon atom in a random direction.  To generate
		random directions, you can get three random numbers
		(e.g. the C-library random() or from the Java API's
		java.lang.Math.random() or the random() function in
		Matlab), each uniformally distributed in [-1, 1].
		Consider these to be a point, (x, y, z) in a
		three-dimensional space.  Let r = sqrt(x*x + y*y + z*z).
		If r > 1, get a new random point, repeating until r <= 1.
		You now have a random point in the unit sphere.  If you
		normalize this point:
		  q = r/sqrt(x*x + y*y + z*z)
		you get a random point on the surface of the unit sphere.
		This models a one atom hop of the electron, in a random
		direction (I'm ignoring the crystal structure of silicon
		for simplicity).
	  2.  Let the x component of q be the motion of the electron
		in the direction of the drain.  Start with the electron
		at x=0:
		    x(0) = 0
		At each step, compute a random step for x as described above:
		    x(i+1) = x(i) + randomStep.x
		If x(i) < 0,
		  then the electron returned to the source,
		  and no leakage occured;
		else if x(i) > channelLength
		  then the electron made it across the channel,
		  and leakage occured;
		else with probability hole(concentration) (from part b),
		  the electron encounters a hole and is absorbed;
		else continue the electron's walk.
	  3.  Given these rules, you can write a simulation of what happens
		to an electron.  What percentage of electrons that enter the
		channel reach the other side?

  d.  (5 points)  15 years ago, a process with 2 micron channel lengths
		had a concentration of holes in the p- channel of about
		3*10^15.  By what factor has this concentration increased
		or decreased for the 0.13 micron process?  Why was this
		change needed?

  e.  (10 points EXTRA credit)  Answer the question from part c analytically
		instead of by simulation.