I'm new to Verilog. Can someone suggest a learning resource, book, video, blog, anything that they had a good personal experience with and helped them learn it faster?
If it helps, I have experience programming in several high-level languages, but have no experience programming in C.
Thanks
...
I'm getting into microcontroller programming and have been hearing contrasting views. What language is most used in the industry for microcontroller programming? Is this what you use in your own work? If not, why not?
P.S.: I'm hoping the answer is not assembly language.
...
Here's the code that I use to create a differently ordered array:
const unsigned int height = 1536;
const unsigned int width = 2048;
uint32_t* buffer1 = (uint32_t*)malloc(width * height * BPP);
uint32_t* buffer2 = (uint32_t*)malloc(width * height * BPP);
int i = 0;
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++)
...
I want to restrict microsoft visual studio so that it can only run "C99" (ANSI C) code. Can any one give me some guideline?
...
i was running a small c program:
#include<stdio.h>
int main()
{
char *p;
p = (char *)malloc(10);
free(p);
free(p);
free(p);
printf("\npointer is freed!!\n");
}
basically i am freeing the memory which has already been freed.
i think should result in a core dump!!is it not so?
but it is printing the
pointer is freed!!
am i wrong so...
Howdy,
I am trying to generate keyboard keydown and keyup events programmatically. I am currently using CGPostKeyboardEvent to do this, but I am searching for a way to do this at a lower level. I have looked at DDHidLib but could not figure out a way to create a fake event. Can anyone help?
update:
Thanks to weichsel's advice I am...
In Win32 API, there is CopyFile that literally copies a file. However, this API doesn't create folders. For example, I'd like to copy C:\Data\output.txt to D:\Temp\Data\output.txt. But, the target folders, D:\Temp and D:\Temp\Data', do not exist. In this case, this API just fails.
Is there a handy API that can automatically and recursiv...
My wxwidgets program does not allow the computer to shutdown when the user clicks on Shutdown. I had issues with exiting the program normally so I've been calling exit() directly instead of deleting the top window as wxwidgets says to do. The exit workaround has been working but it seems wxwidgets can't exit when it receives shutdown win...
Theoretically I can say that
free(ptr);
free(ptr);
is a memory corruption since we are freeing the memory which has already been freed.
But what if
free(ptr);
ptr=NULL;
free(ptr);
As the OS will behave in an undefined manner I cannot get an actual theoretical analysis for this about what's happening.
Whatever I am doing, is th...
HI all.
I have started a new job recently where I am supposed to work with C++/ I have been doing programming in C language for past 5 years. I am looking for ways to get me up to an acceptable level in OOP. I have all the basic concepts of C++ and OOP but don't have much experience of actual class designing.
What I really am looking for...
We have a topdirectory containing code for lots of different projects. I would like to create an Eclipse CDT-project that contains only the source needed to work on and compile a specific project. I used SlickEdit before, and there I could just import a list of sources and headers. Is it possible to achieve something similar in Eclipse?
...
Hi
I'm trying to get my java client to communicate with a C server using SSL.
The problem is - I don't have any server sources and I'm getting a handshake failure error:
Exception in thread "main" javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException...
hey.
im trying to use 2 threads running simultaneously and both using FileMapping feature to map a file on memory via different handles.
problem is the MapViewOfFile function sometimes allocates the mapping on both threads to the same offset of memory.
i tried using mutex on those parts, but it seems after high usage i fail to write to t...
Where can I find open source c code for RTOS?
...
Hello,
Visual Studio 2008 C
What I can't understand about this linked list is the adding to the tail in the else part of the if statement.
When the head and tails is assigned the memory address of the node_temp to both tail and head both point to the same memory location.
However, in the else part is the head in fact still pointing ...
Rather than sending an actual pointer to a value, the value is cast to a pointer. I found these examples in the GUI interface code of a GTK program.
g_signal_connect (pastebutton[pane],
"clicked",
G_CALLBACK(on_paste_button_pressed),
(void*)((long)pane<<4));
In the above example, I...
I've been reading Ulrich Drepper's, "What every programmer should know about memory" and in section 3.3.2 Measurements of Cache Effects ( halfway down the page ) it gives me the impression that accessing any member of a struct causes the whole struct to get pulled into the CPU cache.
Is this correct? If so, how does the hardware know a...
Hi all,
typedef struct
{
struct table **symbols; // array of the stack
int top; //index of the top element
int size; //maximum size of the stack
}stack;
void *createStack(int size)
{
stack *stck;
stck = (stack *) malloc(sizeof(stack));
stck->symbols = ....
stck->size = size;
stck->top = -1;
printf("stack is created...
I have written a C++ library that saves my data (a collection of custom structs etc) into a binary file. I currently use (i.e. CREATE and CONSUME) the files locally, on my Windows (XP) machine. For simplicity, lets think of the library in two parts: a WRITER (Creates the files) and a READER or CONSUMER (simply reads data from the files)....
chars in 'C' are used to represent characters.
Numbers representing characters in all code pages are always positive.
What is the use of having signed characters?? Are negative values contained in chars used only as integral values in a smaller integral data-type than int and short?? Do they have no other interpretation??(like positiv...