Design a structural system verilog module


Assignment I:

Question 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.

Question 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.

Question 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.

Question 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.

Question 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.

Question 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.

Question 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.

Question 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.

Question 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 behavioral 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 II:

Question 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

Question 2:  Single cycle implementation

A) 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

Question 3: Pipelined design

A) 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 addressing 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

Avail round the clock Structural System Verilog Module Assignment Help service to score A++ at affordable rates.

Tags: Structural System Verilog Module Assignment Help, Structural System Verilog Module Homework Help, Structural System Verilog Module Coursework, Structural System Verilog Module Solved Assignments, Pipelined Design Assignment Help, Pipelined Design Homework Help, Single Cycle Implementation Assignment Help, Single Cycle Implementation Homework Help

Attachment:- Verilog Module.rar

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: Design a structural system verilog module
Reference No:- TGS03027177

Expected delivery within 24 Hours