A SystemC Primer, Second Edition: Table of Contents

A SystemC Primer, Second Edition: Table of Contents

Foreword 	xiii
Preface 	xxi
Chapter 1 
Introduction 	1
	1.1	What is SystemC?, 1
	1.2	Why SystemC?, 3
	1.3	Design Methodology, 6
	1.4	Capabilities, 10
	1.5	SystemC RTL, 12
	1.6	Book Organization, 12
	1.7	Exercises, 13
Chapter 2 
Getting Started 	15
	2.1	Basics, 15
	2.2	Another Example, 18
	2.3	Describing Hierarchy, 21
	2.4	Verifying the Functionality, 24
	2.5	Exercises, 29
Chapter 3 
Data Types 	31
	3.1	Value Holders, 31
	3.2	Summary of Types, 33
	3.3	Bit Type, 35
	3.4	Arbitrary Width Bit Type, 36
	3.5	Logic Type, 40
	3.6	Arbitrary Width Logic Type, 43
	3.7	Signed Integer Type, 48
	3.8	Unsigned Integer Type, 54
	3.9	Arbitrary Precision Signed Integer Type, 55
	3.10	Arbitrary Precision Unsigned Integer Type, 56
	3.11	Resolved Types, 57
	3.12	User-defined Data Types, 58
	3.13	Recommended Data Types, 60
	3.14	Exercises, 61
Chapter 4 
Modeling Combinational Logic 	63
	4.1	SC_MODULE, 63
	4.1.1	File Structure, 65
	4.2	An Example, 67
	4.3	Reading and Writing Ports and Signals, 69
	4.4	Logical Operators, 70
	4.5	Arithmetic Operators, 72
	4.5.1	Unsigned Arithmetic, 73
	4.5.2	Signed Arithmetic, 74
	4.6	Relational Operators, 76
	4.7	Vectors and Ranges, 79
	4.7.1	Constant Index, 79
	4.7.2	Non-constant Index, 81
	4.8	If Statement, 84
	4.9	Switch Statement, 88
	4.10	Loops, 92
	4.11	Methods, 94
	4.12	Structures, 98
	4.13	Multiple Processes and Delta Delay, 100
	4.14	Summary, 101
	4.15	Exercises, 102
Chapter 5 
Modeling Synchronous Logic 	103
	5.1	Modeling Flip-flops, 104
	5.2	Multiple Processes, 106
	5.3	Flip-flop with Asynchronous Preset and Clear, 108
	5.4	Flip-flop with Synchronous Preset and Clear, 113
	5.5	Multiple and Multi-phase Clocks, 114
	5.6	Modeling Latches, 117
	5.6.1	If Statement, 117
	5.6.2	Switch Statement, 121
	5.6.3	Avoiding Latches, 122
	5.7	Summary, 125
	5.8	Exercises, 125
Chapter 6 
Miscellaneous Logic 	127
	6.1	Three-state Drivers, 127
	6.2	Multiple Drivers, 133
	6.3	Handling Donít-cares, 136
	6.4	Hierarchy, 138
	6.5	Parameterizing Modules, 146
	6.6	Variable and Signal Assignments, 149
	6.7	Exercises, 151
Chapter 7 
Modeling Examples 	153
	7.1	Parameterizable Register with Three-state Output, 153
	7.2	A Memory Model, 156
	7.3	Modeling an FSM, 158
	7.3.1	Moore FSM, 158
	7.3.2	Mealy FSM, 162
	7.4	Universal Shift Register, 166
	7.5	Counters, 168
	7.5.1	Modulo-N Counter, 168
	7.5.2	Johnson Counter, 171
	7.5.3	Gray Code Up-down Counter, 172
	7.6	Johnson Decoder, 175
	7.7	A Factorial Model, 176
	7.8	Modeling a ROM, 178
	7.9	Exercises, 180
Chapter 8 
Writing Testbenches 	181
	8.1	Writing a Testbench, 182
	8.2	Simulation Control, 185
	8.2.1	sc_clock, 185
	8.2.2	sc_trace, 186
	8.2.3	sc_start, 188
	8.2.4	sc_stop, 189
	8.2.5	sc_time_stamp, 189
	8.2.6	sc_simulation_time, 189
	8.2.7	sc_cycle and sc_initialize, 190
	8.2.8	sc_time, 190
	8.3	Waveforms, 192
	8.3.1	Arbitrary Waveform, 192
	8.3.2	Complex Repetitive Waveform, 194
	8.3.3	Generating a Derived Clock, 195
	8.3.4	Reading Stimuli from Files, 197
	8.3.5	Reactive Stimuli, 203
	8.4	Monitoring Behavior, 207
	8.4.1	Asserting Valid Behavior, 207
	8.4.2	Dumping Results into a Text File, 209
	8.5	More Examples, 210
	8.5.1	Flip-flop, 210
	8.5.2	Multiplexer with Synchronous Output, 216
	8.5.3	Full Adder, 220
	8.5.4	Cycle-level Simulation, 224
	8.6	Statement Ordering within sc_main, 226
	8.7	Tracing Aggregate Types, 227
	8.8	Tracing Enumeration Types, 229
	8.9	Exercises, 230
Chapter 9 
Modeling Beyond RTL 	233
	9.1	SC_THREAD Process, 234
	9.2	Dynamic Sensitivity, 239
	9.3	Constructor Arguments, 244
	9.4	More Examples, 250
	9.4.1	Greatest Common Divisor, 250
	9.4.2	Filter, 251
	9.5	Ports, Interfaces and Channels, 252
	9.6	Advanced Topics, 258
	9.6.1	Shared Data Members, 258
	9.6.2	Fixed Point Types, 259
	9.6.3	Module, 259
	9.6.4	Other Methods, 260
	9.7	Simulation Algorithm, 265
	9.8	Exercises, 266
Appendix A 
Runtime Environment 	269
	A.1	Software Installation, 269
	A.2	Compiling your Design, 270
	A.3	Simulating your Design, 272
	A.4	Debugging, 272
Appendix B 
SystemC RTL: A Synthesizable Subset 	275
	B.1	SystemC Features, 276
	B.2	C++ Features, 278
Bibliography 	283
Index 	285