Docsity

KURM09 Processor Data Path - Digital Systems Design - Lab 3 | EECS 443, Lab Reports of Digital Systems Design

Toggle sidebar
bg1
EECS 443 – Digital Systems Design
Laboratory 3
Perry Alexander, [email protected]
Spring, 2009
The objective of this lab is to develop two major building
blocks for the KURM09 processor data path. You will de-
velop structural and behavioral models for a register file and
an ALU. You will use synthesis tools available in the labora-
tory to synthesize both your register file and ALU to FPGA.
Both of these components are critical to the implementation
of KURM09, thus successful completion of both the design
and synthesis will make the KURM09 implementation much
simpler.
Using components from the KURM09 synthesis library you
will develop a behavioral and a structural model of a single input,
dual output register file. The entity defined in figure 1defines a
template interface for your register file.
entity reg_file is
port (
A : in word; -- input data port
Add_A : in nybble; -- register select for input A
B, C : out word; -- output data ports
Add_B, Add_C : in nybble; -- register select for
-- outputs B and C
load : in std_logic; -- load enable signal
clear : in std_logic; -- asynchronous, negative logic
-- clear signal
clk : in std_logic); -- rising edge triggered clock
end entity reg_file;
Figure 1: Register file entity.
Signals A,Band Crepresent the single data input and dual data
outputs respectively. Add_A,Add_B, and Add_Cselect registers for
storing input Aand outputting to Band Crespectively. When the
load signal is asserted, a rising edge on clk causes the data input
on A to be stored in the register identified by Add_A. If the load
signal is not asserted, a rising edge has no effect. When the clear
signal is asserted, all register values should be set to 0except R1,
which always contains 1. Note that clear is asynchronous and is
negative logic.
Exercise 1Implement two architectures for the register file entity. The
pf3
pf4

Partial preview of the text

Download KURM09 Processor Data Path - Digital Systems Design - Lab 3 | EECS 443 and more Lab Reports Digital Systems Design in PDF only on Docsity!

EECS 443 – Digital Systems Design

Laboratory 3

Perry Alexander, [email protected]

Spring, 2009

The objective of this lab is to develop two major building

blocks for the KURM09 processor data path. You will de-

velop structural and behavioral models for a register file and

an ALU. You will use synthesis tools available in the labora-

tory to synthesize both your register file and ALU to FPGA.

Both of these components are critical to the implementation

of KURM09, thus successful completion of both the design

and synthesis will make the KURM09 implementation much

simpler.

Using components from the KURM09 synthesis library you

will develop a behavioral and a structural model of a single input,

dual output register file. The entity defined in figure 1 defines a

template interface for your register file.

entity reg_file is port ( A : in word; -- input data port Add_A : in nybble; -- register select for input A B, C : out word; -- output data ports Add_B, Add_C : in nybble; -- register select for -- outputs B and C load : in std_logic; -- load enable signal clear : in std_logic; -- asynchronous, negative logic -- clear signal clk : in std_logic); -- rising edge triggered clock end entity reg_file;

Figure 1 : Register file entity.

Signals A, B and C represent the single data input and dual data

outputs respectively. Add_A, Add_B, and Add_C select registers for

storing input A and outputting to B and C respectively. When the

load signal is asserted, a rising edge on clk causes the data input

on A to be stored in the register identified by Add_A. If the load

signal is not asserted, a rising edge has no effect. When the clear

signal is asserted, all register values should be set to 0 except R 1 ,

which always contains 1. Note that clear is asynchronous and is

negative logic.

Exercise 1 Implement two architectures for the register file entity. The

first should use behavioral techniques similar to those used in Project 2. Represent your registers as an array of words and use a process to update register contents and register file outputs. The second should Implement your design using structural techniques. Specifically, your architecture should include only instantiated entities and no behavioral code. You may use only devices defined in the KURM09 library to develop the structural register file.

Exercise 2 Implement a test bench for your register file to demonstrate correctness. Your test bench should include both a behavioral and struc- tural model for your register file. A process should drive the two models with the same inputs to show that they model the same system. The fol- lowing entity / architecture pair defined in figure 2 provides a template for your test system.

entity reg_file_test is end reg_file_test;

architecture mixed of reg_file_test is Define signals to drive and observe models begin -- mixed dut1: entity work.reg_file(beh) port map ( instantiate behavioral model ); dut2: entity work.reg_file(struct) port map ( instantiate structural model ); test: process begin -- process test Drive behavioral and structural models with the same input signals and compare outputs. end process test; end architecture mixed;

Figure 2 : Register file test bench.

Exercise 3 Using behavioral synthesis tools available in the laboratory, synthesize your register file to the Xilinx prototyping board. Using ChipScope, demonstrate your register file to your TA. Note that you may combine Problem 2 with Problem 4 and produce one demonstration involving both the register file and ALU.

Using components from the KURM09 synthesis library you will develop a structural and behavioral model of a combinational ALU to support the KURM09 instruction set. Your ALU should perform operations that support the mathematical and logical instructions as well as offset calculation for memory access and

the same inputs to show that they model the same system. Use a test harness similar to that given in Problem 1 to implement the test.

Exercise 6 Using behavioral synthesis tools available in the laboratory, synthesize your ALU to the Xilinx prototyping board. Using ChipScope, demonstrate your register file to your TA. Note that you may combine Problem 4 with Problem 2 and produce one demonstration involving both the register file and ALU.

Notes

  • The same signals can be used to drive both models in a test bench, i.e. both models can share input signals. However, different signals must be used to observe the outputs to avoid multiple driver errors.
  • Note the use of the types word and nybble that are defined in the memory utilities package. You must include a use clause prior to your entity definition to include these defini- tions.
  • This is your best opportunity to become familiar with the Xilinx synthesis tools and ChipScope before you synthesize your CPU. Take advantage of this time to become familiar with the tools and ask questions of your TA.