prepared by ins. arwa al-issa · 2014. 4. 18. · to add a port, click the new button and type the...
TRANSCRIPT
![Page 1: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/1.jpg)
Prepared By Ins. Arwa Al-Issa
I.Arwa Al-Issa
![Page 2: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/2.jpg)
The purpose of this program is to write a correct verilog code that represent the primitive gates.
Verilog Structure:
1. Start with module and ends with endmodule.
2. Input and Output variables.
3. Wires.
4. The primitive gates: NOT, AND, OR, NAND, NOR, XOR,XNOR
I.Arwa Al-Issa
![Page 3: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/3.jpg)
module AND2gate(A, B, F);
input A;
input B;
output F;
and (F, A, B);
endmodule
I.Arwa Al-Issa
![Page 4: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/4.jpg)
Verilog Code representation Gate
not (notA, A) A’ NOT
and (F,A,B) F=A . B AND
or (F,A,B) F=A + B OR
nand (F,A,B) F=(A . B)’ NAND
nor (F,A,B) F=(A + B)’ NOR
xor (F,A,B) F=A B XOR
xnor (F,A,B) F=(A B)’ XNOR
I.Arwa Al-Issa
![Page 5: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/5.jpg)
I.Arwa Al-Issa
F Y X
0 0 0
0 1 0
0 0 1
1 1 1
![Page 6: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/6.jpg)
I.Arwa Al-Issa
0 0 0 0 0
0 1
1 0
1 1 1
![Page 7: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/7.jpg)
Starting Active DHL
“Verilog”
I.Arwa Al-Issa
![Page 8: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/8.jpg)
I.Arwa Al-Issa
![Page 9: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/9.jpg)
I.Arwa Al-Issa
![Page 10: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/10.jpg)
I.Arwa Al-Issa
![Page 11: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/11.jpg)
I.Arwa Al-Issa
![Page 12: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/12.jpg)
I.Arwa Al-Issa
![Page 13: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/13.jpg)
I.Arwa Al-Issa
![Page 14: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/14.jpg)
I.Arwa Al-Issa
![Page 15: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/15.jpg)
I.Arwa Al-Issa
![Page 16: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/16.jpg)
I.Arwa Al-Issa
![Page 17: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/17.jpg)
I.Arwa Al-Issa
![Page 18: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/18.jpg)
I.Arwa Al-Issa
![Page 19: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/19.jpg)
Define the following ports: Input Ports: - X - Y
Output Port: - F
Click the Finish button.
I.Arwa Al-Issa
![Page 20: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/20.jpg)
To add a port, click the New button and type the name of a port.
To change a port type, click the appropriate button in the Port direction box. There are four types: In Out Inout Buffer
To remove any port, click its name on the list and click the Delete button.
To create a bus, add a new port name and click the Array Indexes arrows to specify the bus width.
I.Arwa Al-Issa
![Page 21: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/21.jpg)
I.Arwa Al-Issa
![Page 22: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/22.jpg)
I.Arwa Al-Issa
![Page 23: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/23.jpg)
I.Arwa Al-Issa
![Page 24: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/24.jpg)
I.Arwa Al-Issa
![Page 25: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/25.jpg)
I.Arwa Al-Issa
![Page 26: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/26.jpg)
I.Arwa Al-Issa
![Page 27: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/27.jpg)
I.Arwa Al-Issa
![Page 28: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/28.jpg)
I.Arwa Al-Issa
![Page 29: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/29.jpg)
I.Arwa Al-Issa
![Page 30: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/30.jpg)
I.Arwa Al-Issa
![Page 31: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/31.jpg)
I.Arwa Al-Issa
![Page 32: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/32.jpg)
I.Arwa Al-Issa
![Page 33: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/33.jpg)
I.Arwa Al-Issa
![Page 34: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/34.jpg)
I.Arwa Al-Issa
![Page 35: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/35.jpg)
I.Arwa Al-Issa
![Page 36: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/36.jpg)
I.Arwa Al-Issa
![Page 37: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/37.jpg)
I.Arwa Al-Issa
![Page 38: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/38.jpg)
I.Arwa Al-Issa
![Page 39: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/39.jpg)
I.Arwa Al-Issa
![Page 40: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/40.jpg)
I.Arwa Al-Issa
![Page 41: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/41.jpg)
I.Arwa Al-Issa
![Page 42: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/42.jpg)
I.Arwa Al-Issa
![Page 43: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/43.jpg)
I.Arwa Al-Issa
F Y X
0 0 0
0 1 0
0 0 1
1 1 1
![Page 44: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/44.jpg)
implement the following function in Verilog:
F=BC+ABC
I.Arwa Al-Issa
F A’BC’ BC C’ A’ C B A
0 0 0 1 1 0 0 0
0 0 0 0 1 1 0 0
1 1 0 1 1 0 1 0
1 0 1 0 1 1 1 0
0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 1
0 0 0 1 0 0 1 1
1 0 1 0 0 1 1 1
![Page 45: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/45.jpg)
module Function(A, B,C, F); input A, B, C; output F; wire notA , notC; wire Y1, Y2; and (Y1,B,C); not (notA, A); not (notC, C); and (Y2, notA, B , notC); or (F, Y1, Y2); endmodule
I.Arwa Al-Issa
![Page 46: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/46.jpg)
I.Arwa Al-Issa
![Page 47: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/47.jpg)
I.Arwa Al-Issa
![Page 48: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/48.jpg)
I.Arwa Al-Issa
![Page 49: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/49.jpg)
I.Arwa Al-Issa
![Page 50: Prepared By Ins. Arwa Al-Issa · 2014. 4. 18. · To add a port, click the New button and type the name of a port. To change a port type, click the appropriate button in the Port](https://reader035.vdocument.in/reader035/viewer/2022081620/610204eccd14ce646a0b7ac5/html5/thumbnails/50.jpg)
Thanks
I.Arwa Al-Issa