tutorial11_4 - Elec 151 Tutorial#11 Lab 5_3 Counter design...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Elec Elec Elec 151 Tutorial #11 151 Tutorial #11 Outline : • Lab 5_3: Counter design using OrCAD PLD Tools with VHDL design entry - Example - OrCAD demo • Midterm Exam #2 2 Lab 5_3: Counter design using OrCAD PLD Tools with VHDL design entry Design of a 2-Digit Decade Counter Counts 00 to 59 (00, 01, 02, 03, 04, …58, 59) and repeats (when up=1). Counts 59 to 00 (59, 58, 57, 56, 54, …01, 00) and repeats (when up=0). Also has synchronous reset and load. In Lab VHDL design and simulation for PLD implementation using GAL22V10. Show the “VHDL file”, the “post-simulation waveforms” and the “3 files generated by ORCAD” free of errors (There may be warning !!) to the TA. Bonus Part (You need to finish your demo with in 1.5 hours) - Program the circuit into a GAL22V10 and test it. It’s the VHDL version of lab 4-2! 3 Example Design of a 2-Digit Decade Counter Design a 2-decade counter that counts in the following way: For UP=1 : high digit counts 0 -> 5 , low digit counts 0->9 and repeats For UP=0 : high digit counts 5 -> 0 , low digit counts 9 ->0 and repeats •The counter also has synchronous reset and load . e.g 1 : If I reset and then start counting up , the sequence will be: 0 0 , 1 1 , 2 2 , 3 3 , 4 4 , 5 5 , 0 6 , 1 7 , 2 8 , 3 9 , 4 0 , 5 1 , 0 2 , 1 3 , 2 4 , etc. (HD=High digit , LD=Low digit ) e.g 2 : If I load DATA_IN = 4 6 and then start counting up , the sequence will be: 4 6, 5 7, 0 8, 1 9, 2 0, 3 1, 4 2, 5 3, 0 4, 1 5,... 4 … Example Design of a 2-Digit Decade Counter library ieee; use ieee.std_logic_1164. all ; use ieee.numeric_std. all; entity DEC_COUNT_UP is port (RST,UP,CLK,LOAD: in std_logic; COUNT_LD,COUNT_HD: out std_logic_vector(3 downto 0); DATA_IN_LD,DATA_IN_HD: in std_logic_vector(3 downto 0)); end; architecture BEHAVIOR of DEC_COUNT_UP is signal CNT_LD, CNT_HD: unsigned(3 downto 0); -- don't use "std_logic_vector" type above because we need to do -- addition and substration operations below. So, use "unsigned type" ATTRIBUTE PLDTYPE:string;
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern