topic : programming model

7
TOPIC : Programming Model TOPIC : Programming Model UNIT 1: Modeling Digital Circuits Module 1 : Functional Modeling

Upload: tad-phillips

Post on 31-Dec-2015

23 views

Category:

Documents


0 download

DESCRIPTION

TOPIC : Programming Model. UNIT 1: Modeling Digital Circuits. Module 1 : Functional Modeling. Programming model. All the combinational elements in a circuit can be represented in a programming model. Any logic function is expressed in terms of basic logic operations namely NOT AND,NAND - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: TOPIC : Programming Model

TOPIC : Programming ModelTOPIC : Programming Model

UNIT 1: Modeling Digital Circuits

Module 1 : Functional Modeling

Page 2: TOPIC : Programming Model

Programming modelProgramming model

All the combinational elements in a circuit can be represented in a programming model.

Any logic function is expressed in terms of basic logic operations namely ◦ NOT◦ AND,NAND◦ OR,NOR◦ EXOR,EXNOR

Code based programs can be written for any digital circuit using the above operations.

Assembly coding is an example of programming model.

Page 3: TOPIC : Programming Model

Example of programming Example of programming modelmodel

LDA A //Load A in accumulator

XOR B // A xor BSTA E // Store A

xor B in EXOR C // A xor B

xor CSTA Sum // store it in SumLDA EAND CSTA FLDA AAND BSTA GLDA FOR GSTA Cout

E

G

F

Page 4: TOPIC : Programming Model

Register Transfer Register Transfer Language(RTL) ModelLanguage(RTL) Model

RTL- A kind of hardware description language (HDL) It is used in describing the registers of a computer

or digital electronic system, and the way in which data is transferred between them.

In computer, data words are stored in registers and memories are organized as arrays of registers.

For example : ◦ register A[0:7] // A is a 8 bit register◦ memory M[0:7;0:255] // A 256 array of 8 bit

register

RTLs provide models for systems at the register and instruction set levels.

Page 5: TOPIC : Programming Model

RTL modelRTL model In this we make HDL models of registered circuits

and how signals interact between them such as memories, flip flops, latches, shift registers, and so on.

RTL codes are fully synthesizable(can be realized in hardware), because they are written using basic HDL structures.

RTL models are characterized as functional, because they emphasize functional description while providing only summary about structural circuits.

Page 6: TOPIC : Programming Model

Example of RTL modelExample of RTL model

E = A XOR B

F = E AND Cin

G = A AND B

S = E XOR Cin

Cout = F OR G

Here A, B, Cin are input registers and Cout, S are the output registers. E, F, and G are intermediate registers

E

F

G

Page 7: TOPIC : Programming Model

RTL detailRTL detail Primitive operator : This describes the

processing and transfer of data. Example

C = A + B Conditional operator : Control of data

transformation.

For example : if (x) then c = A + B Case operator : This is used for multiway

decision. Example : signal{X[0:1]}

case 0 : C = A + B;

……….

case 3 : C = A – B;