10... · 2019-11-04 · lecture 10 slide 7 part 1 — wean you from using schematics ex 1 - create...

12
! "

Upload: others

Post on 17-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

� �

�������������������������������������������� ��������������������������������������������������������� ������������������������������������������������������������������������������������������������������������������������ ����� ��������� ������������������������������������� ��������������������������������������������������� �������� ���!������� ����������"

Page 2: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

����������������� ��� �������������������� ���������������������������������"������������������������������������������������������������������� ���������������������������($���������������������������������"����������������������������� ����� ��������������������������������������������������������"�������� ���������� �������!����!##���"��"�"�"��#������#�������#�'%����������#

�!'�����'%�� '�$&'%�58�1� !) ��%� '�$&'%��$���2�%&� ��$�����&�! �� ����� '�$&'%�56�1� !) ��%� '�$&'%���2�����'%��(�$%�! �56��!�%� !&�%'""!$&��+��! ������������"%.����$��!��� ��&��&�+!'��$��&����%�!$&�'&�! �+!'$���%�&!"��!$��! (� �� ��.� ���+!'�%&�$&��� '�$&'%�%!�&)�$�,�+!'�)�����(� &'���+�%����� +�)� �!)�"� �%��""��$� ��� �&��� '�$&'%�)� �!)-� ������ ���0 �!'�%�!'���'%��&��%�&!����&�����+!'$�%!'$�������%.���������&!$��%���%��,��'&��&��%�%+ &�*�%� %�&�(�,�%!��&�)������������&���$��!����+)!$�%��!$�+!'$.����������� ���0 ���%��%�)��$��+!'��� ������&����$$!$�� ��)�$ � ����%%���%.�������������� ���0 ���%�%�!)%�&������$�$��+�!��+!'$���%�� �� ��"$!(���%���#'����)�+�!���*"�!$� ��(�$�!'%���$��!������%.��������� ���0 ���%�&���%�+!'�&���%&�"%�&��&�&��� '�$&'%�%!�&)�$���%�&��� ��� �!$��$�&!�"$!�'���&����� �����%�� .���������� ���0 ���%�"$!(���%���#'����%'���$+�!��&���$�%!'$��%���� ��'%����+�+!'$���%�� �0 '%��'��&!��������!$�!(�$�����$$!$%.��������� ���0 ���%��%�)��$��+!'��� ��!'&���&���%�!��&����!�"���&�! �$�%'�&%�%'����%�&��� ��� ��"� ����!��&�! %.�����������0 ���%����!)%�+!'�&!�"����'"��!�'��%�� �&����!�"! � &����$�$+�"$!(������+���&�$�,�%'����%���,��'�&�"���$,�������&�.

�!'��'%&���%!������%'$��&��&�+!'���(��%"��������&����*��&��������(����'%���! �&�����5/�!���!�$�.��&��%�7����7�65�8�� ���&��%�%"��������'%� ����������������������������

Page 3: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

�!���+"'���(����!�%�����$��&�!��+"'$���%��!�&�$"'�����$�)�$���" #���&�"!,�)��!����&"�%�!��&�����&0%&$�� �&"�&������#�(���&������������-������ �&�"��"��#$"�$� �!���%�%#���������!��$�)�$����&'#,��!��)��%#����+���70�"��4���5- �*&�)��'%��.�'&"���&��&/�&"���!��"'&�)��&���������#��%��"!!��&��,��!��%#����+�&��&�)���*#��&�&"���!��&���8�����8����#��� ��+-�����%��%�"!��"�� �!+������$�!&�(�$��!&%�"���+��"!��������%-���������%��������$�!&�#$"&"�"���!�#$"�$� �!��&�����(���-����!,�)����(��&"�����&��&���#�$&�"��&������#�&��&�)���$��!"&�'%�!��1 &��%�&�������#�$&,��!")!��%�������-����+"'�)�$��&"�'%��&�������#$"��%%"$�2�-�-��"���!���&�)�&����!'*3,�)��)"'���!����&��%���!���!-��&�$�&��&,�+"'� '%&�%����&�&���.%"�/ �����&"�%�!��&������#-��

�������� ���������� ����� ��������������������� ���������� ����������

Page 4: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

� �

��������� ������������ ��������������� ������������������������������� �������������������������������������������������������������������������� ������� ������������������� ���� ������������������ �����

Page 5: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

�����)�������������������������������������#������������������������������������������������������+$���� ������#�����������!"�!�������������������������� ����������������� ����� ��������!�����!���������� �����������������������������������$����#������������������������������������������ ������!���� �� ���#�� ��!��������� ���������+$���� ����������(*$�������������������������������#��������������� ����������������������!��������������!��������������(����������!����� ������������������ �������������������������!�#�� �"�!���������������������� ���������� �����������������% !������!�����+++++��������������#��������������������������� �� ����������������������"���� ������������� ����������������� ����� �� ���� ���� ������!�������� ���#�������������!���������������!����������� ����������� �������#����!�������� ���������������������������������������������������(#

��

������� ���� ��������������������������� ������������������������������� ������������������

Page 6: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

��$&�6��!����$&�7�"������'%��&����!��"�'��.����$��)�&����5-������.����$���"!&��!%��������!�������,��"&��54/��&%-����%��#$"�'����!��'��"�"'&#'&�"!�&���$���&����!!���"����6-8 �%"���&,��!��"!�����!!���"��&����!��"�'���!#'&��$" �&���"&��$�%"���&-

���$���%���%"����")/#�%%����&�$,�)�����$����(�%�������%��!����!��#$"�'��%��!��!��"�'��"'&#'&�"!�&������&����!!���"��&����'��"�%"���&-����8��"� �#"&�!&�" �&�$�#$"(���%������("�&����&"�&���"&��$����!!���"��&������-

����.����$���%�#�'������!&"�&���74/)�+�%"���&�"!�&�����5��"�$��0 &���%"���&��%�&���"!��&��&��%��'$&��%&��)�+��$" �&����"�$������-����)�$��&��&�+"'� �+�!"&���(������!���&���#�!%��"$$��&�+-����%�)����!"��� �����!+&��!�-����&���.���"�$���%��!%&�������"$$��&�+,�&������� �����)��������&�'#�)��!�&�����5��"�$���%�&'$!���� -

�����" '!���&�"!���&)��!�&������.�����!��&�����������#��%�&�$"'���%�$�����!&�$������!")!��%����1��$������$�#��$���!&�$����2-��")��*��&�+����)"$�%�)��������"(�$����!��!"&��$����&'$����&�$-

��

����'����������� ����!��������!� ���������������� ����������������$����������� ��#�������������������� �������& �$�"���������� �������$�"�����������������"�������������������$����������� "�!��������������������� �������������� � ���������!��������������������������������������������$

Page 7: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

���!")�&�����!"&��$��*� #���"����$���&�(���" #��*��" ��!�&�"!�����$�'�&���!��%����")�)����!�%#����+�"'$���%��!��!���$��"�������"����%�&"���%��!�����$�'�&�&��&��"!(�$&%��!�����&���!�$+�!' ��$��!&"�&�$���*����&���!�$+��"�������� ���(��'�%������������&�������$���%���)�����!")!����"$�&� ��������,�������������- ���"$�&� �&"��"�&��%��"!(�$%�"!�����"$��*� #�������)��&��������&���*����� ���!' ��$��.���������������.%����&���%�&)"���*�����&%����!����"!(�$&���&"���!�$+��"�������� ���� �����&����" �%������� �������&%��

��

�������������� ���������� ������������������������� ����� ������������������ ������������������������ ������� �������������$����������������������'�������� ���� ������������� �������������������$%&����$'������������������� ��������'������ ���� ���������������������������������������� ����������$%&�������� ���������������������� �������������������������� ������ �������!�

Page 8: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

�����!������������������"����� $������������ � ��������-������%� ����������������������� �������'�������������(��������������!��������������&���� �����������������#�����&�������������������� � ����� �����������%��������"������!����!������������������,&��"�!��%����"������������������%������,� ���������#��%�"����������!����&��������������������������������������*�������������,�',���������������� ������+(� ������"��������������&��

��

������������������������ ���������������������� �������������������$������� ������������������������������ ���"!������� ������������������������������� �����������������������������$�������� ���������#��������������������� ������� �%���������������������������������"������������������ ���

Page 9: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

!1�3'%#2���5*'�$#4+%�+&'#�+4�51�4*+(5�5*'�$+0#3:�06/$'3�.'(5��10'�$+5�#5�#�5+/'��+051�.1%#5+104�3'4'37'&�(13�5*'�����3'46.54����'5�64�5#-'�5*'�'9#/2.'�1(�5*'�$+0#3:�06/$'3��<*�����!*+4�+4�$'+0)�4*+(5'&�+051�#���$+5���&+)+5#.�����3'46.5�#4�4*180�#$17'����(5'3���4*+(5�12'3#5+104��5*'�5*3''�����&+)+54�%105#+0�3'42'%5+7'.:��*60&3'&5*�&+)+5��� <$��5'04�&+)+5��� <$�#0&�10'4�&+)+5��� <$��5*64�3'23'4'05+0)�5*'�����7#.6'�1(�� �!*'�-':�+&'#�$'*+0&�5*'�#.)13+5*/�%#0�$'�60&'34511&�#4�(1..18��4''�5*'�&+#)3#/�+0�5*'�4.+&'����#%*�5+/'�5*'�06/$'3�+4�4*+(5'&�.'(5��+5�+4�/6.5+2.+'&�$:���#4�+5�+4�4*+(5'&�51�5*'�����.1%#5+104���!*'�7#.6'4�+0�5*'�����&+)+54�#3'�5*'�4#/'�#4�#4�$+0#3:�+(�+54�7#.6'�+4���13�.18'3����18'7'3�+(�+5�+4��13�#$17'�+5�+4�015�%133'%5�$'%#64'�(13������5*+4�4*16.&�%#33:�17'3�51�5*'�0'95�&+)+5����%133'%5+10�/645�$'�/#&'�$:�#&&+0)���51�5*+4�&+)+5�7#.6'���!*'�'#4+'45�8#:�51�&1�5*+4�+4�51�&'5'%5�+(�5*'�7#.6'�+0�5*'�����&+)+5�.1%#5+104�#3'���13�#$17'����� ��5*'�4*+(5��+�'��"������(�+5�+4�;���5*'0�#&&���51�5*'�7#.6'��+�'��#&,645�$:����#(5'3�5*'�4*+(5���

��

��������!��"���� !������$�!��$����%���������!�!�� ����#��!����������$�����%�"���#��!��"���� !����!��!� ���!�����������$����� ��� %�����"��" !������!��������!� ����� �$�!��������!� ���!�!��!������!��!���� �����������%���!� ���" !�$��� �

�$�$���� �������!�����!������" !����"����$����� ����%�������� �!��������!�����

��� ��������������� ��������������������� �

������ �� !�$�%�!����������!� "��������"���� �!��" ��������������������� �� � �!�� ���!"!������������������������� ���!����

Page 10: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

������������ �������"�������!���������������������� ������������� ������ �����!�����!����������������������������������������������������������!�"���������������������"���������� ��� ���������������������������� ��������������������!���������������������������������������������������������� �����

��

�����%����""�(��#�� "��� �!����$���$����������������'��!" !���$��$���)�*#�� "'�"�����$����""�(� ����$�#��( %�'���������$� #����"����'�$��)�*��'������'�(#���&���$#���!%$���##�$����������'��������� ������ ������$��#��� �%��#������������������������� �� ��������� ��(�"����������������� �%��#��"��$� #��#��!������ "�����

Page 11: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

��!��� ���������!������������������!����������������������"�� �����!������!������%�!��� �����#�� ��������������������#����������!������"!����! �!�� ������� ����� ����!����"!�"!����! � ����� $�������� ���!���

��

�""$�����#��#�&����%����"�����������$���)��������* #����!��!��#������$"#���#��"�!� $�!����#������%�!#�!����������������#��������!������(�"����(�)������ * #���%�!��$"����$��"�#���#��!�

������#�!������#���"��!��"������������#���&�!��"#�#����#"�������'#��������"���"#��#��#�����������������$��"�������'#����������������"�#��&�!��#������$��"�#���#��!�������(�#�����"#�"#�#����#"��!��#��������#�$��#���"�����"��!���#������$��"�#��#����$#�$#���!#"�

Page 12: 10... · 2019-11-04 · Lecture 10 Slide 7 Part 1 — Wean you from using schematics Ex 1 - create 7 segment decode module in schematic Ex 2 — create 7 segment decode in Verilog

��

���������� �!#�/ �!#�20�!����(��!���"��%�!(#�����#���#��!+������������"�#��$"��#���� ���#���� �����#���!���-#����" ����� !���""����"("#���#��#� �!��!�������"��$��#���+���"#�!#�&�#�*�(�$�&������ �����#�����-�����������+����"��$"#�#�"#"��$#�#���"("#�������#���"����������$���� $#�"�� ��*�#�����$# $#��#�#��#�����! ����+����%�!#����""�#��!���!����#���"�#��#������#�����#�������!����+���&���������#����!����#���"����!�!�#���#��������!��!�#���' ������'��#�(�&��#,"��� �����+

������(*�#��� �!#�����$��"�"���#�����#��#���������������������$!�����"�""���*��$#����(�$��!��!����(����������������$!#��!��#��"���!�������������+

�!��������%�!(#�����(�$���%�����!����������*�(�$�������"������%�������!!$ #�!�."����#��#�#��#�����"�������"����"�" ����������&�(�#��#��"�$�!������)����*��$#��#��"�"#������� �(�$���!"#�������+