Behavioral Description - HDL Design - Assignment, Exercises of Verilog and VHDL

The main points in these assignment of the HDL:Behavioral Description, Behavioral Means, Register, Nothing About Time, Loaded, Timing, Driving, Conflicts, Keeps Data, Edge

Typology: Exercises

2012/2013

Uploaded on 05/07/2013

anjaliy
anjaliy 🇮🇳

4.5

(17)

139 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Project Assignment #7
2) The task is to write a behavioral description of a set of 16 16-bit dual-ported registers for the
datapath that we discussed. Behavioral means that you will use a process statement. The signals
used to interface to the two busses are the register number to be accessed, a load signal which
tells the register when to latch the data, and a drive signal that tells the register when to place the
data on the bus. Note that the register set knows nothing about time, only the value of the control
signals. Also remember that the registers are dual ported and can be loaded from and/or drive the
busses simultaneously, i.e., for example you can be loading register 0 from the ABUS and at the
same time be driving the contents of register 4 onto the BBUS, or driving the contents of register
3 onto the ABUS and the contents of register 11 onto the BBUS. Timing for the load and drive
cycles are also shown. You can assume that the controller (not the registers) will insure no
conflicts take place, i.e., loading and driving the same register at the same time.
Operation is as follows:
• Loading a value into the register: Bus must be driven by another device which places data on
the bus at 10 ns and keeps data on the bus until 80 ns. The value on the bus is latched into the
named register on the rising edge of that bus’s load signal at 70ns. The processor’s controller
would insure the timing of the load signal. At this point the timing of the load signal is
controlled by the test bench.
Driving a value on the bus: When the drive signal goes low, place contents of named register
on the bus and continue driving the value on the bus until the drive signal goes high.
Reg 0
Reg 1
Reg 2
Reg 15
A BUS
BBUS
AregNo
Aload
Adrive
BregNo
Bload
Bdrive
Protocol for the Bus Control Signals
Docsity.com
pf2

Partial preview of the text

Download Behavioral Description - HDL Design - Assignment and more Exercises Verilog and VHDL in PDF only on Docsity!

Project Assignment #

  1. The task is to write a behavioral description of a set of 16 16-bit dual-ported registers for the datapath that we discussed. Behavioral means that you will use a process statement. The signals used to interface to the two busses are the register number to be accessed, a load signal which tells the register when to latch the data, and a drive signal that tells the register when to place the data on the bus. Note that the register set knows nothing about time , only the value of the control signals. Also remember that the registers are dual ported and can be loaded from and/or drive the busses simultaneously, i.e., for example you can be loading register 0 from the ABUS and at the same time be driving the contents of register 4 onto the BBUS, or driving the contents of register 3 onto the ABUS and the contents of register 11 onto the BBUS. Timing for the load and drive cycles are also shown. You can assume that the controller (not the registers) will insure no conflicts take place, i.e., loading and driving the same register at the same time.

Operation is as follows:

  • Loading a value into the register: Bus must be driven by another device which places data on the bus at 10 ns and keeps data on the bus until 80 ns. The value on the bus is latched into the named register on the rising edge of that bus’s load signal at 70ns. The processor’s controller would insure the timing of the load signal. At this point the timing of the load signal is controlled by the test bench.
  • Driving a value on the bus: When the drive signal goes low, place contents of named register on the bus and continue driving the value on the bus until the drive signal goes high.

Reg 0 Reg 1 Reg 2

Reg 15

A BUS

BBUS

AregNo Aload Adrive

BregNo Bload Bdrive

Protocol for the Bus Control Signals

Docsity.com

LOAD - Transfer Data from Bus to Register

load

DATA

Data latched on positive edge of load

Drive - Transfer contents of Register to Bus drive

DATA

  1. The file has a self checking testbench for testing your entity/architecture of the register set. You are to write a behavioral architecture for the register set using only the PROCESS statement and using a variable array to store the contents of the register set. Thus you will use a single process to model the dual ported registers.

Remember that the following BOOLEAN conditions check for: Level Sensitive: Signal Low IF (the_sig = ‘0’) THEN -- valid for BIT or STD_LOGIC Signal High IF (the_sig = ‘1’) THEN Signal Low IF (the_sig = ‘0’ OR the_sig = ‘L’) -- for STD_LOGIC Signal High IF (the_sig = ‘1’ OR the_sig = ‘H’)

Edge Sensitive Tests (for TYPE BIT or STD_LOGIC) High to Low IF (the_sig = ‘0’ AND the_sig’event) THEN Low to High IF (the_sig = ‘1’ AND the_sig’event) THEN

Edge Sensitive Test for STD_LOGIC that is complete High to Low IF ((the_sig’LAST_VALUE = ‘1’ OR the_sig’LAST_VALUE = ‘H’) AND (the_sig = ‘0’ OR the_sig = ‘l’) AND the_sig’EVENT) THEN Low to High IF ((the_sig’LAST_VALUE = ‘0’ OR the_sig’LAST_VALUE = ‘L’) AND (the_sig = ‘1’ OR the_sig = ‘H’) AND the_sig’EVENT) THEN

  1. Turn in:
  • a copy of your VHDL code
  • results of simulation using zoom->full_size. YOU NEED TO RUN FOR 32 us.
  • a list of simulation results There are .do files for this step, ps7_list.do and ps7_wave.do.

Docsity.com