euccas.github.io

why a developer writes

String in C++

| Comments

Recently I spent a whole lot of time on file compression and decompression with zlib. Thought I’d better write something about it. But before that, let me finish the review of C++ fundamentals. Today I’ll write about Strings in C++.

Two types of String are available in C++: C-Strings (C-style Strings), and STL Strings.

C-String

C-String is a fundamental type in C++. Comparing to STL String, C-String is small, simple and fast. A C-String is a special case of an array of characters terminated with a 0. This is sometimes called an null-terminated string. A C-String can be printed out with a printf statement using the %s format string. We can access the individual characters in a C-String just as we do in an array.

A List of SoC Design and Verification Infrastructure Needs - Tools/Automation Flows (2013)

| Comments

This post was written in 2013, when I thought it was necessary to summarize infrastructure tools and flows needed in SoC design and verification, according to all my experience. Today when I checked on my old notes I found this one and would like to share it here. Later on I’ll update and expand this list according to my latest experience and knowledge in engineering tools and infrastructure for software and hardware development.

System-on-Chip design and verification process is a complicated one. Unlike the world of Web and Internet, the design and development of hardware products have higher risk and lower tolerance to any mistakes. SoC design and verification process requires collaborations from multiple teams and vendors. Lots of hard decisions to make. Lots of trade-offs to consider. Moreover, the nonrecurring-engineering (NRE) charge makes sufficient and solid verification a must with limited time and resource. Tools and automated flows are an essential part of any design house.

Here is a list of areas that need tools and flows for SoC software and hardware design and verification according to my experience.

C++ Pointers and References

| Comments

Pointers and references are two fundamental data types in C++. They are useful, common and somewhat dangerous. Using them correctly, they could greatly improve the efficiency and performance of your program. On the other hand, using them incorrectly could lead to many problems such as memory leaks and buffer overflow.

Pointers

A pointer holds the address of a variable and can be used to perform any operation that could be directly done on the variable, such as accessing and modifying it. Here are a few facts of pointers:

  • When a pointer is defined, memory is allocated in the size of a pointer.

  • The pointer is strongly typed, meaning the compiler retains an association with a pointer that it points to a type of value.

  • Two pointers can equal to each other, such that changing one’s value also changes the other’s value.

C++ Qualifiers

| Comments

Recently I’m doing a review on C++ programming language. During the process, I found a few topics which are worth paying more attention to. I’ll write several posts about the related C++ tips and tactics.

The first topic I’ll write about here is: Qualifiers

C++ uses Qualifiers to adjust qualities of a variable or an object. In C++, there are two types of qualifiers: CV qualifiers and storage qualifiers.

CV Qualifiers

CV qualifiers stands for Const and Volatile Qualifier. There are three types of CV qualifiers:

  • const
  • volatile
  • mutable

Enabled Blog Posts Commenting

| Comments

Hi there,

I just enabled commenting on this blog with Disqus.

Feel free to leave comments on the blog posts you’re interested. I look foward to having conversations with people who spend some time reading my blog.

Cheers,

Euccas