Preface |
|
xxv | |
Acknowledgments |
|
xxxi | |
|
PART I BASIC DIGITAL CIRCUITS DEVELOPMENT |
|
|
|
1 Gate-Level Combinational Circuit |
|
|
1 | (12) |
|
|
1 | (1) |
|
|
2 | (4) |
|
1.2.1 Basic lexical rules |
|
|
3 | (1) |
|
1.2.2 Library and package |
|
|
3 | (1) |
|
|
3 | (1) |
|
1.2.4 Data type and operators |
|
|
3 | (1) |
|
|
4 | (1) |
|
1.2.6 Code of a 2-bit comparator |
|
|
5 | (1) |
|
1.3 Structural description |
|
|
6 | (2) |
|
1.4 Top-level signal mapping |
|
|
8 | (1) |
|
|
9 | (2) |
|
|
11 | (1) |
|
1.7 Suggested experiments |
|
|
11 | (2) |
|
1.7.1 Code for gate-level greater-than circuit |
|
|
11 | (1) |
|
1.7.2 Code for gate-level binary decoder |
|
|
11 | (2) |
|
2 Overview of FPGA and EDA Software |
|
|
13 | (10) |
|
|
13 | (2) |
|
2.1.1 Overview of a general FPGA device |
|
|
13 | (1) |
|
2.1.2 Overview of the Xilinx Artix-7 devices |
|
|
14 | (1) |
|
2.2 Overview of the Digilent Nexys 4 DDR board |
|
|
15 | (1) |
|
|
16 | (2) |
|
2.4 Xilinx Vivado Design Suite |
|
|
18 | (1) |
|
|
18 | (1) |
|
2.6 Suggested experiments |
|
|
18 | (5) |
|
2.6.1 Gate-level greater-than circuit |
|
|
18 | (2) |
|
2.6.2 Gate-level binary decoder |
|
|
20 | (3) |
|
3 RT-Level Combinational Circuit |
|
|
23 | (38) |
|
|
23 | (6) |
|
3.1.1 Relational operators |
|
|
25 | (1) |
|
3.1.2 Arithmetic operators |
|
|
25 | (2) |
|
3.1.3 Other synthesis-related VHDL constructs |
|
|
27 | (1) |
|
|
28 | (1) |
|
3.2 Routing circuit with concurrent assignment statements |
|
|
29 | (5) |
|
3.2.1 Conditional signal assignment statement |
|
|
29 | (3) |
|
3.2.2 Selected signal assignment statement |
|
|
32 | (2) |
|
3.3 Modeling with a process |
|
|
34 | (2) |
|
|
34 | (1) |
|
3.3.2 Sequential signal assignment statement |
|
|
35 | (1) |
|
3.4 Routing circuit with if and case statements |
|
|
36 | (5) |
|
|
36 | (1) |
|
|
37 | (2) |
|
3.4.3 Comparison to concurrent statements |
|
|
39 | (1) |
|
|
40 | (1) |
|
3.5 Constants and generics |
|
|
41 | (3) |
|
|
41 | (2) |
|
|
43 | (1) |
|
|
44 | (2) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (12) |
|
3.7.1 Hexadecimal digit to seven-segment LED decoder |
|
|
46 | (4) |
|
3.7.2 Sign-magnitude adder |
|
|
50 | (3) |
|
|
53 | (1) |
|
3.7.4 Simplified floating-point adder |
|
|
54 | (4) |
|
|
58 | (1) |
|
3.9 Suggested experiments |
|
|
58 | (3) |
|
3.9.1 Multi-function barrel shifter |
|
|
58 | (1) |
|
3.9.2 Parameterized barrel shifter |
|
|
58 | (1) |
|
3.9.3 Dual-priority encoder |
|
|
59 | (1) |
|
|
59 | (1) |
|
3.9.5 Floating-point greater-than circuit |
|
|
59 | (1) |
|
3.9.6 Floating-point and signed integer conversion circuit |
|
|
59 | (1) |
|
3.9.7 Enhanced floating-point adder |
|
|
60 | (1) |
|
4 Regular Sequential Circuit |
|
|
61 | (32) |
|
|
61 | (3) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
4.1.4 Sequential circuit coding style |
|
|
63 | (1) |
|
4.2 HDL code of the FF and register |
|
|
64 | (4) |
|
|
64 | (3) |
|
|
67 | (1) |
|
4.3 Simple design examples |
|
|
68 | (4) |
|
|
68 | (1) |
|
4.3.2 Binary counter and variant |
|
|
69 | (3) |
|
4.4 Testbench for sequential circuits |
|
|
72 | (3) |
|
|
75 | (12) |
|
4.5.1 LED time-multiplexing circuit |
|
|
76 | (7) |
|
|
83 | (4) |
|
|
87 | (4) |
|
|
87 | (1) |
|
4.6.2 Maximum operating frequency |
|
|
88 | (1) |
|
|
89 | (1) |
|
4.6.4 GALS system and CDC |
|
|
90 | (1) |
|
|
91 | (1) |
|
4.8 Suggested experiments |
|
|
91 | (2) |
|
4.8.1 Programmable square wave generator |
|
|
91 | (1) |
|
|
91 | (1) |
|
4.8.3 Rotating square circuit |
|
|
91 | (1) |
|
|
92 | (1) |
|
4.8.5 Rotating LED banner circuit |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (20) |
|
|
93 | (4) |
|
5.1.1 Mealy and Moore outputs |
|
|
94 | (1) |
|
|
94 | (3) |
|
|
97 | (3) |
|
|
100 | (10) |
|
5.3.1 Rising-edge detector |
|
|
100 | (4) |
|
|
104 | (4) |
|
|
108 | (2) |
|
|
110 | (1) |
|
5.5 Suggested experiments |
|
|
110 | (3) |
|
|
110 | (1) |
|
5.5.2 Early detection debouncing circuit |
|
|
110 | (1) |
|
5.5.3 Parking lot occupancy counter |
|
|
110 | (3) |
|
|
113 | (32) |
|
|
113 | (6) |
|
6.1.1 Single RT operation |
|
|
114 | (1) |
|
|
114 | (2) |
|
6.1.3 Decision box with a register |
|
|
116 | (3) |
|
6.2 Code development of an FSMD |
|
|
119 | (6) |
|
6.2.1 Debouncing circuit based on RT methodology |
|
|
119 | (1) |
|
6.2.2 Code with explicit data path components |
|
|
119 | (3) |
|
6.2.3 Code with implicit data path components |
|
|
122 | (1) |
|
|
123 | (2) |
|
|
125 | (16) |
|
6.3.1 Fibonacci number circuit |
|
|
125 | (3) |
|
|
128 | (3) |
|
6.3.3 Binary-to-BCD conversion circuit |
|
|
131 | (3) |
|
|
134 | (3) |
|
6.3.5 Accurate low-frequency counter |
|
|
137 | (4) |
|
|
141 | (1) |
|
6.5 Suggested experiments |
|
|
141 | (4) |
|
6.5.1 Early detection debouncing circuit |
|
|
141 | (1) |
|
6.5.2 BCD-to-binary conversion circuit |
|
|
141 | (1) |
|
6.5.3 Fibonacci circuit with BCD I/O: design approach 1 |
|
|
141 | (1) |
|
6.5.4 Fibonacci circuit with BCD I/O: design approach 2 |
|
|
142 | (1) |
|
6.5.5 Auto-scaled low-frequency counter |
|
|
142 | (1) |
|
|
143 | (1) |
|
6.5.7 Babbage difference engine emulation circuit |
|
|
143 | (2) |
|
|
145 | (26) |
|
7.1 Embedded memory of FPGA device |
|
|
145 | (2) |
|
7.1.1 Memory of an Artix device |
|
|
146 | (1) |
|
7.1.2 Memory available in a Nexys 4 DDR board |
|
|
146 | (1) |
|
7.2 General description for a RAM-like component |
|
|
147 | (6) |
|
|
147 | (2) |
|
7.2.2 Dynamic Array Indexing Operation |
|
|
149 | (2) |
|
7.2.3 Key aspects of a RAM module |
|
|
151 | (1) |
|
|
151 | (2) |
|
|
153 | (5) |
|
7.3.1 FIFO read configuration |
|
|
153 | (1) |
|
7.3.2 Circular queue implementation |
|
|
154 | (4) |
|
7.4 HDL templates for memory inference |
|
|
158 | (6) |
|
7.4.1 Methods to incorporate memory modules |
|
|
158 | (1) |
|
7.4.2 Synchronous dual-port RAM |
|
|
159 | (1) |
|
7.4.3 "Simple" synchronous dual-port RAM |
|
|
160 | (1) |
|
7.4.4 Synchronous single-port RAM |
|
|
161 | (1) |
|
|
162 | (1) |
|
7.4.6 BRAM-based FIFO buffer |
|
|
163 | (1) |
|
7.4.7 Design considerations |
|
|
164 | (1) |
|
7.5 Overview of the memory controller |
|
|
164 | (2) |
|
|
166 | (1) |
|
7.7 Suggested experiments |
|
|
166 | (5) |
|
7.7.1 ROM-based sign-magnitude adder |
|
|
166 | (1) |
|
7.7.2 ROM-based temperature conversion |
|
|
166 | (1) |
|
7.7.3 FIFO with data width conversion |
|
|
167 | (1) |
|
7.7.4 Standard FIFO to FWFT FIFO conversion circuit |
|
|
167 | (1) |
|
7.7.5 FIFO buffer with extended status |
|
|
167 | (1) |
|
|
167 | (4) |
|
PART II EMBEDDED SOC I: VANILLA FPRO SYSTEM |
|
|
|
8 Overview of Embedded SoC Systems |
|
|
171 | (16) |
|
|
171 | (2) |
|
8.1.1 Overview of embedded systems |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
8.2 Development flow of the embedded SoC |
|
|
173 | (3) |
|
8.2.1 Hardware--software partition |
|
|
173 | (1) |
|
8.2.2 Hardware development flow |
|
|
173 | (2) |
|
8.2.3 Software development flow |
|
|
175 | (1) |
|
8.2.4 Physical implementation and test |
|
|
175 | (1) |
|
8.2.5 Custom IP core development |
|
|
175 | (1) |
|
|
176 | (4) |
|
|
176 | (1) |
|
8.3.2 Platform hardware organization |
|
|
177 | (2) |
|
8.3.3 Platform software organization |
|
|
179 | (1) |
|
8.3.4 Modified development flow |
|
|
180 | (1) |
|
8.4 Adaptation on the Digilent Nexys 4 DDR board |
|
|
180 | (2) |
|
|
182 | (2) |
|
8.5.1 Processor module and bridge |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (3) |
|
9 Bare Metal System Software Development |
|
|
187 | (26) |
|
9.1 Bare metal system development overview |
|
|
187 | (2) |
|
9.1.1 Desktop-like system versus bare metal system |
|
|
187 | (1) |
|
9.1.2 Basic embedded program architecture |
|
|
188 | (1) |
|
|
189 | (2) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (1) |
|
9.2.4 I/O address space of the FPro system |
|
|
190 | (1) |
|
9.3 Direct I/O register access |
|
|
191 | (2) |
|
9.3.1 Review of C pointer |
|
|
191 | (1) |
|
9.3.2 C pointer for I/O register |
|
|
192 | (1) |
|
9.4 Robust I/O register access |
|
|
193 | (4) |
|
9.4.1 chu_io_map.h and chu_io_map.vhd |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
195 | (2) |
|
9.5 Techniques for low-level I/O operations |
|
|
197 | (2) |
|
|
197 | (1) |
|
9.5.2 Packing and unpacking |
|
|
198 | (1) |
|
|
199 | (5) |
|
|
199 | (1) |
|
9.6.2 GPO and GPI drivers |
|
|
199 | (2) |
|
|
201 | (2) |
|
|
203 | (1) |
|
9.7 FPro utility routines and directory structure |
|
|
204 | (3) |
|
9.7.1 Minimal hardware requirements |
|
|
204 | (1) |
|
|
204 | (3) |
|
9.7.3 Directory structure |
|
|
207 | (1) |
|
|
207 | (4) |
|
9.8.1 IP core verification routine |
|
|
207 | (1) |
|
9.8.2 Programming with limited memory |
|
|
208 | (1) |
|
9.8.3 Test function integration |
|
|
208 | (1) |
|
9.8.4 Test program for the vanilla FPro system |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
211 | (1) |
|
9.10 Suggested experiments |
|
|
211 | (2) |
|
|
211 | (1) |
|
|
211 | (1) |
|
9.10.3 Pulse width modulation |
|
|
212 | (1) |
|
9.10.4 System time display |
|
|
212 | (1) |
|
10 FPro Bus Protocol and MMIO Slot Specification |
|
|
213 | (32) |
|
|
213 | (3) |
|
10.1.1 Overview of the bus |
|
|
213 | (1) |
|
|
214 | (1) |
|
10.1.3 FPro bus protocol specification |
|
|
215 | (1) |
|
10.2 Interface with the bus |
|
|
216 | (6) |
|
|
216 | (1) |
|
10.2.2 Write interface and decoding |
|
|
217 | (2) |
|
10.2.3 Read interface and multiplexing |
|
|
219 | (1) |
|
10.2.4 FIFO buffer as an I/O register |
|
|
220 | (1) |
|
10.2.5 Timing consideration |
|
|
221 | (1) |
|
|
222 | (5) |
|
10.3.1 MMIO slot interface specification |
|
|
222 | (2) |
|
10.3.2 Basic MMIO I/O core construction |
|
|
224 | (1) |
|
|
225 | (2) |
|
10.4 Timer core development |
|
|
227 | (2) |
|
|
227 | (1) |
|
|
227 | (1) |
|
10.4.3 Wrapping circuit for the slot interface |
|
|
228 | (1) |
|
|
229 | (6) |
|
10.5.1 chu_io_map.vhd file |
|
|
229 | (2) |
|
|
231 | (1) |
|
10.5.3 Vanilla MMIO subsystem |
|
|
232 | (3) |
|
10.6 MCS I/O bus and bridge |
|
|
235 | (3) |
|
10.6.1 Overview of Xilinx MicroBlaze MCS |
|
|
235 | (1) |
|
10.6.2 MicroBlaze MCS I/O bus |
|
|
235 | (2) |
|
10.6.3 MCS-to-FPro bridge |
|
|
237 | (1) |
|
10.7 Vanilla FPro system construction |
|
|
238 | (2) |
|
|
240 | (1) |
|
10.9 Suggested experiments |
|
|
241 | (4) |
|
10.9.1 FPro bus with a byte-lane enable signal |
|
|
241 | (1) |
|
10.9.2 Seven-segment control with a GPO core |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
242 | (1) |
|
10.9.5 Timer core with a programmable period |
|
|
242 | (1) |
|
10.9.6 Timer core with a run-once mode |
|
|
242 | (3) |
|
|
245 | (28) |
|
|
245 | (2) |
|
11.1.1 Overview of serial communication |
|
|
245 | (1) |
|
|
246 | (1) |
|
11.1.3 Oversampling procedure |
|
|
246 | (1) |
|
|
247 | (8) |
|
|
247 | (1) |
|
11.2.2 Baud rate generator |
|
|
248 | (1) |
|
|
249 | (3) |
|
|
252 | (2) |
|
11.2.5 Top-level HDL codes |
|
|
254 | (1) |
|
11.3 UART core development |
|
|
255 | (3) |
|
|
256 | (1) |
|
11.3.2 Wrapping circuit for the slot interface |
|
|
256 | (2) |
|
|
258 | (6) |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (3) |
|
|
264 | (1) |
|
11.5 Additional project ideas |
|
|
264 | (3) |
|
11.5.1 Original serial port |
|
|
264 | (1) |
|
11.5.2 Emulated serial port |
|
|
265 | (1) |
|
|
265 | (1) |
|
11.5.4 USB-to-UART adaptor |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (1) |
|
11.7 Suggested experiments |
|
|
268 | (5) |
|
11.7.1 UART-controlled chasing LEDs |
|
|
268 | (1) |
|
11.7.2 Alternative read configuration |
|
|
268 | (1) |
|
11.7.3 UART controller with a parity bit |
|
|
268 | (1) |
|
11.7.4 UART core with an error status |
|
|
268 | (1) |
|
11.7.5 Configurable UART core |
|
|
269 | (1) |
|
11.7.6 UART core with automatic baud rate detection |
|
|
269 | (1) |
|
11.7.7 UART core with enhanced automatic baud rate detection |
|
|
270 | (1) |
|
11.7.8 UART core with an automatic baud rate and a parity detection circuit |
|
|
270 | (3) |
|
PART III EMBEDDED SOC II: BASIC I/O CORES |
|
|
|
|
273 | (24) |
|
|
273 | (2) |
|
|
273 | (1) |
|
|
274 | (1) |
|
12.2 XADC core development |
|
|
275 | (5) |
|
12.2.1 XADC instantiation |
|
|
275 | (1) |
|
12.2.2 Basic wrapping circuit design |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (2) |
|
12.3 XADC core device driver |
|
|
280 | (3) |
|
|
280 | (1) |
|
12.3.2 Class implementation |
|
|
281 | (1) |
|
12.3.3 Testing for the XADC core |
|
|
282 | (1) |
|
|
283 | (10) |
|
12.4.1 Testing procedure of an FPro core |
|
|
283 | (1) |
|
12.4.2 System configuration |
|
|
283 | (1) |
|
12.4.3 Hardware derivation |
|
|
284 | (8) |
|
12.4.4 Software verification program |
|
|
292 | (1) |
|
12.5 Additional project ideas |
|
|
293 | (1) |
|
|
294 | (1) |
|
12.7 Suggested experiments |
|
|
294 | (3) |
|
12.7.1 Real-time voltage display |
|
|
294 | (1) |
|
12.7.2 Potentiometer-controlled chasing LEDs |
|
|
294 | (1) |
|
12.7.3 Potentiometer-controlled LED dimmer |
|
|
295 | (1) |
|
12.7.4 Enhanced wrapping circuit I |
|
|
295 | (1) |
|
12.7.5 Enhanced wrapping circuit II |
|
|
295 | (2) |
|
13 Pulse Width Modulation Core |
|
|
297 | (12) |
|
|
297 | (1) |
|
13.1.1 PWM as analog output |
|
|
297 | (1) |
|
13.1.2 Main characteristics |
|
|
298 | (1) |
|
|
298 | (3) |
|
|
298 | (2) |
|
|
300 | (1) |
|
13.3 PWM core development |
|
|
301 | (3) |
|
|
301 | (1) |
|
13.3.2 Wrapped PWM circuit |
|
|
302 | (2) |
|
|
304 | (1) |
|
|
304 | (1) |
|
13.4.2 Class implementation |
|
|
304 | (1) |
|
|
305 | (1) |
|
|
306 | (1) |
|
13.7 Suggested experiments |
|
|
307 | (2) |
|
|
307 | (1) |
|
13.7.2 Rainbow night light |
|
|
307 | (1) |
|
13.7.3 Enhanced PWM core: part I |
|
|
307 | (1) |
|
13.7.4 Enhanced PWM core: part II |
|
|
308 | (1) |
|
13.7.5 Enhanced GPIO core |
|
|
308 | (1) |
|
13.7.6 Servo motor driver |
|
|
308 | (1) |
|
14 Debouncing Core and LED-Mux Core |
|
|
309 | (16) |
|
|
309 | (6) |
|
14.1.1 Multi-bit debouncing circuit |
|
|
309 | (3) |
|
14.1.2 Register map and the slot wrapping circuit |
|
|
312 | (1) |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
315 | (6) |
|
14.2.1 Eight-digit seven-segment LED display multiplexing circuit |
|
|
315 | (1) |
|
14.2.2 Register map and the slot wrapping circuit |
|
|
316 | (2) |
|
|
318 | (2) |
|
|
320 | (1) |
|
|
321 | (1) |
|
14.4 Suggested experiments |
|
|
322 | (3) |
|
14.4.1 Area comparison of two debouncing circuits |
|
|
322 | (1) |
|
14.4.2 Enhanced debouncing core: part I |
|
|
323 | (1) |
|
14.4.3 Enhanced debouncing core: part II |
|
|
323 | (1) |
|
14.4.4 Rotating square pattern revisited |
|
|
323 | (1) |
|
14.4.5 Heartbeat pattern revisited |
|
|
323 | (1) |
|
|
323 | (1) |
|
14.4.7 Enhanced LED-mux core |
|
|
323 | (2) |
|
|
325 | (24) |
|
|
325 | (6) |
|
15.1.1 Conceptual architecture |
|
|
326 | (1) |
|
15.1.2 Multiple device configuration |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
330 | (1) |
|
|
331 | (5) |
|
|
331 | (1) |
|
|
332 | (1) |
|
15.2.3 HDL implementation |
|
|
332 | (4) |
|
15.3 SPI core development |
|
|
336 | (2) |
|
|
336 | (1) |
|
15.3.2 Wrapping circuit for the slot interface |
|
|
336 | (2) |
|
|
338 | (2) |
|
|
338 | (1) |
|
15.4.2 Class implementation |
|
|
339 | (1) |
|
|
340 | (3) |
|
15.5.1 ADXL362 accelerometer |
|
|
341 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
343 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
15.8 Suggested experiments |
|
|
344 | (5) |
|
15.8.1 Inclination sensing |
|
|
344 | (1) |
|
15.8.2 "Tapping" detection |
|
|
345 | (1) |
|
|
345 | (1) |
|
15.8.4 Enhanced SPI controller: part I |
|
|
345 | (1) |
|
15.8.5 Enhanced SPI controller: part II |
|
|
345 | (1) |
|
15.8.6 Automatic-read ADXL362 wrapper: part I |
|
|
346 | (1) |
|
15.8.7 Automatic-read ADXL362 wrapper: part II |
|
|
346 | (1) |
|
15.8.8 Flash memory access |
|
|
346 | (1) |
|
15.8.9 SPI slave controller: part I |
|
|
346 | (1) |
|
15.8.10 SPI slave controller: part II |
|
|
347 | (2) |
|
|
349 | (24) |
|
|
349 | (4) |
|
16.1.1 Electrical characteristics |
|
|
350 | (1) |
|
16.1.2 Basic bus protocol |
|
|
350 | (1) |
|
|
351 | (1) |
|
16.1.4 Additional features |
|
|
352 | (1) |
|
|
353 | (9) |
|
|
353 | (1) |
|
16.2.2 Conceptual FSMD construction |
|
|
353 | (3) |
|
16.2.3 Output control logic |
|
|
356 | (1) |
|
16.2.4 I2C bus clock generation |
|
|
356 | (1) |
|
16.2.5 HDL implementation |
|
|
357 | (5) |
|
16.3 I2C core development |
|
|
362 | (2) |
|
|
362 | (1) |
|
16.3.2 Wrapping circuit for the slot interface |
|
|
362 | (2) |
|
|
364 | (3) |
|
|
364 | (1) |
|
16.4.2 Class implementation |
|
|
364 | (3) |
|
|
367 | (2) |
|
16.5.1 ADT7420 temperature sensor |
|
|
367 | (1) |
|
|
368 | (1) |
|
|
369 | (1) |
|
|
369 | (1) |
|
16.8 Suggested experiments |
|
|
370 | (3) |
|
|
370 | (1) |
|
|
370 | (1) |
|
|
370 | (1) |
|
16.8.4 Automatic-read ADT7420 wrapper |
|
|
370 | (1) |
|
16.8.5 I2C slave controller: part I |
|
|
371 | (1) |
|
16.8.6 I2C slave controller: part II |
|
|
371 | (2) |
|
|
373 | (26) |
|
|
373 | (2) |
|
17.1.1 PS2-device-to-host communication protocol and timing |
|
|
374 | (1) |
|
17.1.2 Host-to-PS2-device communication protocol and timing |
|
|
374 | (1) |
|
|
375 | (10) |
|
|
375 | (1) |
|
17.2.2 PS2 receiving subsystem |
|
|
375 | (4) |
|
17.2.3 PS2 transmitting subsystem |
|
|
379 | (5) |
|
17.2.4 Complete PS2 system |
|
|
384 | (1) |
|
17.3 PS2 core development |
|
|
385 | (2) |
|
|
385 | (1) |
|
17.3.2 Wrapping circuit for the slot interface |
|
|
385 | (2) |
|
|
387 | (8) |
|
|
387 | (1) |
|
17.4.2 Lower layer methods |
|
|
387 | (1) |
|
17.4.3 PS2 initialization routine |
|
|
388 | (2) |
|
|
390 | (3) |
|
|
393 | (2) |
|
|
395 | (1) |
|
|
396 | (1) |
|
17.7 Suggested experiments |
|
|
396 | (3) |
|
17.7.1 PS2 receiving subsystem with watchdog timer |
|
|
396 | (1) |
|
17.7.2 Keyboard-controlled LED flashing circuit |
|
|
396 | (1) |
|
17.7.3 Enhanced keyboard driver routine I |
|
|
397 | (1) |
|
17.7.4 Enhanced keyboard driver routine II |
|
|
397 | (1) |
|
17.7.5 Remote-mode mouse driver |
|
|
397 | (1) |
|
17.7.6 Scroll-wheel mouse driver |
|
|
397 | (2) |
|
|
399 | (20) |
|
|
399 | (1) |
|
18.2 Design and implementation |
|
|
400 | (3) |
|
18.2.1 Direct synthesis of a digital waveform |
|
|
400 | (1) |
|
18.2.2 Direct synthesis of an unmodulated analog waveform |
|
|
401 | (1) |
|
18.2.3 Direct synthesis of a modulated analog waveform |
|
|
402 | (1) |
|
18.3 Fixed-point arithmetic |
|
|
403 | (1) |
|
|
404 | (3) |
|
18.5 DAC (digital-to-analog converter) |
|
|
407 | (2) |
|
|
407 | (1) |
|
18.5.2 HDL implementation |
|
|
408 | (1) |
|
18.6 DDFS core development |
|
|
409 | (3) |
|
|
409 | (1) |
|
18.6.2 Wrapping circuit for the slot interface |
|
|
410 | (2) |
|
|
412 | (2) |
|
|
412 | (1) |
|
18.7.2 Class implementation |
|
|
412 | (2) |
|
|
414 | (1) |
|
|
415 | (1) |
|
18.10 Suggested experiments |
|
|
415 | (4) |
|
18.10.1 Quadrature phase carrier generation |
|
|
416 | (1) |
|
18.10.2 Reduced-size phase-to-amplitude lookup table |
|
|
416 | (1) |
|
18.10.3 Additive harmonic synthesis |
|
|
416 | (1) |
|
18.10.4 Simple function generator |
|
|
416 | (1) |
|
18.10.5 Arbitrary waveform generator |
|
|
416 | (1) |
|
18.10.6 Sample-based synthesis |
|
|
417 | (2) |
|
|
419 | (20) |
|
|
419 | (1) |
|
19.2 ADSR envelope generator |
|
|
420 | (5) |
|
19.2.1 Conceptual FSMD design |
|
|
421 | (1) |
|
|
421 | (2) |
|
19.2.3 HDL implementation |
|
|
423 | (2) |
|
19.3 ADSR core development |
|
|
425 | (3) |
|
|
425 | (1) |
|
19.3.2 Wrapped ADSR circuit |
|
|
426 | (2) |
|
|
428 | (5) |
|
|
428 | (1) |
|
19.4.2 Configuration methods |
|
|
429 | (2) |
|
19.4.3 calc_note_freq() method |
|
|
431 | (1) |
|
19.4.4 play-note () method |
|
|
432 | (1) |
|
|
433 | (1) |
|
|
434 | (1) |
|
|
435 | (1) |
|
19.8 Suggested experiments |
|
|
435 | (4) |
|
19.8.1 RTTTL music player |
|
|
435 | (1) |
|
19.8.2 ADSR envelope testing |
|
|
435 | (1) |
|
|
435 | (1) |
|
|
435 | (1) |
|
|
435 | (1) |
|
19.8.6 Real-time mode ADSR generator |
|
|
436 | (1) |
|
19.8.7 Real-time mode button piano |
|
|
436 | (1) |
|
19.8.8 Merged DDFS and ADSR core |
|
|
436 | (1) |
|
19.8.9 ADSR core with an automatic play FIFO buffer |
|
|
436 | (1) |
|
19.8.10 ADSR core for frequency modulation |
|
|
436 | (3) |
|
PART IV EMBEDDED SOC III: VIDEO CORES |
|
|
|
20 Introduction to the Video System |
|
|
439 | (22) |
|
20.1 Introduction to a video display |
|
|
439 | (2) |
|
20.1.1 Conceptual video display |
|
|
439 | (1) |
|
|
440 | (1) |
|
|
441 | (2) |
|
20.2.1 Random-access interface versus stream interface |
|
|
441 | (1) |
|
20.2.2 Flow control of the stream interface |
|
|
441 | (2) |
|
|
443 | (9) |
|
20.3.1 Basic operation of a CRT monitor |
|
|
443 | (1) |
|
20.3.2 Horizontal synchronization |
|
|
444 | (2) |
|
20.3.3 Vertical synchronization |
|
|
446 | (1) |
|
|
447 | (1) |
|
20.3.5 VGA synchronization circuit |
|
|
448 | (4) |
|
20.4 Bar test-pattern generator |
|
|
452 | (2) |
|
20.5 Color-to-grayscale conversion circuit |
|
|
454 | (1) |
|
|
455 | (2) |
|
20.7 Advanced video standards |
|
|
457 | (1) |
|
|
458 | (1) |
|
20.9 Suggested experiments |
|
|
458 | (3) |
|
20.9.1 Horizontal bar test-pattern generator |
|
|
458 | (1) |
|
20.9.2 Color channel selection circuit |
|
|
458 | (1) |
|
20.9.3 Enhanced color-to-grayscale conversion circuit |
|
|
458 | (1) |
|
20.9.4 Square test-pattern generator: part I |
|
|
458 | (1) |
|
20.9.5 Square test-pattern generator: part II |
|
|
459 | (1) |
|
20.9.6 Square test-pattern generator: part III |
|
|
459 | (1) |
|
20.9.7 Square test-pattern generator: part IV |
|
|
459 | (2) |
|
|
461 | (40) |
|
21.1 Organization of the video subsystem |
|
|
461 | (4) |
|
|
461 | (2) |
|
|
463 | (1) |
|
21.1.3 HDL of the video controller |
|
|
464 | (1) |
|
|
465 | (5) |
|
21.2.1 Basic functionality |
|
|
465 | (1) |
|
21.2.2 Blending operation |
|
|
466 | (2) |
|
|
468 | (2) |
|
21.2.4 Alternative core partition |
|
|
470 | (1) |
|
|
470 | (5) |
|
21.3.1 Bar test-pattern generator core |
|
|
470 | (3) |
|
21.3.2 Color-to-grayscale conversion core |
|
|
473 | (1) |
|
|
474 | (1) |
|
21.4 FPro video synchronization core |
|
|
475 | (8) |
|
|
476 | (3) |
|
21.4.2 Enhanced video synchronization circuit |
|
|
479 | (3) |
|
|
482 | (1) |
|
21.5 Daisy video subsystem |
|
|
483 | (7) |
|
21.5.1 Subsystem overview |
|
|
483 | (1) |
|
21.5.2 Interface to the video synchronization core |
|
|
484 | (1) |
|
|
485 | (4) |
|
21.5.4 Timing and performance considerations |
|
|
489 | (1) |
|
21.6 Vanilla daisy FPro system |
|
|
490 | (4) |
|
21.6.1 Clock management core |
|
|
490 | (1) |
|
21.6.2 Updated chu_io_map VHDL package |
|
|
491 | (1) |
|
|
491 | (3) |
|
21.7 Video driver and testing program |
|
|
494 | (3) |
|
21.7.1 Updated chu_io_map.h and chu_io_rw.h files |
|
|
494 | (1) |
|
|
495 | (1) |
|
|
495 | (2) |
|
|
497 | (1) |
|
21.9 Suggested experiments |
|
|
497 | (4) |
|
21.9.1 Color channel selection core |
|
|
497 | (1) |
|
21.9.2 Enhanced color-to-grayscale conversion core |
|
|
497 | (1) |
|
21.9.3 Square test-pattern generator core |
|
|
498 | (1) |
|
21.9.4 Alpha blending circuit |
|
|
498 | (1) |
|
|
498 | (1) |
|
21.9.6 SVGA synchronization core |
|
|
498 | (1) |
|
21.9.7 Configurable video synchronization core |
|
|
499 | (1) |
|
21.9.8 Pipelined video subsystem |
|
|
499 | (2) |
|
|
501 | (22) |
|
|
501 | (1) |
|
|
502 | (2) |
|
|
502 | (1) |
|
22.2.2 In-region comparison circuit |
|
|
503 | (1) |
|
|
504 | (5) |
|
22.3.1 Pointer sprite RAM |
|
|
504 | (1) |
|
22.3.2 Pixel generation circuit |
|
|
505 | (2) |
|
|
507 | (2) |
|
22.4 "Ghost" character core |
|
|
509 | (8) |
|
22.4.1 Multiple images and animation |
|
|
509 | (1) |
|
22.4.2 Overview of the palette scheme |
|
|
510 | (1) |
|
22.4.3 Ghost sprite RAM and the palette circuit |
|
|
510 | (2) |
|
22.4.4 Animation timing circuit |
|
|
512 | (1) |
|
22.4.5 Pixel generation circuit |
|
|
512 | (3) |
|
|
515 | (2) |
|
22.5 Sprite core driver and testing program |
|
|
517 | (3) |
|
22.5.1 Sprite core driver |
|
|
517 | (1) |
|
|
518 | (2) |
|
|
520 | (1) |
|
22.7 Suggested experiments |
|
|
520 | (3) |
|
22.7.1 Mouse pointer control with a PS2 core |
|
|
520 | (1) |
|
22.7.2 Emulated ghost core |
|
|
520 | (1) |
|
22.7.3 Palette circuit for the mouse pointer sprite |
|
|
520 | (1) |
|
22.7.4 Sprite scaling circuit |
|
|
520 | (1) |
|
22.7.5 Portrait mode display |
|
|
520 | (1) |
|
22.7.6 Multiple object generation |
|
|
521 | (1) |
|
22.7.7 Animation speed control |
|
|
521 | (1) |
|
22.7.8 Imitated blinking LED: part I |
|
|
521 | (1) |
|
22.7.9 Imitated blinking LED: part II |
|
|
522 | (1) |
|
22.7.10 Imitated blinking LED: part III |
|
|
522 | (1) |
|
23 On-Screen-Display Core |
|
|
523 | (16) |
|
23.1 Introduction to tile graphics |
|
|
523 | (2) |
|
|
525 | (3) |
|
|
525 | (1) |
|
|
526 | (1) |
|
|
526 | (1) |
|
23.2.4 Basic organization |
|
|
527 | (1) |
|
|
528 | (6) |
|
|
528 | (1) |
|
23.3.2 Pixel generation circuit |
|
|
529 | (3) |
|
|
532 | (2) |
|
23.4 OSD core driver and testing program |
|
|
534 | (2) |
|
|
534 | (1) |
|
|
535 | (1) |
|
|
536 | (1) |
|
23.6 Suggested experiments |
|
|
536 | (3) |
|
|
536 | (1) |
|
|
536 | (1) |
|
23.6.3 Underline for the cursor |
|
|
537 | (1) |
|
23.6.4 Portrait-mode display |
|
|
537 | (1) |
|
23.6.5 Font scaling circuit: part I |
|
|
537 | (1) |
|
23.6.6 Font scaling circuit: part II |
|
|
537 | (1) |
|
|
537 | (1) |
|
23.6.8 Tile-based ghost core |
|
|
538 | (1) |
|
|
539 | (18) |
|
|
539 | (1) |
|
|
540 | (4) |
|
24.2.1 FPGA memory consideration |
|
|
540 | (1) |
|
24.2.2 Video memory module |
|
|
540 | (2) |
|
24.2.3 Address translation |
|
|
542 | (1) |
|
24.2.4 Pixel generation circuit |
|
|
542 | (2) |
|
|
544 | (2) |
|
24.3.1 Top-level HDL code |
|
|
545 | (1) |
|
24.4 Driver and the testing program |
|
|
546 | (3) |
|
24.4.1 Frame buffer core driver |
|
|
546 | (1) |
|
24.4.2 Geometrical modeling |
|
|
547 | (2) |
|
|
549 | (1) |
|
|
549 | (1) |
|
|
550 | (1) |
|
24.7 Suggested experiments |
|
|
551 | (6) |
|
24.7.1 Virtual prototyping board panel |
|
|
551 | (1) |
|
24.7.2 Virtual analog wall clock |
|
|
551 | (1) |
|
24.7.3 Geometrical model functions |
|
|
551 | (1) |
|
24.7.4 Simulated "Etch A Sketch" toy |
|
|
551 | (1) |
|
24.7.5 Frame buffer core with 3-bit color depth |
|
|
551 | (1) |
|
24.7.6 Frame buffer core with 1-bit color depth |
|
|
552 | (1) |
|
24.7.7 QVGA frame buffer core |
|
|
552 | (1) |
|
24.7.8 Line drawing hardware accelerator |
|
|
552 | (1) |
|
24.7.9 Bidirectional frame buffer access: part I |
|
|
552 | (1) |
|
24.7.10 Bidirectional frame buffer access: part II |
|
|
552 | (5) |
|
|
|
|
557 | (8) |
|
|
561 | (4) |
|
|
565 | (28) |
|
A.1 Overview of the Xilinx Vivado IDE |
|
|
565 | (4) |
|
A.2 Short tutorial on Vivado hardware development |
|
|
569 | (5) |
|
Appendix A.2.1 Create a design project |
|
|
570 | (1) |
|
Appendix A.2.2 Add or create Xilinx IP core instances |
|
|
571 | (1) |
|
Appendix A.2.3 Add or create HDL design files |
|
|
571 | (1) |
|
Appendix A.2.4 Add a constraint file |
|
|
572 | (1) |
|
Appendix A.2.5 Perform synthesis, implementation, and bitstream generation |
|
|
573 | (1) |
|
Appendix A.2.6 Program an FPGA device |
|
|
573 | (1) |
|
A.3 Short tutorial on Vivado simulation |
|
|
574 | (4) |
|
Appendix A.3.1 Add or create an HDL testbench |
|
|
576 | (1) |
|
Appendix A.3.2 Perform initial simulation |
|
|
577 | (1) |
|
Appendix A.3.3 Customize waveform display |
|
|
577 | (1) |
|
A.4 Tutorial on IP instantiation |
|
|
578 | (6) |
|
Appendix A.4.1 Dual-clock FIFO core via HDL templates |
|
|
579 | (1) |
|
Appendix A.4.2 IP catalog utility |
|
|
579 | (1) |
|
Appendix A.4.3 Generate a MicroBlaze MCS component |
|
|
580 | (1) |
|
Appendix A.4.4 XADC IP core |
|
|
581 | (2) |
|
Appendix A.4.5 Clock management IP core |
|
|
583 | (1) |
|
A.5 Short tutorial on FPro system development |
|
|
584 | (7) |
|
Appendix A.5.1 Derive FPro system hardware |
|
|
585 | (1) |
|
Appendix A.5.2 Export hardware configuration |
|
|
585 | (1) |
|
Appendix A.5.3 Derive software |
|
|
586 | (4) |
|
Appendix A.5.4 Embed elf file and regenerate bitstream |
|
|
590 | (1) |
|
Appendix A.5.5 Set up a terminal emulator program |
|
|
590 | (1) |
|
Appendix A.5.6 Program an FPGA device |
|
|
591 | (1) |
|
|
591 | (2) |
Topic Index |
|
593 | |