Microcontrollers vs FPGAs

…or the future of microcontrollers 🙂 woow that sounds geek!

I have to confess that I had no intention to switch the discussion from smartphones (or Java lectures) towards such topic unless I had not received the newsletter from embedded.com: Tech Focus: FPGAs vs. MCUs/MPUs: It’s no longer either/or .

Well… I would think this is an absolutely valid topic, which is the next embedded design trend, how will it look like, the future of embedded systems, will we still largely use microcontrollers, or will those be gradually replaced by FPGAs?

Read more of this post

Advertisements

Object file formats

Recently I jus had the chance to go through a powerpoint presentation of the software development process inside the company that I am currently working. In ordr to understand the code and the project structure there are some know-how requirements, I would say:   you will need to know how is the code implemented or developped (which rules does it have to fulfill, mainly in automotive companies this has a lot to do with MISRA guidelines) how is the code structured, how are the files organized, how the binary is created, how is the code executed and some post-execution phases which are primarly related to simulation and debugging activities.

Read more of this post

A possible solution for the interview problem

Few days ago I have published a post in which presenting a problem received by me at an interview. Meanwhile I managed to find a solution and what I could achieve was a visual representation of the algorithm used to find the solution along with its pseudo-code description. I am still “struggling” to represent this algorithm in C language.

Before to proceed just a remainder of problem requirements:

  1. a squared matrix is given as input, it can be read from keyboard using scanf or any other input stream read function
  2. the matrix must have integer elements, positive and negative
  3. the requirement is to find the “sub-rectangle” having the maximum sum of its elements

The approach is the following:

Read more of this post

Problem received at an interview for an embedded C programmer position

… even if this is for an embedded software developer the problem itself has much more to do with algorithms.

So … let’s just don’t waist the time and tackle the problem, it sounds like this:

Given a square matrix of dimension N, as the one below, please implement a C function which has as inputs (parameters) the matrix itself (actually a pointer to the first element, you know what I am talking about) and its size and as output the largest sum of its sub-rectangles. Here some explanations need to be provided, the elements of matrix can be positive or negative integers and a sub-rectangle can have any size from 1×1 to AxB, where A

The matrix is like this (this a 4×4 example, but the algorithm has to be for a generic one, NxN)

A sub-rectangle of this one may be any combination like the one below (the sub-rectangle is is yellow).

It can be of 1×2 size, this one has a sum of 5

or 2×4, sum of this one is 12 (-11+6+3+4+12+0+5+(-7))

or 4×2, sum in this case is 2

or just one single element, as it is 14 in this case

It can’t be something like this, because this is not a rectangle:

Wish you good luck.

PS: I could not solve it at the interview 🙂 (or at least I could not find an exhaustive solution) but I made several tries afterwards and some of them proved to be correct, I will post them in the future

What was astonishing to me was that the interviewer also kept saying that this is trivial.

Just some testing terminology…

In this post I will try to make clearer several terms used in testing methodology and also to answer some questions that could generate confusions for many junior level testers. I won’t make a testing terms glossary but I will just go through some misunderstandings which I also faced myself some time ago.

I will start by tracing the difference between verification and validation procedures. Generally the answer for this is that

verification is when you check to see if the product was built right and validation is when you check for the right product.

Other definitions would be verification is truth and validation is correctness. This subtle difference has a lot to do with the difference between smoke testing and sanity testing, but I will come back on this topic later on this post.

One meaningful definition that I’ve found and I would like to share it with you is the one in the context of V software development model.

Read more of this post

Software-in-the-loop and hardware-in-the-loop simulations (or simply SILS and HILS)

Since I am working in the simulation field, or at least in a team which has simulation related tasks, I thought necessary to say some words about those testing methodologies which, in my opinion, are crucial for a test engineer.

So … if you are a test engineer and things like block-box testing, white-box testing, design under test, software-in-the-loop, hardware-in-the-loop simulation, verification vs validation (what is the difference between them), test automation, sanity testing, smoke testing and few others … are not familiar to you … this is definitely NOT A GOOD THING. I hope my workmates won’t swear me when reading this 🙂

Before starting I think it is worthwhile to answer some basic questions: What is simulation about and why is it necessary? As far as I know from my personal work experience but also from digging for information on google, simulation is good to speed the software development lifecycle and implicitly to reduce project’s overall costs. In embedded systems you can test either software, either hardware. One way would be to deploy the corresponding embedded software and to see it at work in its environment. For example if you developed some anti-lock braking software you can wait for the ECU controller to come out of the production line, then to deploy it and finally to see it at work when the ECU is placed on the car.

For sure this is a very costly procedure, you have to wait for the environment to be ready (ECU controller, ECU network within the car, the car) and only after this you can begin checking if your software really does what was designed for. On the other hand you could be a hardware engineer and you would like to the test the ECU (if it correctly reads the sensors, if correctly activates the actuators, mainly electrical tests). It would be very difficult for you to wait for a car prototype to be ready and to test the ECU directly on car. It would be very helpful, for the software as well as for the hardware tester to have a platform to reproduce the physical environment where your Design Under Test will be implemented.

Read more of this post

What is the difference between embedded system and real-time system?

As a first incomplete answer I would say that real-time systems are an important subset of embedded systems. Generally speaking any real-time system is also an embedded system, as well as any RTOS is considered to be also an embedded OS.

Now, the second point would be to define an embedded system and afterwards to trace a line in between real-time systems and rest of embedded systems.

Embedded systems…. what are they? I read many columns and articles on the Internet claiming that it is more appropriate to say which “piece of computing” is NOT an embedded system.

Actually around 90% of microprocessors are manufactured for the embedded industry, so AMD and Intel cores found in our notebooks or desktops are just the tiny top part of the iceberg.

Clearly all kind of PC’s, ranging from desktops, to servers, to notebooks and so on, are not embedded systems. All of those are general purpose computers serve for browsing on the Internet, for audio/video streaming, for text editing, for performing sophisticated math computations and many, many different and complex tasks. Another thing which can be said about PC is that they rarely interact with the environment, usually they receive inputs from the user, via the keyboard, or from another computer via a LAN card.

Read more of this post