Muxes and their application - University of Southern … Right-Shifting Barrel Shifter 4-Bit...

24
EE201L_ClassNotes_Ch4.fm 4/25/06 EE201L Class Notes - Chapter #4 Page 1 / 7 C Copyright 2006 Gandhi Puvvada Chapter 4 (incomplete) Muxes and their application Design a cross switch which connects the inputs (I1, I0) to the outputs (Y1, Y0) either directly when CROSS = 0 or in crossed fashion when CROSS = 1. Now design a 2-bit cross switch using two of the single-bit cross-switches design above. I0 I1 S Y I0 I1 S Y I0 I1 Y0 Y1 CROSS = 0 I0 I1 Y0 Y1 CROSS = 1 I0 I1 Y0 Y1 CROSS CROSS I00 I01 I10 I11 Y00 Y01 Y10 Y11 CROSS I00 I01 I10 I11 Y00 Y01 Y10 Y11 I0 I1 Y0 Y1 CROSS I0 I1 Y0 Y1 CROSS CROSS I00 I01 I10 I11 Y00 Y01 Y10 Y11 = 0 = 1

Transcript of Muxes and their application - University of Southern … Right-Shifting Barrel Shifter 4-Bit...

EE201L_ClassNotes_Ch4.fm

4/25/06 EE201L Class Notes - Chapter #4 Page 1 / 7C Copyright 2006 Gandhi Puvvada

Chapter 4 (incomplete)Muxes and their application

Design a cross switch which connects the inputs (I1, I0) to the outputs (Y1, Y0) either directly when CROSS = 0 or in crossed fashion when CROSS = 1.

Now design a 2-bit cross switch using two of the single-bit cross-switches design above.

I0

I1 SY

I0

I1 SY

I0

I1

Y0

Y1

CROSS= 0

I0

I1

Y0

Y1

CROSS= 1

I0

I1

Y0

Y1

CROSS

CROSS

I00

I01

I10

I11

Y00

Y01

Y10

Y11

CROSS

I00

I01

I10

I11

Y00

Y01

Y10

Y11

I0

I1

Y0

Y1

CROSS

I0

I1

Y0

Y1

CROSS

CROSS

I00

I01

I10

I11

Y00

Y01

Y10

Y11

= 0 = 1

Page 2 of 16

EE201L_ClassNotes_Ch4.fm

4/25/06 EE201L Class Notes - Chapter #4 Page 2 / 7C Copyright 2006 Gandhi Puvvada

Barrel Shifter

Is the Right-Shifting Barrel Shifter essentially "same" as the Left-Shifting Barrel Shifter? Is it possible to use one implementation of the shifter for right-shifting or left shifting by cleverly manipulating the labelling of inputs and outputs?

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

0 0

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

0 1

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

1 0

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

1 1

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

0 0

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

0 1

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

1 0

I0

I1

I2

I3

Y0

Y1

Y2

Y3

S1 S0

1 1

4-Bit Right-Shifting Barrel Shifter

4-Bit Left-Shifting Barrel Shifter

1

2

3

0RightShifter 1

2

3

0LeftShifter

Page 4 of 16

Page 5 of 16

Page 6 of 16

Page 7 of 16

Page 8 of 16

Page 9 of 16

Page 10 of 16

Page 11 of 16

Page 12 of 16

EE201L_ClassNotes_Ch4.fm

4/25/06 EE201L Class Notes - Chapter #4 Page 5 / 7C Copyright 2006 Gandhi Puvvada

Fixed Priority Resolver:

Assume R0 (request 0) has the highest priority and R2 has the lowest priority.Produce the grant outputs (G0 to G2) according to the fixed priority.

Rotating prioritization (Round Robin Prioritization)HP = Highest priority; NH = Next to Highest; NNH = Next to next to Highest; LP = Lowest priority

R0

R1

R2

G0

G1

G2

/RQ0

/RQ1

/RQ2

/G0

/G1

/G2

1

2

3

0RightShifterHP

LP

NH

NN

H 2

3

0

1RightShifterHP

LP

NH

NN

H 3

0

1

2RightShifterHP

LP

NH

NN

H 0

1

2

3RightShifterHP

LP

NH

NN

H

Page 14 of 16

EE201L_ClassN

otes_Ch4.fm

4/25/06EE201L C

lass Notes - C

hapter #4 Page 6 / 7C

Copyright 2006 G

andhi Puvvada

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

EE102L Lab 4B

5. Produce a 2-bit output O1 O0

Notes:

1. Import files by doing

6. Simulate your design and

4. Label the inputs of the

3. Use ~RQ0, ~RQ1, ~RQ2, ~RQ3

2. The 2-bit input I1 I0

specifies the lowest

for the 4 incoming request

with these labels.

the input barrel shifter

labels. Label the inputs of

label the inputs

~R3

~R2

~R1

~R0

OR4

B

CQ

A

D

OR3

A

C

QB

OR2

A

BQ

Rotating Prioritizer

EE-System

Designed by : Gandhi Puvvada & Sugianto Kolim

Encoder

QN

A

NOT

QN

A

NOT

~G1

~G2

~G3

QN

A

NOT

USC

~GT0

~GT1

~GT2

~GT3

I0

I1

A Q

BUF

~G0

incoming request.

output barrel shifter with

prioritizer in the middle.

that indicates the "ID" of

the currently active grant

output. If none is active,

the 2-bit output can be

a don’t care. Draw this

logic in the encoder box.

verify using the command

file given to you.

7. Turn in completed schematic

together with the waveform

and a brief justification

of your design/simulation

results.

the output labels of the fixed

S0

O

I0

I1

I2

I3

S1

MUX

cd ~/pv/ee102l

~eeview/ee102l_rot_prioritizer.shar

Oct. 30 , ’95/Sept. 26. ’97

Prioritizerlabel the inputs

Output Barrel ShifterInput Barrel Shifter

S0

O

I0

I1

I2

I3

S1

MUX

EE201L_ClassN

otes_Ch4.fm

4/25/06EE201L C

lass Notes - C

hapter #4 Page 7 / 7C

Copyright 2006 G

andhi Puvvada

SOLUTION

SN74LS00

56

4U?

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

S0

O

I0

I1

I2

I3

S1

MUX

EE102L Lab 4B

5. Produce a 2-bit output O1 O0

Notes:

1. Import files by doing

6. Simulate your design and

4. Label the inputs of the

3. Use ~RQ0, ~RQ1, ~RQ2, ~RQ3

2. The 2-bit input I1 I0

specifies the lowest

for the 4 incoming request

with these labels.

the input barrel shifter

labels. Label the inputs of

label the inputs

~R3

~R2

~R1

~R0

OR4

B

CQ

A

D

OR3

A

C

QB

OR2

A

BQ

Rotating Prioritizer

EE-System

Designed by : Gandhi Puvvada & Sugianto Kolim

Encoder

QN

A

NOT

QN

A

NOT

~G1

~G2

~G3

QN

A

NOT

USC

~GT0

~GT1

~GT2

~GT3

I0

I1

A Q

BUF

~G0

incoming request.

output barrel shifter with

prioritizer in the middle.

that indicates the "ID" of

the currently active grant

output. If none is active,

the 2-bit output can be

a don’t care. Draw this

logic in the encoder box.

verify using the command

file given to you.

7. Turn in completed schematic

together with the waveform

and a brief justification

of your design/simulation

results.

the output labels of the fixed

S0

O

I0

I1

I2

I3

S1

MUX

cd ~/pv/ee102l

~eeview/ee102l_rot_prioritizer.shar

Oct. 30 , ’95/Sept. 26. ’97

Prioritizerlabel the inputs

Output Barrel ShifterInput Barrel Shifter

S0

O

I0

I1

I2

I3

S1

MUX

~RQ0

~RQ1

~RQ2

~RQ3

~RQ0

~RQ2

~RQ3

~RQ0

~RQ1

~RQ2

~RQ3

~RQ0

~RQ1

~RQ2

~RQ3

~RQ1

~G0

~G1

~G2

~G3

~G0

~G1

~G2

~G3

~G0

~G1

~G2

~G3

~G0

~G1

~G2

~G3

SN74LS00

13

2

U?

O0

O1

~GT1

~GT2

~GT3

~GT3