C++ Object Oriented Programming

Wednesday, March 17, 2010

VLSI design is getting more and more important these days. The sizes of the circuits and devices are getting larger and larger. In the old days people relied on using CAD tools to do the layout of the whole circuits. Later on people started to use tools like Verilog or VHDL to implement the algorithms in a design in a more natural way, and then use synthesis tools and place and route tools to do the layout of the chips. The trend of designing chips are getting higher and higher level. People now think that using Verilog or VHDL is still not very efficient. They want to directly use the implementation in C or C++, and transform it into Verilog code using some kind of CAD tools. Programs and libraries like Ocapi started to come out, which provide a way for people to convert a certain C++ implementation of a chip to VHDL or Verilog. Therefore it is also very important for hardware designers to know about C and C++. 1.0 Overview Most of you should know about C already, and this document mostly describes a key features in C++ programming, object oriented programming (OOP). A very brief introduction to C++ syntax, which is different from C, is described first. Then we will go in more depth about how to use objects in our programs. We will talk about why we want to use C++ rather than C, the syntax on how to describe classes and objects in C++, and also we will talk about how to declare and use an object in C++. 2.0 Basic Syntax In C++, if you want to output a variable temp to the screen, you do: cout < < "value of temp is " <<>> temp; In C++, in order to use cin and cout , you have to include the library . The method for implementing file I/O is also different from C, and you can look into the reference for the correct syntax and what header file to include. For some functions like rand() you can still use them by including the header file . Other than these, C++ is almost the same as C. So if you already know about C, learning about C++ shouldn’t be an extremely challenging task. Making function calls, assignment, return format, loops, arrays, are all the same as C…

Download C++ Object Oriented Programming.Pdf

0 comments:

Post a Comment

 
 
 

locate all visitor site