Docsity

RTL Systems - Computer Science - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download RTL Systems - Computer Science - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

RTL Systems

Introduction

  1. DATA SUBSYSTEM (datapath) AND CONTROL SUBSYSTEM
  2. THE STATE OF DATA SUBSYSTEM:
    • CONTENTS OF A SET OF REGISTERS
  3. THE FUNCTION OF THE SYSTEM PERFORMED AS A SEQUENCE OF REGISTER TRANSFERS (in one or more clock cycles)
  4. A REGISTER TRANSFER:
    • A TRANSFORMATION PERFORMED ON A DATA WHILE THE DATA

Organization of Systems

• TWO FUNCTIONS:

  • DATA TRANSFORMATIONS : FUNCTIONAL UNITS (operators)
  • CONTROL OF DATA TRANSFORMATIONS AND THEIR SEQUENCING : CONTROL UNITS

• TYPES OF SYSTEMS WITH RESPECT TO

FUNCTIONAL UNITS:

  • NONSHARING SYSTEM
  • SHARING SYSTEM
  • UNIMODULE SYSTEM

CENTRALIZED CONTROL

SemiCENTRALIZED CONTROL

Structure of a RTL System

Analysis of a RTL system (cont)

Design of Data Subsystem

  1. Determine the operators (functional units)

-Two operations can be assigned to the same functional unit if they form part of diff erent groups

  1. Determine the registers required to store operands, results, and intermediate variables -Two variables can be assigned to the same register if they are active in disjoint time intervals

Data SubSystem

i) STORAGE MODULES

ii) FUNCTIONAL MODULES (operators)

iii) DATAPATHS (switches and wires)

iv) CONTROL POINTS

v) CONDITION POINTS

Storage Modules

  • INDIVIDUAL REGISTERS, with separate connections and controls;
  • ARRAYS OF REGISTERS, sharing connections and controls;
  • REGISTER FILE
  • RANDOM-ACCESS MEMORY (RAM)
  • COMBINATION OF INDIVIDUAL REGISTERS AND ARRAYS OF REGISTERS.

Entity Declaration of Register

File

ENTITY reg_file IS GENERIC(n: NATURAL:=16; -- word width p: NATURAL:= 8; -- register file size k: NATURAL:= 3); -- bits in address vector PORT (X : IN UNSIGNED(n-1 DOWNTO 0); -- input WA : IN UNSIGNED(k-1 DOWNTO 0); -- write address RAl : IN UNSIGNED(k-1 DOWNTO 0); -- read address (left) RAr : IN UNSIGNED(k-1 DOWNTO 0); -- read address (right) Zl,Zr: OUT UNSIGNED(n-1 DOWNTO 0); -- output (left,right) Wr : IN BIT; -- write control signal clk : IN BIT); -- clock END reg_file; Docsity.com

Behavioral Description of

Register File

ARCHITECTURE behavioral OF reg_file IS SUBTYPE WordT IS UNSIGNED(n-1 DOWNTO 0); TYPE StorageT IS ARRAY(0 TO p-1) OF WordT; SIGNAL RF: StorageT; -- reg. file contents BEGIN PROCESS (clk) -- state transition BEGIN IF (clk'EVENT AND clk = '1') AND (Wr = '1') THEN RF(CONV_INTEGER(WA)) <= X; -- write operation END IF; END PROCESS; PROCESS (RAl,RAr,RF) BEGIN -- output function Zl <= RF(CONV_INTEGER(RAl)); Zr <= RF(CONV_INTEGER(RAr)); END PROCESS; END behavioral;

Entity Declaration of RAM

ENTITY ram IS GENERIC(n: NATURAL:= 16; -- RAM word width p: NATURAL:=256; -- RAM size k: NATURAL:= 8); -- bits in address vector PORT (X : IN UNSIGNED(n-1 DOWNTO 0); -- input bit-vector A : IN UNSIGNED(k-1 DOWNTO 0); -- address bit-vector Z : OUT UNSIGNED(n-1 DOWNTO 0); -- output bit-vector Rd,Wr: IN BIT; -- control signals Clk : IN BIT); -- clock signal END ram;

RAM Description

ARCHITECTURE behavioral OF ram IS SUBTYPE WordT IS UNSIGNED(n-1 DOWNTO 0); TYPE StorageT IS ARRAY(0 TO p-1) OF WordT; SIGNAL Memory: StorageT; -- RAM state BEGIN PROCESS (Clk) -- state transition BEGIN IF (Clk'EVENT AND Clk = '1') AND (Wr = '1') THEN Memory(CONV_INTEGER(A)) <= X; -- write operation END IF; END PROCESS; PROCESS (Rd,Memory) -- output function BEGIN IF (Rd = '1') THEN -- read operation Z <= Memory(CONV_INTEGER(A)); END IF; END PROCESS; END behavioral;