lab1 report

Description

Digital Logic LaboratoryLab 1 – Introduction of Hardware Description Language (HDL)1. IntroductionThe purpose of this lab is to refresh your memories on HDL design using Verilog and becomefamiliar with the Xilinx Vivado Design Suite. Tutorials of using the Xilinx Vivado Design Suitecan be found in Canvas. In this lab, you will need to write a Verilog code and the correspondingtest bench to implement and simulate a simple Binary Coded Decimal (BCD) counter.2. DescriptionImplement a one-digit BCD counter. It should be a synchronous (4-bit) up/down decade counterwith a 4-bit output Q that works as follows: All state changes occur on the rising edge of the CLKinput, except the asynchronous clear (CLR). When CLR = 0, the counter is reset regardless of thevalues of the other inputs. You can select an appropriate number of your period (e.g. 10ns) of theCLK signal for simulating your design.Figure 1. BCD counter block diagram.The expected functional behavior of the BCD counter is described below: If the LOAD = ENABLE = 1, the data input D is loaded into the counter. If LOAD = 0 and ENABLE = UP = 1, the counter is incremented. If LOAD = 0, ENABLE = 1, and UP = 0, the counter is decremented. If ENABLE = 1 and UP = 1, the carry output (CO) = 1 when the counter’s value is 9. If ENABLE = 1 and UP = 0, the carry output (CO) = 1 when the counter’s value is 0.3. DeliverablesWrite a Verilog description of the counter. You may implement your design in any style you wish.It will be easier to use a behavioral description which can be either written in the algorithmic way2/2(e.g. Count <= Count + 1) or a state machine way (e.g. State <= Next_State). You may also usedataflow or structural descriptions, although that will be more work. Use the following simulationfor your waveforms:1. Load the counter with the last digit of your Red ID number.2. Increment the counter four times.3. Decrement the counter once.4. Clear the counter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top