Lab 9
docx
keyboard_arrow_up
School
Laredo College *
*We aren’t endorsed by this school
Course
1449
Subject
Electrical Engineering
Date
Apr 3, 2024
Type
docx
Pages
3
Uploaded by CaptainRain803
Pedro Leon
Lab 9
1. What are the limits on how fast the comparator works? How could the design be modified to make it work faster?
Some of the limits on how fast the comparator works include the number of bits compared and the inertial delay of the combinational logic gates. The design can be modified to work faster by reducing the number of bits to compare or number of gates.
2. Could you extend the design to more bits?
Yes
3. Note: that if A=1001 and B=1010 what are the results of these various tests:
If (A && B) = T or F ; if(A&B) = T or F ;
Now with A=0000 and B=0000:
If(A == B) = T or F; if (A=B) = T or F
4. How many bits of information must be sent from one module to the next of the 1 bit comparator module, how many wires does this take?
2 bits of information are sent from 1 1-bit module to the next module. 2 wires per module.
5. List 2 different ways you could write the Verilog code: List on at the behavioral level and one at the Register Transfer Level (RTL) with the logic equations you developed.
Data is transformed as it is passed from register to register. Behavioral code is higher-level and usually can't be synthesized. Constructs like loops, delays, and "initial" statements are behavioral. RTL code is lower-level and is intended to be synthesized.
6. List the truth table for your 1 bit comparator. How many outputs must connect from one cell to
the next? How many different outcomes are there for each comparison?
A
B
A < B
A > B
A = B
0
0
F
F
T
0
1
T
F
F
1
0
F
T
F
1
1
F
F
T
7. Paste in your code:
module Lab_9(
input CLK,
input [7:0] SW,
output [15:0] LED,
output [7:0] SSEG_CA,
output [7:0] SSEG_AN );
parameter width1 = 100000000;
parameter width2=10000;
wire [3:0] GT,LT;
wire [7:0] Sarray [0:7]; wire [63:0] Pass_Array; wire [7:0] Seg_val0; wire Clk_Slow, Clk_Multi; wire [7:0] Seg_valA; wire [7:0] Seg_valB;
wire [7:0] Seg_valResult;
assign LED[7:0] = SW[7:0]; assign LED[12:8]= 1'b0; Clk_Divide # (width1,width2) IN0 (CLK, Clk_Slow, Clk_Multi);
Comparator IN1 (SW[7],SW[3],1'b0,1'b0,GT[3],LT[3]);
Comparator IN2 (SW[6],SW[2],GT[3],LT[3],GT[2],LT[2]);
Comparator IN3 (SW[5],SW[1],GT[2],LT[2],GT[1],LT[1]);
Comparator IN4 (SW[4],SW[0],GT[1],LT[1],GT[0],LT[0]);
Digit_Set_Segs IN5 (SW[3:0],1'b0,Seg_valB); assign Sarray [0] = Seg_valB; Digit_Set_Segs IN6 (SW[7:4],1'b0,Seg_valA);
assign Sarray [1] = Seg_valA;
assign LED[15] = GT[0];
assign LED [13] = LT[0];
assign LED [14] = (!GT[3:0] && !LT[3:0]);
assign Seg_valResult = (GT[3:0])? ~(8'b01111101):((LT[3:0])?
~(8'b00111000):~(8'b01111001));
assign Sarray [7]= Seg_valResult;
assign Sarray [2] = 8'hFF; assign Sarray [3] = 8'hFF;
assign Sarray [4] = 8'hFF;
assign Sarray [5] = 8'hFF;
assign Sarray [6] = 8'hFF;
assign Pass_Array = {Sarray[0],Sarray[1],Sarray[2],Sarray[3],Sarray[4],Sarray[5],Sarray[6],Sarray[7]};
Display_Digit IN7 (Pass_Array, Clk_Multi, SSEG_CA, SSEG_AN); endmodule
module Comparator (
input X,
input Y,
input GTn,
input LTn,
output reg GTn1,
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
H.W: Reduce the combinational logic circuit in Figure below to a
minimum form.
arrow_forward
Written Answer Needed
Correct one
arrow_forward
Mention Written Answer Needed
Correct one
arrow_forward
9
Part 1 of 2
Mc
Graw
Hill
Required information
Consider the logic gate circuit shown in the given figure.
A (S1)-0-
B (S2)-0
C (S3)-0-
AB
B
BC
B+C
What is the Boolean equation for the given figure?
*****************
The Boolean equation for the given figure is (Click to select)
Note: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part.
arrow_forward
The numbers from 0-9 and a no characters
is the Basic 1 digit seven segment display
* .can show
False
True
In a (CA) method of 7 segments, the
anodes of all the LED segments are
* "connected to the logic "O
False
True
Some times may run out of pins on your
Arduino board and need to not extend it
* .with shift registers
True
False
arrow_forward
H.W :-
1) A four logic-signal A,B,C,D are being used to represent a
4-bit binary number with A as the LSB and D as the MSB. The
binary inputs are fed to a logic circuit that produces a logic 1
(HIGH) output only when the binary number is greater than
01102-610. Design this circuit.
2) repeat problem 1 for the output will be 0 (LOW) when the
binary input is less than 01112-710-
Saleem Lateef
arrow_forward
For the input waveforms in Figure , what logic circuit will generate the output
waveform shown? Explain in detail for each.
Inputs B
Output X
Inputs B
Output X
arrow_forward
Design the following combinational logic circuit with a
four-bit input and a three-bit output. The input
represents two unsigned 2-bit numbers: A1 A0 and B1
B0. The output C2 C1.C0 is the result of the integer
binary division A1 A0/B1 B0 rounded down to three
bits. The 3-bit output has a 2-bit unsigned whole part
C2 C1 and a fraction part CO. The weight of the fraction
bit CO is 21. Note the quotient should be rounded
down, i.e. the division 01/11 should give the outputs
00.0 (1/3 rounded down to 0) not 00.1 (1/3 rounded up
to 0.5). A result of infinity should be represented as
11.1. A minimal logic implementation is not required.
(Hint: start by producing a truth table of your design).
arrow_forward
Please help me, solve this question.
arrow_forward
i need the answer quickly
arrow_forward
Design a combinational circuit using multiplexer for a car chime based on thefollowing system: A car chime or bell will sound if the output of the logic circuit(X) is set to a logic ‘1’. The chime is to be sounded for either of the followingconditions:• if the headlights are left on when the engine is turned off and• if the engine is off and the key is in the ignition when the door is opened.Use the following input names and nomenclature in the design process:• ‘E’ – Engine. ‘1’ if the engine is ON and ‘0’ if the engine is OFF• ‘L’ – Lights. ‘1’ if the lights are ON and ‘0’ if the lights are OFF• ‘K’ – Key. ‘1’ if the key is in the ignition and ‘0’ if the key is not in the ignition• ‘D’ – Door. ‘1’ the door is open and ‘0’ if the door is closed• ‘X’ – Output to Chime. ‘1’ is chime is ON and ‘0’ if chime is OFF
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Related Questions
- 9 Part 1 of 2 Mc Graw Hill Required information Consider the logic gate circuit shown in the given figure. A (S1)-0- B (S2)-0 C (S3)-0- AB B BC B+C What is the Boolean equation for the given figure? ***************** The Boolean equation for the given figure is (Click to select) Note: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part.arrow_forwardThe numbers from 0-9 and a no characters is the Basic 1 digit seven segment display * .can show False True In a (CA) method of 7 segments, the anodes of all the LED segments are * "connected to the logic "O False True Some times may run out of pins on your Arduino board and need to not extend it * .with shift registers True Falsearrow_forwardH.W :- 1) A four logic-signal A,B,C,D are being used to represent a 4-bit binary number with A as the LSB and D as the MSB. The binary inputs are fed to a logic circuit that produces a logic 1 (HIGH) output only when the binary number is greater than 01102-610. Design this circuit. 2) repeat problem 1 for the output will be 0 (LOW) when the binary input is less than 01112-710- Saleem Lateefarrow_forward
- For the input waveforms in Figure , what logic circuit will generate the output waveform shown? Explain in detail for each. Inputs B Output X Inputs B Output Xarrow_forwardDesign the following combinational logic circuit with a four-bit input and a three-bit output. The input represents two unsigned 2-bit numbers: A1 A0 and B1 B0. The output C2 C1.C0 is the result of the integer binary division A1 A0/B1 B0 rounded down to three bits. The 3-bit output has a 2-bit unsigned whole part C2 C1 and a fraction part CO. The weight of the fraction bit CO is 21. Note the quotient should be rounded down, i.e. the division 01/11 should give the outputs 00.0 (1/3 rounded down to 0) not 00.1 (1/3 rounded up to 0.5). A result of infinity should be represented as 11.1. A minimal logic implementation is not required. (Hint: start by producing a truth table of your design).arrow_forwardPlease help me, solve this question.arrow_forward
- i need the answer quicklyarrow_forwardDesign a combinational circuit using multiplexer for a car chime based on thefollowing system: A car chime or bell will sound if the output of the logic circuit(X) is set to a logic ‘1’. The chime is to be sounded for either of the followingconditions:• if the headlights are left on when the engine is turned off and• if the engine is off and the key is in the ignition when the door is opened.Use the following input names and nomenclature in the design process:• ‘E’ – Engine. ‘1’ if the engine is ON and ‘0’ if the engine is OFF• ‘L’ – Lights. ‘1’ if the lights are ON and ‘0’ if the lights are OFF• ‘K’ – Key. ‘1’ if the key is in the ignition and ‘0’ if the key is not in the ignition• ‘D’ – Door. ‘1’ the door is open and ‘0’ if the door is closed• ‘X’ – Output to Chime. ‘1’ is chime is ON and ‘0’ if chime is OFFarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
