I need to add a clock to my module
is there a example of how the “ticks” are programmed in C?
thank you
I need to add a clock to my module
is there a example of how the “ticks” are programmed in C?
thank you
You can use a timer interrupt
or sleep
functions in C for basic ticking. For QSPICE, check if it supports timed events
or a clock
function in the simulation. Here’s a quick example using sleep
in C:
#include <unistd.h>
while(1) {
sleep(1); // Ticks every second
}
This is what spawns that basic tick every second. The should have some options in QSPICE for exact simulation timing!
Hi, Fausto. Welcome to the forum.
If I understand your request, you want to implement a clock signal for a C-Block component. There are two approaches:
Hope that helps.
–robert