Starting from:

$30

CS207-Assignment 1 Digital and Design Theory Solved

PART 1: DIGITAL design THEORY 
Provide answers to the following questions: 

1.      List the octal and hexadecimal numbers from 12 to 28. Using A, B, C and D for the last four digits, list the numbers from 12 to 28 in base 14.

2.      What is the largest signed and unsigned binary number that can be expressed with 14 bits? What are the equivalent decimal and hexadecimal numbers?

3.      Convert the decimal number 240 to binary in two ways: (a) convert directly to binary; (b) convert first to hexadecimal and then from hexadecimal to binary. Which method is faster?

4.      Describe the three basic types of logic calculation (write the truth table).

5.      Give the 1s’ and 2s’ complement code of the following decimal numbers, the answer should be 32 bit-width in hexadecimal notation.

a.      14274836

b.      -27854048

PART 2: DIGITAL design lab
Introduction
In this lab, you are required to use Vivado 2017.4 and Minisys Practice platform (xilinx FPGA chip artix 7 inside) to design a simple logic circuit: Do the addition on two unsigned 2bit numbers, do the simulation and verify its function on the board. You should submit the description of the operation steps, the Verilog design, the wave form from the simulation, and the on board testing steps and results.

Preamble
Before working on the coursework itself, you should master the following material. A separate tutorial document (on the Sakai site) has be provided to you which includes: 

l   Vivado: The Vivado software provides a complete design environment for system-on-a-programmable-chip (SOPC) design. Regardless of whether you use a personal computer or a Linux workstation, Vivado ensures easy design entry, fast processing, and straightforward device programming.

l   Minisys Practice platform: a platform designed for Digital design ,Principles of Computer Organization and many other courses. This platform include FPGA chip ,storage chip and lots of Dial switches, LEDs for input and output.

l   Verilog : standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits. http://www.verilog.com/

Exercise specification
TASK1: 

Create a project named as Lab2_Addition, design the source code to get the addition of two input numbers: one is 2bit and another is 1bit. do the simulation and generate the bitstream which is used to program the FPGA chip and verify your design.

 

Note: there should be two inputs (we need input two operands through dial switch) and three outputs (three led groups needed to demonstrate the value of two operands and the result)

module Lab2_Addition(addend, augend, addend_led, augend_led, sum_led);

input [1:0] addend;

input augend;

output [1:0]addend_led;

output augend_led;

output [2:0] sum_led;

……

endmodule

You will focus on how to use Vivado to do the design, simulation, generate the bitstream file which is used to program the FPGA chip (a part of the Minisys practice platform), you will also learn some basic concepts of Verilog. The steps you need to follow are:

1.     Create an empty project.

2.     Edit a design file (Verilog file) & add it to the project.

3.     Edit a simulation file (Verilog file) & add it to the project.

4.     Do the simulation using to verify if the function of design is ok. If not, modify your design and do the simulation again.

5.     Do the synthesize.

6.     Edit a constraints file (to define the Specifications of pins and the binding info between pins and the designed ports) & add it to the project.

7.     Do the implementation.

8.     Generate the bitstream file.

9.     Turn on the board (Minisys & FPGA chip inside) and connect Vivado to the board

10. Program the device with the bitstream

11. Test the design on the board (using dial switch as input, using led to see the state of output) 

 

TASK2: 

1) Do the design using data flow, block style and structured style respectively (While doing the design with structured style, It is optional to use primitive or encapsulated IP) to verify the following theorem (you can find the design on the lab3 and lab4 courseware as a reference): 

DeMorgan:  a) (x+y)’ = x’y’         b) (xy)’ = x’+y’

2) Create a test bench, do the simulation to verify the function of the design.

3) Edit a constraints file (to define the Specifications of pins and the binding info between pins and the designed ports) & add it to the project. 

4) Do the synthesis and implementation.

5) Generate bitstream file, program the device with the bitstream

6) Test the design on the board (using dial switch as input, using led to see the state of output). 

 

TIPS: 

1) Putting all the circuit ( (x+y)’ , x’y’ ,(xy)’ and x’+y’)  to one design file, and naming ports in different design file(corresponding to the different design style) with same name so that you can reuse the testbench file and constraint file with just a little modification (as in labs courseware, just modify the module name in your design file).

2) Naming the file:

a.      For data flow design, the source file should be demorgan_df.v 

b.      For block design, source file should be demorgan_bd.bd 

c.       For structured design, the source file should be demorgan_sd.v

3) All the 3 design could share the same test bench file because the number and name of ports are same while only name of module are different. If you want use test bench file of demorgan_df.v on demorgan_bd.bd ,just change the module name from demorgan_df to demorgan_bd is enough.

4) All the 3 design could also share the same constrain file because the number and name of ports are the same.

 

More products