程序代写代做代考 MSCP 52011

MSCP 52011
Introduction to Computer Systems
Administrivia & Review
Introduction to Computer Systems Week 2
Chapter 2
Project review Project 1 hints Binary arithmetic Adder circuits ALU
Project 2
Chapter 3
State machine Flip-flops Memory
PC
Project 3

Administrivia
• Assignments worth 65% of final grade
• Assessments worth 30% of final grade
• Class participation worth 5% of final grade • Grade cutoffs are listed on Canvas
Office Hours
• Marty Billingsley (mbilling@uchicago.edu)
 Monday 6:00pm

Wednesday 6:00pm
• Kevin Krafthefer (krafty@uchicago.edu)
 Monday 4:00pm

Tuesday 4:30pm

Project Q&A
• Project 0 • Project 1
Project Q&A
• Project 0 • Project 1

Project 1 – Build up in abstraction Mux -> Mux16 -> Mux4Way16
CHIP Mux {
IN a, b, sel;
OUT out;
PARTS:
Not(in=sel,out=nsel);
And(a=a,b=nsel,out=c);
And(a=b,b=sel,out=d);
OR(a=c,b=d,out=out);
}
Mux -> Mux16 -> Mux4Way16
CHIP Mux16 {
IN a[16], b[16], sel;
OUT out[16];
// PARTS:
Mux(a=a[0],b=b[0],sel=sel,out=out[0]);
Mux(a=a[1],b=b[1],sel=sel,out=out[1]);
Mux(a=a[2],b=b[2],sel=sel,out=out[2]);
Mux(a=a[3],b=b[3],sel=sel,out=out[3]);
Mux(a=a[4],b=b[4],sel=sel,out=out[4]);
Mux(a=a[5],b=b[5],sel=sel,out=out[5]);
Mux(a=a[6],b=b[6],sel=sel,out=out[6]);
Mux(a=a[7],b=b[7],sel=sel,out=out[7]);
Mux(a=a[8],b=b[8],sel=sel,out=out[8]);
Mux(a=a[9],b=b[9],sel=sel,out=out[9]);
Mux(a=a[10],b=b[10],sel=sel,out=out[10]);
Mux(a=a[11],b=b[11],sel=sel,out=out[11]);
Mux(a=a[12],b=b[12],sel=sel,out=out[12]);
Mux(a=a[13],b=b[13],sel=sel,out=out[13]);
Mux(a=a[14],b=b[14],sel=sel,out=out[14]);
Mux(a=a[15],b=b[15],sel=sel,out=out[15]);
}
www.pjrc.com

Project 1 – Build up in abstraction Mux -> Mux16 -> Mux4Way16
CHIP Mux4Way16 {
IN a[16], b[16], c[16], d[16], sel[2];
OUT out[16];
PARTS:
Mux16(a=a,b=b,sel=sel[0],out=q);
Mux16(a=c,b!=d,sel=sel[0],out=r);
Mux16(a=q,b=r,sel=sel[1],out=out);
}
wordpress.com
Project 1 – Use Abstraction! DMux -> DMux4Way -> DMux8Way
CHIP DMux {
IN in, sel;
OUT a, b;
PARTS:
Not (in=sel, out=notSel);
And (a=in, b=notSel, out=a);
And (a=in, b=sel, out=b);
}

Project 1 – Use Abstraction! DMux -> DMux4Way -> DMux8Way
CHIP DMux4Way {
IN in, sel[2];
OUT a, b, c, d;
PARTS:
DMux (in=in, sel=sel[1], a=ab, b=cd);
DMux (in=ab, sel=sel[0], a=a, b=b);
DMux (in=cd, sel=sel[0], a=c, b=d);
CHIP DMux4Way {
IN in, sel[2];
OUT a, b, c, d;
PARTS:
Not (in=sel[0], out=notSel0);
Not (in=sel[1], out=notSel1);
And (a=notSel1, b=notSel0, out=selA)
And (a=notSel1, b=sel[0], out=selB)
And (a=sel[1], b=notSel0, out=selC)
And (a=sel[1], b=sel[0], out=selD)
And (a=selA, b=in, out=a);
And (a=selB, b=in, out=b);
And (a=selC, b=in, out=c);
And (a=selD, b=in, out=d);
}
}
; ; ; ;
Project 1 – Use Abstraction! DMux -> DMux4Way -> DMux8Way
CHIP DMux4Way {
IN in, sel[2];
OUT a, b, c, d;
PARTS:
DMux (in=in, sel=sel[1], a=ab, b=cd);
DMux (in=ab, sel=sel[0], a=a, b=b);
DMux (in=cd, sel=sel[0], a=c, b=d);
CHIP DMux4Way {
IN in, sel[2];
OUT a, b, c, d;
PARTS:
Not (in=sel[0], out=notSel0);
Not (in=sel[1], out=notSel1);
And (a=notSel1, b=notSel0, out=selA)
And (a=notSel1, b=sel[0], out=selB)
And (a=sel[1], b=notSel0, out=selC)
And (a=sel[1], b=sel[0], out=selD)
And (a=selA, b=in, out=a);
And (a=selB, b=in, out=b);
And (a=selC, b=in, out=c);
And (a=selD, b=in, out=d);
}
}
; ; ; ;

}
Project 1 – Use Abstraction! DMux -> DMux4Way -> DMux8Way
CHIP DMux8Way {
IN in, sel[3];
OUT a, b, c, d, e, f, g, h;
PARTS:
// Binary tree of demultiplexors.
DMux (sel=sel[2], in=in, a=abcd, b=efgh);
CHIP DMux8Way {
IN in, sel[3];
OUT a, b, c, d, e, f, g, h;
PARTS:
// Use 4-way DMux
DMux (sel=sel[2], in=in
DMux4Way (sel=sel[0..1], in=ab
DMux4Way (sel=sel[0..1], in=ef
DMux (sel=sel[1], in=abcd, a=ab,
DMux (sel=sel[1], in=efgh, a=ef,
b=cd);
b=gh);
b=b);
b=d);
b=f);
b=h);
DMux (sel=sel[0], in=ab,
DMux (sel=sel[0], in=cd,
DMux (sel=sel[0], in=ef,
DMux (sel=sel[0], in=gh,
a=a,
a=c,
a=e,
a=g,
, a=abcd,
cd, a=a, b=b
gh, a=e, b=f
}
PARTS:
PARTS:
Project 1 – Use Abstraction! DMux -> DMux4Way -> DMux8Way
CHIP DMux8Way {
IN in, sel[3];
OUT a, b, c, d, e, f, g, h;
CHIP DMux8Way {
IN in, sel[3];
Okay
Better
// Binary tree of demultiplexors.
// Use 4-way DMux
DMux (sel=sel[2], in=in, a=abcd, b=efgh);
DMux (sel=sel[2], in=in
DMux (sel=sel[1], in=abcd, a=ab,
DMux (sel=sel[1], in=efgh, a=ef,
b=cd);
b=gh);
b=b);
b=d);
b=f);
b=h);
DMux4Way (sel=sel[0..1], in=ab
DMux4Way (sel=sel[0..1], in=ef
DMux (sel=sel[0], in=ab,
DMux (sel=sel[0], in=cd,
DMux (sel=sel[0], in=ef,
DMux (sel=sel[0], in=gh,
a=a,
a=c,
a=e,
a=g,
OUT a, b, c, d, e, f, g, h;
, a=abcd,
cd, a=a, b=b
gh, a=e, b=f