



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Lecture notes for lectures 20 & 21 of csce 491 capstone computer engineering project, focusing on extending the universal asynchronous receiver-transmitter (uart) model for serial communications and memory modeling using flowhdl. Topics include adding parity, creating memory arrays, and simulating the connection between the host and peripheral sides.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




2003/10/
© 2003 Dr. James P. Davis
Some figures Tanenbaum, 4th^ ed. © 1999 Prentice Hall Publishers
9 We’re interested in the structure of memory, so that we can develop appropriate models for its functionality for use in our designs. We start with the basic structure of the memory array, then more to the architecture of the memory controller itself.
9 We will be using the memory array structure on both the Host and Peripheral sides of the serial communication model onto which we are adding functionality.
9 Basic structure of the serial communications protocol is: (1) transmit data from Host to receiver on Peripheral, (2) Count data words on Peripheral side, (3) responding with a periodic “sync ACK” control word transmitted back to Host. 9 Basic structure of a memory array – From the gate level, we have an array of D-FF cells, with appropriate select logic to control when FF elements in a given row are read from and written to, so as to implement the functions of Read and Write. We’ll create two for extending the UART model.
© 2002 Dr. James P. Davis Page 3
UART Model Design Enhancements- UART Model Design Enhancements-1 1
z Add parity set (Transmitter) and parity check
(Receiver).
Use a sub-flowdiagram (created on a separate sheet when you place one of these objects onto the canvas). Generate the parity bit by creating the logic in the sub-flow ASM model. You will be able to use this model for both setting the parity bit (Transmitter) and testing it against an existing bit value (Receiver). Once you create this sub-flow object in the Transmitter thread, you will also be able to reference this sub-flow by (1) placing a sub-flow object on the canvas in the Receiver thread, (2) selecting the name of the “ParityGen” sub-flow from a list box.
UART Model Design Enhancements- UART Model Design Enhancements-2 2
z Copy/paste the Controller, Receiver and Transmitter
ASM models (without the thread boundary) onto new sheets. 9 These will be the "mirror" UART on the peripheral side. 9 You'll need to add buses as appropriate, and rename some (because the control and data buses on remote side of the serial connection will be different). 9 For internal buses that hold data, simply create them with a “_2” in their name, e.g., ACC_2 for the word to transmit on the peripheral side. 9 Make sure the Host and Peripheral transmit and receive lines connect up properly (Host transmitter to Peripheral receiver, and Peripheral transmitter to Host receiver). 9 You'll simulate the connection between the two sides, so think about 2 test cases that test the “loop back” test between both ends of the serial connection: (1) transmit from Host to Peripheral receiver, (2) Transmit from Peripheral’s transmitter to Host’s receiver). You’ll make these connect up so that you don’t have to continually toggle bits in the Bus Table.
© 2002 Dr. James P. Davis Page 7
S erialCom m unicationS y stem
H_UA RT_Ctlr (fro m Use Ca se V i e w)
U_Transm itter (fro m Use Ca se V i e w) U_Receiver (fro m Use Ca se V i e w)
P _C tlr (fro m Use Ca se V i e w) P _Rec eiver (fro m Use Ca se V ie w )
P _Transm itter (fro m Use Ca se V i e w)
M em _B uffer B uf_ID B ufRdP tr H_UA RT B ufW rP tr
HostSy stem
11
1..1..
Xm it_B uf
CP U (from Use C a se V i e w)
11 0..0..
Host Interface
Recv_B uf
Rem oteS ys tem
1..1..
11 0 ..0 ..
Com m unic atesW ith
P _UA RT
1..1..
0..0.. 0..0..
Handshak esW ith (^) P eripheral
1..1..
1..1.. 11
Pe ri ph_I ntrface
P _Rec v_B uf
Re a d M e m W o rd In to Re g i ste r
Up d a te M e m Re a d P tr
Re a d Da ta Re g In to M e m
Up d a te M e m W ri te P tr
S e n d W o rd
S e t_ A CK _ W o rd
Re ce i ve W o rd
E n a b l e X m i t
H_ T ra n sm i tte r S e tPa ri ty^ P _ T ra n sm i tte r
Co n ca te n a te S ta rtS to p B i ts
Ch e ckP a ri ty
S trip S tar tS top B i ts
Se tP ar i tyEr ror
Co u n t_ A CK _ W o rd s
H_ UAR T _C tlr
E n a b l e UA RT
P _ Ctl r
Co u n tM e m W o rd sW ri tte n
Co u n tDa ta W o rd sRe a d
Re a d & Ch e ck_ A CK _ W o rd
H_ Re ce iv er
S i g n a l _ CP U_ Ne wW o rd
CP U
P _ Re ce i ve r
S i g na l _ Pe ri p h _Ne wW o r d
P e ri p h
This is an inventory of core partitioned system functions.
This will form the basis for defining test cases.
Each UML “actor” is Modeled using a thread.
© 2002 Dr. James P. Davis Page 9
The Gate- The Gate-level Structure of a Memory Arraylevel Structure of a Memory Array
Memory Structure and Organization Memory Structure and Organization
9 Memory arrays allow multi-bit values to be stored and retrieved by address. 9 A memory of n bits can be organized in different ways. 9 Memory array as a word length : the number of bits of each word stored in memory (e.g., 32 bits). 9 Memory array has number of words (e.g., 128MB). 9 Each memory location is uniquely addressable (called content addressable memory ).
Source: Tanenbaum, 4th^ ed. © 1999, Prentice-Hall
Memory Use ExampleMemory Use Example –– Memory TableMemory Table
OMemory creation consists of several steps: O(1) Create a RAM array in the Memory Table (with Addr. Width, Data Width and Type). O(2) Edit values in the array using the Matrix Table. O(3) Reference the memory locations using an index.