Professional Documents
Culture Documents
GROUP 28
Design details
In this picture I sketched the circuit and wrote the outputs that should correspond to the inputs.
In this picture, I set which leds should light up in response to the inputs.0 for led on and 1 for led off
because to get right result on seven segment LED.
In this picture I set the output functions correspons to the truth table with using minterms and I did
some simplifications but after that I realize simplification made my work harder because of that I use
functions without simplification.
Design and Implementation Steps
My Code
module hexa_led(I0,I1,I2,I3,O0,O1,O2,O3,O4,O5,O6);
output O0,O1,O2,O3,O4,O5,O6;
input I0,I1,I2,I3;
wire nI0,nI1,nI2,nI3;
not (nI0,I0);
not (nI1,I1);
not (nI2,I2);
not (nI3,I3);
wire w0000,w0001,w0010,w0011,w0100,w0101,w0110,w0111;
and (w0000,nI0,nI1,nI2,nI3);
and (w0001,nI3,nI2,nI1,I0);
and (w0010,nI3,nI2,I1,nI0);
and (w0011,I3,I2,nI1,nI0);
and (w0100,nI3,I2,nI1,nI0);
and (w0101,nI3,I2,nI1,I0);
and (w0110,nI3,I2,I1,nI0);
and (w0111,nI3,I2,I1,I0);
wire w1001,w1010,w1011,w1100,w1101,w1110,w1111;
and (w1001,I3,nI2,nI1,I0);
and (w1010,I3,nI2,I1,nI0);
and (w1011,I3,nI2,I1,I0);
and (w1100,I3,I2,nI1,nI0);
and (w1101,I3,I2,nI1,I0);
and (w1110,I3,I2,I1,nI0);
and (w1111,I3,I2,I1,I0);
or (O6,w0000,w0001,w0111,w1100);
or (O5,w0001,w0010,w0011,w0111,w1101);
or (O4,w0001,w0011,w0100,w0101,w0111,w1001);
or (O3,w0001,w0100,w0111,w1010,w1111);
or (O2,w0010,w1100,w1110,w1111);
or (O1,w0101,w0110,w1011,w1100,w1110,w1111);
or (O0,w0001,w0100,w1011,w1101);
endmodule
I first defined the inputs and outputs in my code, created the necessary cables according to the circuit I
drew, and finally connected the cables to the output. I use and gate first and or gates after because of I
write my function with minterms.
That is pin names that I use. I connect my inputs and outputs like that.
RTL Viewer Circuit
A little bit different from my circuit but in generally we can say both of them are same.
Simulation Result
As you can see my code is working correctly. For input 0000 output is 0, for input 1110 output is E
and like that.
Note: In this experiment I did all work by myself. I did not get any help from
other group members becuse of that I did not add their name to the report.