I need actual code for this program. Not Python. Not a diagram. I need code usin
ID: 3735926 • Letter: I
Question
I need actual code for this program. Not Python. Not a diagram. I need code using Xilinx.
General Description: You are to create an 8-to-1 MUX using 7 instances of the Xilinx 2-to-1 MUX module named (M2_1) in the library of parts. You design will have eight data inputs, one bit each (d7…d0). There will be one output, also being 1-bit (y). The MUX is to be created using ONLY 2-to-1 MUX’s, having two data inputs (one bit each) and one output, also being 1-bit. The purpose of this lab is to use “structural modeling” techniques with the schematic editor. The “unconnected” structure of the 8-to-1 MUX is shown in the diagram below:
For the simulation, you must place the value 110010102 on inputs d7 to d0, and the go through all 8 combinations of the selected lines, s2 to s0.
You may modify the following Testbench:
// Initialize Information Inputs
//you may give different values
d0 = 0;
d1 = 1;
d2 = 0;
d3 = 1;
d4 = 0;
d5 = 0;
d6 = 1;
d7 = 1;
s0 = 0;
s1 = 0;
s2 = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
#10 s2 = 0; s1 = 0; s0 = 0;
#10 s2 = 0; s1 = 0; s0 = 1;
#10 s2 = 0; s1 = 1; s0 = 0;
#10 s2 = 0; s1 = 1; s0 = 1;
#10 s2 = 1; s1 = 0; s0 = 0;
#10 s2 = 1; s1 = 0; s0 = 1;
#10 s2 = 1; s1 = 1; s0 = 0;
#10 s2 = 1; s1 = 1; s0 = 1;
Explanation / Answer
solution:
The below is the given data that represents the data;
created using ONLY 2-to-1 MUX’s, having two data inputs (one bit each) and one output, also being 1-bit. The purpose of this lab is to use “structural modeling” techniques with the schematic editor. The “unconnected” structure of the 8-to-1 MUX
# Python program to find the largest number among the three input numbers
# change the values of numl, num2 and num3
# for a different result
numl = 10
num2 = 14
num3 = 12
# uncomment following lines to take three numbers from user
#numl = float(input("Enter first number: "))
#num2 = float(input("Enter second number: "))
#num3 = float(input("Enter third number: "))
if (numl >= num2) and (numl >= num3):
largest = numl
elif (num2 >= numl) and (num2 >= num3):
largest = num2
else:
largest = num3
print("The largest number
between" ,numl," ," ,num2," and",num3,"is",largest)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.