ELEC4720 Programmable Logic Design Assignment

Assignment Help Other Engineering
Reference no: EM132419525

ELEC4720 - Programmable Logic Design - University of Newcastle

ASSIGNMENT 1

PROBLEMS

Problem 1. Design a structural System Verilog module for a 7 segment display decoder with a four-bit input C, and a seven bit output Y , which can be used to display the character associated with the hexadecimal code represented by C on a 7-segment display on the development board. Instantiate your seven segment decoder module on the development board, and connect it with the switches and the seven segment displays to verify its functionality. To design the structural module you are required to carry out Boolean simplification, e.g., by using Karnaugh maps.

Problem 2. Write a system verilog module to multiply two 4 bit wide numbers to produce a 7 bit wide result of multiplication. Create a test circuit on the development board to demonstrate the multiplier module is working properly.

Problem 3. Write that system verilog module to multiply two 8 bit wide numbers to produce the 15 bit wide result of multiplication. Design an appropriate testbench to test your multiplier module, and run the testbench in Modelsim to verify that the multiplier module produces correct results.

Problem 4. In this assignment you will design the ‘logic unit' of the MIPS processor. This unit has one control unit F and two data inputs A and B. F is 2 bit wide. Each of A and B are 2n bit wide, where n is an integer. Typically n > 2, but that is not important for this assignment. The output Y is also 2n bit wide. The relation between the inputs and outputs is given in Table4.

Table 1: Truth table for the MIPS compatible logic unit.

(a) Design an appropriate parameterized ( n is the flexible parameter) system verilog module to implement the logic unit.

(b) Design an appropriate top-level module to test the circuit on the development board.

Problem 5. Use the ‘+' operator in System Verilog to implement a parameterized 2n bit adder so that we can freely vary n during instantiation.

Next you will use the above adder module to build a circuit that will either add or subtract depending on a control input s. Apart from the control input this circuit has two data inputs A and B, and an output Y . Each of A, B, and Y are 2n bit wide. The functional specification of this circuit is given in Table5. You are required to provide a System Verilog implementation of a circuit implementing the

Table 2: Truth table for the add-and-subtract circuit.


above specification by using the adder (mentioned above) and a 2:1 multiplexer. Your design should not use more than one adders. This should be a parameterized module that allows us to choose n during instantiation.

(a) Design an appropriate system verilog module to implement the logic unit.
(b) Design an appropriate top-level module to test the circuit on the development board.

Problem 6. In this assignment you will design the top level instruction classifier, which is central to the instruction decoder in a MIPS processor. A MIPS instruction has a 6 bit "Opcode" input which determines what it is supposed to do. This module has 7 single-bit outputs R, B1, J, B2, I, F, M . Table3, which is an extract from the MIPS instruction set gives a summary of MIPS opcodes.
The instruction classifier takes the opcode as input and asserts only one of the 7 output lines R, B1, J, B2, I, F and M as shown in Table 3

• Design the instruction classifier as per Table3.

• Design an appropriate main module to test the circuit on the development board.
Note that the instruction classifier circuit can be used to simplify the instruction decoder, where the outputs of the instruction classifier are used to ‘activate' various submodules in the processor as necessary.

Problem 7. In this assignment you will design a shifter unit which can be used readily in a MIPS processor. In particular, we focus on the shift instructions among MIPS R-type instructions. Each machine instruction in a MIPS processor has as a 6 bit field called "Funct" (denoted briefly by F here).

(a) Design a MIPS compatible shifter that has three inputs. The first input A is shifted by an amount given by the other data input Sh. The third input F1:0 is the control input. This control input determines the relation between the input operands A and Sh, and the output Y as per Table4.

Note that if Sh is n bits wide then A and Y are 2n bits wide. You can take n = 4 in this assignment. However, with very little extra effort you can produce a parameterized module that can handle any n.

For this assignment you are free to choose any shifter implementation including the behavioural ones using System Verilog <<, >>,
>>> operators. With >>> you must use $signed directive, e.g.

assign a = $signed(b) >>> 3;

(b) Now you will use the module designed in the previous part to design a hardware that readily supports MIPS R-type shift instructions. The there data inputs to this hardware are denoted as b, a and c. For a 2n bit processor b, a and the output y are 2n bit wide. On the other hand c is n bit wide. The relation between the inputs and the output is controlled by the control input F2:0 as tabulated in Table5, where it is assumed that n = 4.
Hint: Identify the role of F [2] and find out how you could use a 2:1 MUX along with the module designed in Part a) to implement a circuit that satisfies the requirements in Table5.

(c) Design an appropriate main module to test the circuit on development board.

Problem 8. In this assignment you will design a multiply-divide hardware which can be used readily in a MIPS processor. In particular,

we focus on the MIPS R-type instructions. Each machine instruction in a MIPS processor has a 6 bit field called "Funct" (denoted briefly by F here).

An n bit MIPS compatible multiply-divide hardware can be seen as a simple state machine, which has two internal states [hi] and [lo], each n bit wide. When write-enabled, these state elements are updated at the leading edge of an input clock signal clk. In addition it has got two n bit data inputs a and b and an n bit output y. The next state and the output logic is controlled via F3:0 as described in Table 6, where ‘x' stands for a don't care condition, [lo]next denotes the content of the lo register after the next positive clock edge, and [hi]next denotes the content of the hi register after the next positive clock edge.

Table 6: Subset of MIPS R-type instruction set involving multiply-divide operations. Here ‘x' stands for don't care conditions, [lo]next denotes the content of the lo register after the next positive clock edge, and [hi]next denotes the content of the hi register after the next positive clock edge.

Design a multiply-divide hardware as per Table6. A simple way to implement this is given in Figure1. You need to find how to derive the controls signals s0, s1, s2 etc from F .

The multiplier and divider can be easily implemented in verilog via the high level operators *, / and .
• Create an appropriate top level module to test the multiply-divide circuit on development board.

Problem 9. In this assignment you will design an arithmetic logic unit (ALU) which can be used readily in a MIPS processor. In particular, we focus on the arithmetic logic instructions among MIPS R-type instructions. Each machine instruction in a MIPS processor has a 6 bit field called "Funct" (denoted briefly by F here).

A MIPS compatible ALU takes F3:0 as a control input. This control input determines the relation between the data inputs A and B, and the output Y as per Table7, which is a part of the set of MIPS R-type instructions.

A step by step design process is described in the lecture slides. Note that the ALU hardware includes an adder. For this assignment you are free to choose any adder implementation including the behavioural one using System Verilog + operator.

Design an n bit wide parameterized ALU module as per Table7. The ALU should have two additional outputs Cout and OV to flag the carry out and arithmetic overflow in arithmetic operations.

Create an appropriate top level module to test the ALU circuit on development board.

ASSIGNMENT 2

Part 2.1

1. Design the instruction set architecture of a single cycle processor with 18 bit wide instructions, and data-word width of your choice. In your report show the hardware implementation details of the processor. In particular, provide the
• Instruction set along with the binary codes
• Instruction encoding/decoding logic
• Discuss various tradeoffs made in your design to optimize the following:
- Instruction coverage
- Dataword width,
- Number of registers,
- Memory adressing scheme (byte or word addressable, base/offset based addressing)
- Memory address and offset range

- Jump offset range
- Branch offset range
• Show the data path needed to implement your design
• Discuss the control signals and their logic

Part 2.2 - Single cycle implementation

1. Design and implement a single cycle processor with 18 bit wide instructions, and data-word width of your choice. In addition, test your processor on DE2 board using one or more appropriate test programs. Together these programs should be rich enough in the sense that

it should include the common programming language constructs like standard arith- metic, logic, and shift oprtations, conditional statements (if-then-else type), loops, etc.
it should be sufficient to demonstrate that all the main hardware components of your design is working properly

If your design for this Part is different from your design in Part 2.1, then please update your report with the
• Instruction set along with the binary codes
• Instruction encoding/decoding logic
• Discuss various tradeoffs made in your design to optimize the following:
- Instruction coverage
- Dataword width,
- Number of registers,
- Memory adressing scheme (byte or word addressable, base/offset based addressing)
- Memory address and offset range
- Jump offset range
- Branch offset range
• Show the data path needed to implement your design
• Discuss the control signals and their logic

Part 2.3 - Pipelined design

1. Design and implement a 5 stage pipelined processor with 18 bit wide instructions, and data- word width of your choice. In addition, test your processor on DE2 board using one or more appropriate test programs. Together these programs should be rich enough in the sense that
it should include the common programming language constructs like standard arith- metic, logic, and shift oprtations, conditional statements (if-then-else type), loops, etc.
it should be sufficient to demonstrate that all the main hardware components of your design is working properly
If your design for this part is different from your design in Part 2.2, then please update your report with the
• Instruction set along with the binary codes
• Instruction encoding/decoding logic
• Discuss various tradeoffs made in your design to optimize the following:
- Instruction coverage
- Dataword width,
- Number of registers,
- Memory adressing scheme (byte or word addressable, base/offset based addressing)
- Memory address and offset range
- Jump offset range
- Branch offset range
• Show the data path needed to implement your design
• Discuss the control signals and their logic

Attachment:- Programmable Logic Design.rar

Reference no: EM132419525

Questions Cloud

Hollywood history assignment : Hollywood history Assignment help and solutions:-agent power into consideration,I want you each to come up with aspects of this move toward agency content
Arab and muslim american culture : So early on in the course we experienced the important role music plays in cultures and the connections people have to their cultural music.
Identify how this drug is ingested when it is used illicitly : Identify how this drug is ingested when it is used illicitly, and the street names that the drug is known by.
Celebrity to endorse their products assignment : Celebrity to endorse their products Assignment help and solutions:-Why have you decided upon this celebrity?How does this celebrity align to the new target mkt
ELEC4720 Programmable Logic Design Assignment : ELEC4720 Programmable Logic Design Assignment Help and Solution, University of Newcastle - Assessment Writing Service - Design a structural System Verilog
Explain the fundamental impact that the court decision : Explain the fundamental impact that the court decision in question has had on American society in general and on ethics in American society in particular.
Enforcement administration schedule for methamphetamines : What is the Drug Enforcement Administration's (DEA's) schedule for methamphetamines, and what category drug is it, legally?
Case study-stopping outshopping assignment : Case study-Stopping Outshopping Assignment help and solutions:-Examine the potential lessons that the Stopping Outshoppingcase could teach health care executive
Protection maintenance in overall transportation security : How important is critical infrastructure protection maintenance in overall transportation security?

Reviews

Write a Review

Other Engineering Questions & Answers

  Develop a ventilation strategy to ensure safe working

ENGIN3502 - Subsurface Environmental Engineering - Federation University - Determine the main mine fan requirements to ventilate the mine using the fan as shown

  Torque ratio of a turbine as a function of the length ratio

Determine a relationship for the torque ratio of a turbine as a function of the length ratio assuming (1) the Froude law and (2) the Reynolds law applies. The model and prototype fluids are both water.

  Write procedures to manipulate queues

Write a procedure (make-queue) that produces independent first-in-first-out queue objects, using a message-passing style.

  What is the average time spent in the shop

Estimate the balking rate, that is, the number turned away per minute - Estimate the number turned away per minute who do not try again.

  Complete a clear and structured report of your investigation

Complete a clear and structured report of your investigation stating the important points that you recorded during your inspection

  Pattern-seeking animals

What are arguments for: "Humans are pattern-seeking animals and we are adept at finding patterns whether they exist or not not".

  What type of lens would be used to correct myopia

What is the time of oxygen travel down the length of the muscle due to convection - Why is there a large concentration of cones in the fovea?

  What is the maximum allowable payload for this flight

What is the maximum allowable payload for this flight and assuming the aircraft is loaded with maximum allowable payload, what is the takeoff CG (inches)?

  Design the panel with a load factor

Design the panel with a load factor of 2.5 and a resistance factor 0.4 on the first ply failure strength. Use the carpet plots for E-glass-polyester.

  Define cephalocaudal and proximal-distal motor development

Define both cephalocaudal and proximal-distal motor development. Share how an understanding of these concepts can influence a parent's and teacher's support of an infants' and toddlers' motor development.

  Develop a MATLAB program to calculate the reaction forces

1105ENG Numerical and Computing Skills - Problem Solving Assignment, Griffith University, Australia. Develop a MATLAB program to calculate the reaction forces

  Online optimization of battery energy storage system

Online Optimization of Battery Energy Storage System Using Particle Swarm Optimization for Islanded Microgrid - Logic Define for Buck and Boost Operation

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd