memory management (interrupt priority approach) report

23
MEMORY MANAGEMENT (INTERRUPT PRIORITY APPROACH) 2006-2007 PROJECT REPORT SUBMITTED TO THE FACULTY OF ELECTRONICS AND COMMUNICATION ENGINEERING NATIONAL INSTITUTE OF TECHNOLOGY, WARANGAL (A.P) (DEEMED UNIVERSITY) BACHELOR OF TECHNOLOGY IN ELECTRONICS AND COMMUNICATION ENGINEERING SUBMITTED BY AMIT KUMAR KARNA (04403) DEVENDER BUDHWAR (04411) DINESH KUMAR (04412) Under the Guidance of Mr. P. Murlidhar DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING NATIONAL INSTITUTE OF TECHNOLOGY (DEEMED UNIVERSITY) WARANGAL-506004(A.P) 1

Upload: amit-kumar-karna

Post on 15-Oct-2014

512 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Memory Management (Interrupt Priority approach) report

MEMORY MANAGEMENT (INTERRUPT PRIORITY APPROACH)

2006-2007

PROJECT REPORT

SUBMITTED TO THE FACULTY OF ELECTRONICS AND COMMUNICATION ENGINEERING

NATIONAL INSTITUTE OF TECHNOLOGY, WARANGAL (A.P)

(DEEMED UNIVERSITY)

BACHELOR OF TECHNOLOGY IN

ELECTRONICS AND COMMUNICATION ENGINEERING

SUBMITTED BY

AMIT KUMAR KARNA (04403) DEVENDER BUDHWAR (04411)

DINESH KUMAR (04412)

Under the Guidance of

Mr. P. Murlidhar

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

NATIONAL INSTITUTE OF TECHNOLOGY (DEEMED UNIVERSITY) WARANGAL-506004(A.P)

1

Page 2: Memory Management (Interrupt Priority approach) report

Acknowledgements

We would like to express our sincere thanks to our

faculty, P. Murlidhar, Department of Electronics and

Communication Engineering, National Institute of

Technology, Warangal for his constant encouragement,

splendid and gracious guidance throughout our work. He

has been a constant source of inspiration and helped us

in each stage. We express our deep gratitude to him for

such encouragement and kindly cooperation.

Amit Kumar Karna (4403) Devender Budhwar (4411)

Dinesh Kumar (4412)

2

Page 3: Memory Management (Interrupt Priority approach) report

CONTENTS

Abstract

Introduction

Priority Interrupt Algorithm

VHDL Implementation

The Memory Management Unit

Components

Synchronous RAM

Address and Data Bus Multiplexer

Conclusions

References

Page 4: Memory Management (Interrupt Priority approach) report

ABSTRACT

An MMU is a controller that allows a common resource memory to be shared by two or more processors depending on various input control signals. It provides the access to memory to one of the processor according to priority. Being an Interrupt service procedure, time of processor is managed efficiently. We have used the fixed priority algorithm. This approach allows a wide design exploration through automatic generation/selection of arbitration schemes.

INTRODUCTION

For our EDA-II project we developed a “Memory Management Controller” where we implemented the ‘priority interrupt’ algorithm.

An exclusion device is a controller that allows a common resource such as memory to be time shared by two or more processors depending on various input control signals. The purpose of this project was an implementation of one of the conventional algorithm for memory management control. We developed the algorithm, and implemented in VHDL language. The program was simulated using Altera Quartus-II. The net-list and .sof and .pof files have been obtained to dump the code onto FPGA. We chose this project because it is an ambitious project aimed to challenge us as well as provide a level of sophistication that would allow this project to be applicable not only as a semester project but to potentially be used in future projects.

1

Page 5: Memory Management (Interrupt Priority approach) report

Problem statement: Three processors are required to time share a Synchronous RAM of size 1024*16.The address bus is 10 bits wide and the data bus is 16 bits wide. There is a r/w signal which allows the processors to read data from the memory or write data into the memory. The controller is supposed to control access to the common memory depending on the request signals received by the three processors depending on the following algorithms. Overall Goal: Memory Management Control

Goal: Produce a successful realization of memory management controller.

Sub Goal 1: Develop individual components Sub Goal 2: Integrate the components to form a complete module Sub Goal 3: Implement on FPGA kit

We successfully reached sub goal 3 except that we did not demonstrate in hardware due to the limited time and limited number of accessible pins available on FPGA - EP1C6Q240C8 kit, we could not actually implement in hardware.

2

Page 6: Memory Management (Interrupt Priority approach) report

PRIORITY INTERRUPT ALGORITHM Each processor is assigned a priority and depending on the priority a CPU is given access. When a lower priority processor is active and the controller receives the request signal from a higher priority processor, the latter is given access until its job is finished after which the lower priority processor is given access. Nested interrupts should be allowed.

STATE DIAGRAM:

3

Page 7: Memory Management (Interrupt Priority approach) report

VHDL IMPLEMENTATION VHDL:

VHSIC Hardware Definition Language. Common language for designers. High level language. Simulation synthesis and analysis tools are available. Softwares: Quartus-II/Xlinix

DESIGN Unit Names

Entity Meaningful name describing the purpose of the circuit.

Architecture According to the modeling style used (i.e., Behavioral,

Procedural, Dataflow, or Structural) or to some specific architecture property.

Configuration Name of the corresponding entity with suffix "Cfg“.

Package Name of the design (i.e., top-level entity) with suffix

"Pkg“. Testbench (entity, architecture, package)

Name of corresponding entity with suffix "Tb“. Library (package)

Library name with suffix "Lib".

FPGA

Benefits of using FPGA Programmed by user at their site using programming hardware. Can implement tens of thousands of gates on logic on a single IC.

Can be programmed many times. Short development time. Low cost. FPGA kit in lab: EP1C6Q240C8

Hierarchy ‘n’ fpga occupancy

4

Page 8: Memory Management (Interrupt Priority approach) report

COMPONENTS:-

• Synchronous RAM • Address and Data Bus Multiplexer

FPGA Occupancy:-

Project navigator

5

Page 9: Memory Management (Interrupt Priority approach) report

State Diagram Simulation:

Conditions:

6

Page 10: Memory Management (Interrupt Priority approach) report

MEMORY MANAGEMENT UNIT:

PRIORITY INTERRUPT MMU:

Entity:

In this algorithm, A is having the highest priority among A, B and C. If B is having the access of the memory and A requests for the access, then the memory is allocated to A until A stops sending its request and is true in case of B and C also in which B is having a high priority…..!

RTL:

7

Page 11: Memory Management (Interrupt Priority approach) report

TECHNOLOGY VIEW:

addA[0]

addA[1]

addA[2]

addA[3]

addA[4]

addA[5]

addA[6]

addA[7]

addA[8]

addA[9]

addB[0]

addB[1]

addB[2]

addB[3]

addB[4]

addB[5]

addB[6]

addB[7]

addB[8]

addB[9]

addC [0]

addC [1]

addC [2]

addC [3]

addC [4]

addC [5]

addC

Flow Summary:

c lk

data_out_mux[0]~ 688

data_out_mux[1]~ 689

data_out_mux[2]~ 690

data_out_mux[3]~ 691

data_out_mux[4]~ 692

data_out_mux[5]~ 693

data_out_mux[6]~ 694

data_out_mux[7]~ 695

data_out_mux[8]~ 696

data_out_mux[9]~ 697

data_out_mux[10]~ 698

data_out_mux[11]~ 699

data_out_mux[12]~ 700

data_out_mux[13]~ 701

data_out_mux[14]~ 702

data_out_mux[15]~ 703

M ux0~ 131

M ux1~ 132

M ux2~ 132

M ux3~ 132

M ux4~ 132

M ux5~ 132

M ux6~ 132

M ux7~ 132

M ux8~ 132

M ux9~ 132

rw

q _b[0]

q _b[1]

[6] q _b[2]

q _b[3]

q _b[4]

q _b[5]

q _b[6]

q _b[7]

q _b[8]

q _b[9]

q _b[10]

q _b[11]

q _b[12]

q _b[13]

q _b[14]

q _b[15]

addC [7]

addC [8]

addC [9]

dataA[0]

dataA[1]

dataA[2]

dataA[3]

dataA[4]

dataA[5]

dataA[6]

dataA[7]

dataA[8]

dataA[9]

dataA[10]

dataA[11]

dataA[12]

dataA[13]

dataA[14]

dataA[15]

dataB[0]

dataB[1]

dataB[2]

dataB[3]

dataB[4]

dataB[5]

dataB[6]

dataB[7]

dataB[8]

dataB[9]

dataB[10]

dataB[11]

dataB[12]

dataB[13]

dataB[14]

dataB[15]

dataC [0]

dataC [1]

dataC [2]

dataC [3]

dataC [4]

dataC [5]

dataC [6]

dataC [7]

dataC [8]

dataC [9]

dataC [10]

dataC [11]

dataC [12]

dataC [13]

dataC [14]

dataC [15]

penableA

penableB

penableC

data_out_mux[0]~ 688

data_out_mux[1]~ 689

data_out_mux[2]~ 690

data_out_mux[3]~ 691

data_out_mux[4]~ 692

data_out_mux[5]~ 693

data_out_mux[6]~ 694

data_out_mux[7]~ 695

data_out_mux[8]~ 696

data_out_mux[9]~ 697

data_out_mux[10]~ 698

data_out_mux[11]~ 699

data_out_mux[12]~ 700

data_out_mux[13]~ 701

data_out_mux[14]~ 702

data_out_mux[15]~ 703

M ux0~ 131

M ux1~ 132

M ux2~ 132

M ux3~ 132

M ux4~ 132

M ux5~ 132

M ux6~ 132

M ux7~ 132

M ux8~ 132

M ux9~ 132

M ux10~ 139

M ux11~ 139

M ux12~ 139

M ux13~ 139

M ux14~ 139

M ux15~ 139

M ux16~ 139

M ux17~ 139

M ux18~ 139

M ux19~ 139

M ux20~ 139

M ux21~ 139

M ux22~ 139

M ux23~ 139

M ux24~ 139

M ux25~ 139

M ux26~ 180

! AC LR

C LK

D AT AA

D AT AB

D AT AC

D AT AD

R EG O U T

LC ELL (0100)

! AC LR

C LK

D AT AA

D AT AB

D AT AC

D AT AD

R EG O U T

LC ELL (F F F E)

! AC LR

C LK

D AT AA

D AT AC

R EG O U T

LC ELL (5050)

D AT AB

D AT ADC O M BO U T

LC ELL (0033)

D AT AA

D AT AC

D AT AD

C O M BO U T

LC ELL (AAF 0)

! AC LR

C LK

D AT AB

D AT AD

SYN C H _D AT A

C OM BO U T

R EG O U T

LC ELL (C F C 0)

D AT AA

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (F E00)

D AT AA

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (5455)

D AT AA

D AT AC

D AT AD

C O M BO U T

LC ELL (FF A5)

D AT AA

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (1044)

D AT AA

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (32F F )

D AT AA

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (0100)

D AT AA

D AT AC

D AT AD

C O M BO U T

LC ELL (FA0A)

D AT AA

D AT AB

D AT AD

C O M BO U T

LC ELL (5544)

D AT AB

D AT AC

D AT AD

C O M BO U T

LC ELL (0F 0C )

D AT AA

D AT AB

D AT AD

C O M BO U T

LC ELL (3322)

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

O U T PU T

D AT AIN

! OEPAD O U T

D AT AIN

! OEPAD O U T

O U T PU T

O U T PU T

m u l tip le x:m u l t

c u r r_ s ta te .s 4

c u r r_ s ta te .s 1

c u r r_ s ta te .s 3

p re s e n t~ 1 4

c o m b ~ 3 1 3

c u r r_ s ta te .s 2

c o m b ~ 3 1 5

c o m b ~ 3 1 6

c o m b ~ 3 1 7

c o m b ~ 3 1 8

c o m b ~ 3 1 9c o m b ~ 3 2 0

rw

p e n a b le B

p e n a b le C

p e n a b le A

p re s e n t[0 ]

p re s e n t[1 ]

p re s e n t[2 ]

d a ta _ w r_ o u t[0 ]

d a ta _ w r_ o u t[1 ]

d a ta _ w r_ o u t[3 ]

d a ta _ w r_ o u t[4 ]

d a ta _ w r_ o u t[5 ]

d a ta _ w r_ o u t[6 ]

d a ta _ w r_ o u t[7 ]

d a ta _ w r_ o u t[8 ]

d a ta _ w r_ o u t[9 ]

d a ta _ w r_ o u t[1 0 ]

d a ta _ w r_ o u t[1 1 ]

d a ta _ w r_ o u t[1 2 ]

d a ta _ w r_ o u t[1 3 ]

d a ta _ w r_ o u t[1 4 ]

d a ta _ w r_ o u t[1 5 ]

s ta r t

c lk

d a ta C [0 ]

d a ta B [0 ]

d a ta A [0 ]

a d d C [0 ]

a d d B [0 ]

a d d A[0 ]

a d d C [1 ]

a d d B [1 ]

a d d A[1 ]

a d d C [2 ]

a d d B [2 ]

a d d A[2 ]

a d d C [3 ]

a d d B [3 ]

a d d A[3 ]

a d d C [4 ]

a d d B [4 ]

a d d A[4 ]

a d d C [5 ]

a d d B [5 ]

a d d A[5 ]

a d d C [6 ]

a d d B [6 ]

a d d A[6 ]

a d d C [7 ]

a d d B [7 ]

a d d A[7 ]

a d d C [8 ]

a d d B [8 ]

a d d A[8 ]

a d d C [9 ]

a d d B [9 ]

a d d A[9 ]

d a ta C [1 ]

d a ta B [1 ]

d a ta A [1 ]

d a ta C [2 ]

d a ta B [2 ]

d a ta A [2 ]

d a ta C [3 ]

d a ta B [3 ]

d a ta A [3 ]

d a ta C [4 ]

d a ta B [4 ]

d a ta A [4 ]

d a ta C [5 ]

d a ta B [5 ]

d a ta A [5 ]

d a ta C [6 ]

d a ta B [6 ]

d a ta A [6 ]

d a ta C [7 ]

d a ta A [7 ]

d a ta C [8 ]

d a ta B [8 ]

d a ta A [8 ]

d a ta C [9 ]

d a ta B [9 ]

d a ta A [9 ]

d a ta C [1 0 ]

d a ta B [1 0 ]

d a ta A[1 0 ]

d a ta C [1 1 ]

d a ta B [1 1 ]

d a ta A[1 1 ]

d a ta C [1 2 ]

d a ta B [1 2 ]

d a ta A[1 2 ]

d a ta C [1 3 ]

d a ta B [1 3 ]

d a ta A[1 3 ]

d a ta C [1 4 ]

d a ta A[1 4 ]

d a ta C [1 5 ]

d a ta B [1 5 ]

d a ta A[1 5 ]

rw A

rw Brw C

re q C

re q Bre q A

re s e t

d a ta _ rd _ o u t[0 ]d a ta _ rd _ o u t[1 ]d a ta _ rd _ o u t[2 ]d a ta _ rd _ o u t[3 ]d a ta _ rd _ o u t[4 ]d a ta _ rd _ o u t[5 ]d a ta _ rd _ o u t[6 ]d a ta _ rd _ o u t[7 ]d a ta _ rd _ o u t[8 ]d a ta _ rd _ o u t[9 ]d a ta _ rd _ o u t[1 0 ]d a ta _ rd _ o u t[1 1 ]d a ta _ rd _ o u t[1 2 ]d a ta _ rd _ o u t[1 3 ]d a ta _ rd _ o u t[1 4 ]d a ta _ rd _ o u t[1 5 ]

p re s e n t[0 ]

p re s e n t[1 ]

p re s e n t[2 ]

d a ta _ w r_ o u t[0 ]

d a ta _ w r_ o u t[1 ]

d a ta _ w r_ o u t[2 ]

d a ta _ w r_ o u t[3 ]

d a ta _ w r_ o u t[4 ]

d a ta _ w r_ o u t[5 ]

d a ta _ w r_ o u t[6 ]

d a ta _ w r_ o u t[7 ]

d a ta _ w r_ o u t[8 ]

d a ta _ w r_ o u t[9 ]

d a ta _ w r_ o u t[1 0 ]

d a ta _ w r_ o u t[1 1 ]

d a ta _ w r_ o u t[1 2 ]

d a ta _ w r_ o u t[1 3 ]

d a ta _ w r_ o u t[1 4 ]

d a ta _ w r_ o u t[1 5 ]

m e m o ry:m e m

d a ta _ w r_ o u t[2 ]

d a ta B [1 4 ]

d a ta B [7 ]

8

Page 12: Memory Management (Interrupt Priority approach) report

Simulation results:

Fig. Simulation output of priority interrupt memory management controller

9

Page 13: Memory Management (Interrupt Priority approach) report

COMPONENTS of MMU

MEMORY:

Entity:

Here we have taken 1 kb (1024 bytes) depth of 16 bit vectors. The memory is accessed by only one processor at a time which is ensured by the multiplexer used...

RTL:

10

Page 14: Memory Management (Interrupt Priority approach) report

Technology view:

Flow Summary:

11

Page 15: Memory Management (Interrupt Priority approach) report

Simulation:

MUTLIPLEXER:

ENTITY:

The multiplexer selects the address bus and the data bus depending on the condition, i.e , among which of the processors ,A B or C are enabled and then it gives selects any one of the processor depending on the previous conditions and give it the excess to memory…At a time only one processors can get memory excess...

12

Page 16: Memory Management (Interrupt Priority approach) report

RTL:

Technology view:

13

Page 17: Memory Management (Interrupt Priority approach) report

Flow Summary:

Simulation:

14

Page 18: Memory Management (Interrupt Priority approach) report

VHDL CODE: VHDL code of Main Programme – PRIORITY INTERRUPT MEMORY MANAGEMENT <MAIN.VHD> library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity main is port( reqA,reqB,reqC:in std_logic; clk,reset:in std_logic; dataA,dataB,dataC:in std_logic_vector(15 downto 0); addA,addB,addC:in std_logic_vector(9 downto 0); data_rd_out:out std_logic_vector(15 downto 0); --out from memory present:out std_logic_vector(2 downto 0); data_wr_out:out std_logic_vector(15 downto 0); --out from mux rwA,rwB,rwC:in std_logic; start:in std_logic ); end main; architecture Behavioral of main is component counter is port(req:in std_logic; enable:in std_logic; finish:out std_logic; clk:in std_logic --cnt:out integer ); end component counter; component memory is port(r_w:in std_logic ; data_in:in std_logic_vector(15 downto 0); data_out:out std_logic_vector(15 downto 0); addr_bus:in std_logic_vector(9 downto 0); clk:in std_logic ); end component memory; component multiplex is port(s:in std_logic_vector(2 downto 0); data_busA:in std_logic_vector(15 downto 0); data_busB:in std_logic_vector(15 downto 0); data_busC:in std_logic_vector(15 downto 0);

15

Page 19: Memory Management (Interrupt Priority approach) report

addr_busA:in std_logic_vector(9 downto 0); addr_busB:in std_logic_vector(9 downto 0); addr_busC:in std_logic_vector(9 downto 0); data_out_mux:out std_logic_vector(15 downto 0); addr_out_mux:out std_logic_vector(9 downto 0)); end component multiplex; signal data_out:std_logic_vector(15 downto 0); signal add_out:std_logic_vector(9 downto 0); type states is (s0,s1,s2,s3,s4); signal next_state,curr_state:states; signal ackA,ackB,ackC,nenableA,nenableB,nenableC,penableA,penableB,penableC:std_logic :='0'; signal ll:std_logic_vector( 2 downto 0); signal rw,preqA,preqB,preqC:std_logic; begin --combine bits to form sel line for mux ll<=(penableA & penableB & penableC); mult:multiplex port map(ll,dataA,dataB,dataC,addA,addB,addC,data_out,add_out); -- data_out and add_out from mux is feed to memory -- data_rd_out is o/p from memory depending on rw signal mem:memory port map(rw,data_out,data_rd_out,add_out,clk); rr1: process(clk,reset) begin if reset='1' then curr_state <= s1; elsif( clk='1' and clk'event) then curr_state<=next_state; end if; end process rr1; control_path: process(curr_state,reqA,reqB,reqC) variable temp : std_logic_vector(2 downto 0); begin temp := (reqA & reqB & reqC); case curr_state is when s0 => present<="ZZZ"; if( start='1')then next_state<=s1; else next_state<=s0; end if; when s1 => present<="ZZZ";

16

Page 20: Memory Management (Interrupt Priority approach) report

if(temp(2)='1')then --reqA next_state<=s2; elsif(temp(1)='1')then --reqB next_state<=s3; elsif(temp(0)='1')then --reqC next_state<=s4; else next_state<=s1; end if; when s2 => present<="100"; if(( reqA='0')and temp(1)='1')then next_state<=s3; elsif(( reqA='0')and temp(0)='1')then next_state<=s4; elsif temp="000" then next_state<=s1; else next_state<=s2; end if; when s3 => present<="010"; if(reqA='1') then next_state <= s2; elsif((reqB='0')and temp(0)='1')then next_state<=s4; elsif temp="000" then next_state<=s1; else next_state<=s3; end if; when s4=> present<="001"; if(reqA='1') then next_state <= s2; elsif (reqB ='1' and reqA = '0') then next_state <= s3; elsif temp="000" then next_state<=s1; else next_state<=s4; end if; end case; end process control_path; data_path:process(curr_state,rwA,rwB,rwC,data_out) begin if(curr_state=s1)then penableA<='0'; penableB<='0'; penableC<='0'; elsif(curr_state=s2)then

17

Page 21: Memory Management (Interrupt Priority approach) report

penableA<='1'; penableB<='0'; penableC<='0'; rw<=rwA; elsif(curr_state=s3)then penableA<='0'; penableB<='1'; penableC<='0'; rw<=rwB; elsif(curr_state=s4)then penableA<='0'; penableB<='0'; penableC<='1'; rw<=rwC; end if; data_wr_out<=data_out; end process data_path; end Behavioral;

VHDL code of MEMORY: <MEMORY.VHD> library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity memory is port(r_w:in std_logic ; data_in:in std_logic_vector(15 downto 0); data_out:out std_logic_vector(15 downto 0); addr_bus:in std_logic_vector(9 downto 0); clk:in std_logic); end memory; architecture Behavioral of memory is type mem is array (2**10-1 downto 0) of std_logic_vector (15 downto 0); --signal ram_output:std_logic_vector(15 downto 0); signal RAM : mem:=(others=>(others=>'0')); begin p1: process(clk,r_w) begin if(clk'event and clk='1')then if(r_w='1') then --read from address data_out<=RAM(conv_integer(addr_bus)); elsif(r_w='0')then RAM(conv_integer(addr_bus))<=data_in; --write at given address

18

Page 22: Memory Management (Interrupt Priority approach) report

end if; end if; end process p1; end Behavioral;

VHDL CODE of MUNLTIPLEXER: <MULTIPLEX.VHD> library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity multiplex is port(s:in std_logic_vector(2 downto 0); data_busA:in std_logic_vector(15 downto 0); data_busB:in std_logic_vector(15 downto 0); data_busC:in std_logic_vector(15 downto 0); addr_busA:in std_logic_vector(9 downto 0); addr_busB:in std_logic_vector(9 downto 0); addr_busC:in std_logic_vector(9 downto 0); data_out_mux:out std_logic_vector(15 downto 0); addr_out_mux:out std_logic_vector(9 downto 0)); end multiplex; architecture Behavioral of multiplex is begin with s select data_out_mux <= data_busA when "100", data_busB when "010", data_busC when "001", (others=>'Z') when others; with s select addr_out_mux <= addr_busA when "100", addr_busB when "010", addr_busC when "001", (others=>'Z') when others; end Behavioral;

19

Page 23: Memory Management (Interrupt Priority approach) report

CONCLUSIONS

I. Memory can be simultaneously serviced to multi processes.

II. Being an Interrupt service procedure, time of processor is managed efficiently.

III. FPGA/VHDL combination is a very powerful design tool.

-- Versatile, Adaptable, Efficient, Economic IV. The given algorithm can be used to implement process

scheduling.

References 1. A VHDL Primer, 3rd edition : J. Bhasker 2. Computer Organization and Architecture: William Stallings

20