Saturday, May 30, 2026

கல்லூரிக்காலங்கள் - 1

கல்லூரிக்கால சம்பவம் ஒன்று.

கல்லூரி மூன்றாம் வருடம். காவேரி இல்லத்தில் Final year seniorsக்கு ஒதுக்கியது போக, மீதிருக்கும் தனி அறைகளை Third yearsக்கு ஒதுக்குவது வழக்கம். சில நண்பர்களின் ஆலோசனையின் பேரில், நானும் "பொருநை"யிலிருந்து காவேரியில் தனி அறைக்கு குடிபெயர்ந்து விட்டேன்.

காவேரியில் நுழைவாயிலின் இருபுறமும் செவ்வக வடிவிலான வெராந்தாவை சுற்றி வெளிப்புறமாக அறைகள் அமைந்திருக்கும். வெராந்தாவிலிருந்து நடுவில் OTSல் இறங்கி, மேல்நோக்கி சுற்றி பார்த்தால், மூன்று மாடி அறைகளும் அதற்கு மேல் வானத்தையும் பார்க்கலாம். தரைத்தளத்தில் அறைகள் எமக்கு ஒதுக்கப் பட்டிருந்தன.

Third year, second semester, study holidays சமயம் அது. Seniors எல்லோரும் Final semesterஐ  முடித்துவிட்டு, ஹாஸ்டலை காலி செய்து விட்டு , சென்று விட்டதால் பெரும்பாலான அறைகள் காலியாக, ஹாஸ்டலே வெறிச்சோடி கிடந்தது. நம்மாட்களும் பலர் வீட்டுக்கு சென்று விட்டதால், ஹாஸ்டலில் நம் ராஜ்ஜியம்தான். பொழுது போகவில்லை என்றால், மூன்று மாடிகளும் சுதந்திரமாய் சுற்றி, எந்த அறையிலும் நுழைந்து, சில அறைகளின் சுவர்களில், Seniorsன் கலை நயத்தை கண்டு ரசிக்கலாம்.

சம்பவத்தன்று இரவு. Messல் சப்பாத்தி மற்றும் தயிர் சாதம். எனக்கு பிடிக்காத Combination. சப்பாத்தியுடன் தயிர் சாதத்தை இறக்கியதில், ஊறிய சப்பாத்தி செரிக்காமல் "மந்த்" என்று, படிப்பும் ஏறாமல், தூக்கமும் வராமல், அறைக்கு வெளியில் வந்து பார்த்தால் எவனையும் காணோமே! எங்க போனானுங்க, இந்த "ஆடு, குதிரை, தவுலு எல்லாம்.."! சரி, தனியா ஏதாவது விளையாடுவோம். OTSல் கிடந்த, நம்மாட்கள் வெட்டிப் போட்ட பனங்காய்கள் கண்ணில் பட, பந்து போல உயர எறிந்து விளையாண்டு பார்ப்போம். ஒரு காயை எடுத்து உயர விட்டேன். கனமாய் இருந்தாலும், சல்லென்று மேலே சென்று, இருளில் மறைந்து, சில வினாடிகளில், தொம்மென்று தரையில் விழுந்தது. "விளையாட்டு நல்லாத்தேன் இருக்கு.. இன்னொன்று விடுவோம்". எதையும் எதிர்பாராத அந்த கணம், "டமால்" என்று பெரிய கண்ணாடி வெடித்து நொறுங்கிய சத்தம். அது அடங்குவதற்குள், "ட்ட்ட்ட்ட்ட்டாடாடாடாடாடாய்ய்ய்ய்ய்ய்" என்று அடித் தொண்டையிலிருந்து ஒரு பெரிய அலறல்.  அக்கணத்திலேயே எல்லாம் அடங்கி வெறும் நிசப்த்தம்.

 ஒன்றுமே புரியாத அக்கணத்தில், என் கால்கள் அனிச்சையாக வெராந்தாவில் தாவி, அறைக்குள் நுழைந்தன. ஒரு கணம் மூச்சே நின்று, இதயம் படபடப்பை கிளப்ப, "போச்ச்சு.. ஏதோ பெரிய விபரீதம் நிகழ்ந்து விட்டது. கடவுளே! போய் பார்க்கலாமா.." என்று பலவாறு பதட்டடத்தில் நின்று கொண்டிருக்கும்போது, "டொக் டொக்" கதவு தட்டும் சப்தம். திறந்தால், பக்கத்து ரூம் Civil நண்பன் முகத்தில் அதிர்ச்சியுடன் நிற்கிறான். "மாப்ள! இங்க யாராவது வந்தாங்களாடா?" என்று கேட்க, "இல்லையேடா..என்னாச்சிடா" என்று நான் கேட்டேன். "என்னை யாருமே கண்டுபிடிக்க கூடாதுன்னு, மூனாவதும் மாடில, ஒரு ரூம்ல உக்காந்து படிச்சிட்டு இருந்தேண்டா.. என்னாச்சின்னே தெரியல. கரெக்ட்டா அந்த ரூம் ஜன்னல் டாமால்ன்னு வெடிச்சதுல, செமயா பயந்துட்டேன்டா!" என்று அவன் சொல்ல, "அடேய், நீதானா அது.. ஏதும் அடி படல இல்ல" என்று கேட்டுவிட்டு, நடந்ததை நான் விவரிக்க, "உன் வேலைதானா அது" என்று அவன் கேட்க, அதுவரை இருந்த அதிர்ச்சி சிரிப்பாய் மாறி, எதேச்சையாய் நடந்த இரு நிகழ்வுகளை நினைத்து நினைத்து சிரிப்பு அடங்க வெகு நேரமாயிற்று.

"நேராதான் போச்சு.. Parabolic ரூட்ல போயி, எப்படி அது அந்த ரூம் ஜன்னல்ல அடிச்சிச்சின்னு தெரியல" என்று, அந்த நிகழ்வை என் குழந்தைகளிடமும் பகிர்ந்தது உண்டு.

அந்த Civil நண்பனுக்கு ஞாபகம் உள்ளதா இல்லையா என்று தெரியவில்லை.

Tuesday, March 18, 2025

mozhik kolgai

ஜெமோ சொல்ல வருகின்ற உட்கருத்து சற்று ஆழமானது. குறைந்தபட்ச செயல் திட்டத்துடன் ஓடிக்கொண்டிருக்கும் நம் சமுதாயத்தில் ஒரு ஆழமான அறிவுசார் தேடலை வலியுறுத்திக் கொண்டிருக்கிறார். அதை பின்பற்ற முடிகிறதோ, இல்லையோ, அவர் கருத்தை உள்வாங்கிக் கொள்ளக்கூடிய அளவுக்கு அனுபவமும் முதிர்ச்சியும் பலருக்கு இருக்கிறதா என்பதே சந்தேகம்தான்.

ஒரு நல்ல Japanese TV program பார்த்ததுண்டு. Beauty parlor-ல் பயன்படுத்தக் கூடிய Plucker செய்வதில் கைத்தேர்ந்த ஒருவர், தனி ஆளாக குடிசைத் தொழில் போன்று செய்து கொண்டிருக்கிறார். தனது தயாரிப்பு எதுவரை விற்றுக்கொண்டிருக்கிறது என்ற ஆராய்ச்சி கூட இல்லாமல் தனக்கே உரிய வெகுளித்தனத்துடன் நேர்த்தியாக செய்து கொண்டிருக்கிறார். அந்த TV program வழியாக, இத்தாலி நாட்டிலிருக்கிற ஒரு beautician (customer), தான் அந்த Pluckerஐ பயன்படுத்துவதாகவும் அதைப் பயன்படுத்தும் பொது தனது வாடிக்கையாளர் எந்த அசௌகரியத்தையும் உணர்வதில்லை எனவும், அதன் நேர்த்தியைக் கண்டு வியந்து பாராட்டி, "நான் உள்ளவரை தங்களுடைய தயாரிப்பு எனக்குத் தேவை. தயவு செய்து நீங்கள் செய்வதை மட்டும் விட்டு விடாதீர்கள். நீங்களும் எனது தொழிலும் ஒருவரை ஒருவர் சார்ந்திருக்கிறோம்." என்று கூறுகிறார். என்னமோ செய்துகொண்டிருக்கிறார் என்று நினைத்துக் கொண்டிருந்த அவரது பிள்ளைகள் கூட அப்போதுதான் தன் தந்தை எப்படிப்பட்ட நேர்த்தியான தயாரிப்பை செய்து கொண்டிருக்கிறார் என்று தெரிந்து தன் தந்தையை வியப்புடன் பார்க்கும்போது, அவரது கண்களில் கண்ணீர் துளிர்க்கிறது.

எனக்குள் அப்போது பல கேள்விகள். "இன்றைக்கு இதைப் படித்தால்தான், நாளை பிழைக்க முடியும். நாளை அதை செய்தால்தான் நாளை மறுநாள், இப்படி இருக்க முடியும்", என்று விடையில்லாத ஒன்றை துரத்திக்கொண்டு ஓடிக்கொண்டிருக்கிறேனா? வாழ்க்கை முழுவதும் இப்படித்தான் ஓடிக்கொண்டிருக்கப் போகிறேனா? இது ஒரு கோழைத்தனமாக படவில்லையா? எப்போது, நின்று நிதானித்து, சிலவற்றை ரசித்து, அடுத்த வேளை சோற்றைப் பற்றி கவலைப்படாமல் ஒரு வீரனாக நின்று, பிடித்தவற்றை செய்யப் போகிறேன், இவர்களைப் போல? என்றெல்லாம் கேள்விகள். இந்த அனுபவத்தில், ஜெமோவின் ஆதங்கமும் எனக்குப் புரிகிறது.

Topic க்குள் வருகிறேன். இன்றைக்கு சென்னையில் 'நாசூக்'காக வாழக்கூடியவர்கள் என்று பார்த்தால், பெரும்பாலும், தமிழ் பேசக்கூடிய வடமாநிலத்தவர் (குறிப்பாக, மார்வாடிகள்) மற்றும் அரைகுறை ஹிந்தியில் பேசி (ஹிந்தி தெரியாத எனக்கே தெரிகிறது, அவரது ஹிந்தி அரைகுறை என்று) வடமாநிலத்தவரை வேலை வாங்கும் நம்மாட்கள் (குறிப்பாக, மேஸ்திரிகள்) தான். சென்னையில் கூட இது சகஜம் என்றாலும், இன்றைய நிலைமையில், ஒரு நாளைக்கு இரண்டு முறை மட்டுமே பேருந்து செல்லும் கிராமங்களில் கூட வடமாநிலத்தார் ஊடுருவி விட்டதைப் பார்க்கும்போது, "The Great Cultural Infusion" என்றுதான் சொல்லத் தோன்றுகிறது. உலகளாவிய பொருளாதார மந்த நிலையிலும், இந்திய பொருளாதாரம் உயிர்ப்புடன் இருக்கிறது என்றால், இந்த "vibrant labour market" தான் காரணமோ என்றுகூட எனக்குத் தோன்றும். 

இப்படி, நமது ஒட்டுமொத்த சராசரி சமுதாய சிந்தனையும் கூட, பெரிய படைப்பாக்கங்களிலோ, சமுதாயப் பங்களிப்புகளிலோ, ஆழமான அறிவிலோ கவனம் செலுத்தவில்லை. மாறாக, அரசாங்கமும் சமுதாயமும் "பிள்ளைகளை இதைப் படிக்க வைத்தால், அந்த வேலையில் அமர்த்தி விடலாமா? அயல்நாட்டுக் கம்பெனிகளிடம் அடிமாடுகளை போல விற்றாவது "5000 பேருக்கு வேலை" என்று கணக்கு காண்பிக்கலாமா? இந்த மாதிரி வீடியோ போட்டால் ஏதாவது பிழைப்புக்கு ஆகுமா?" என்ற அளவில்தான் சிந்திக்கிறது. Skill devemopment, அயல் மொழிகளைத் திணிப்பது எல்லாமே இந்த அளவில்தான். "நம் மக்களுக்கு வேலைக்கிடைத்து விட்டது" என்ற குறைந்த பட்ச செயல்திட்டத்துடன் பார்த்தால், குறை சொல்லத் தோன்றவில்லை. It is better that atleast they create the awareness. அதில் சில பல அறிவுஜீவிகளும் உருவாகலாம். அதற்காக, வலுக்கட்டாயமாக திணிக்க வேண்டியதில்லை.

Saturday, December 7, 2024

Cubicle to Creative Freedom: Work Smarter, Live Your Passion

 “Cubicle to Creative Freedom: Work Smarter, Live Your Passion”


The idea of pursuing your passion often feels like a dream reserved for a lucky few. But with the right mindset, strategy, and approach, it can become a reality for anyone willing to step outside the traditional 9-to-5 mold. The key is not just working hard but working smart.

1. Identify and Monetize Your Passion:
Understand what excites you and how it can solve a problem or add value. Research ways to monetize it, like freelancing, creating digital products, or offering services.

2. Set Clear Goals:
Break your vision into actionable steps. Use SMART goals to stay focused and track progress.

3. Leverage Technology:
Use tools and platforms to market your skills, automate repetitive tasks, and explore passive income streams like online courses or affiliate marketing.

4. Keep Learning and Networking:
Refine your skills and connect with like-minded professionals or mentors to stay inspired and expand opportunities.

5. Transition Strategically:
Start small—work on your passion alongside your current job. Scale gradually and create a financial safety net before making the leap.

6. Maintain Balance:
Build systems that allow you to work sustainably, prioritize tasks, and avoid burnout.

Pursuing your passion is about designing a career that aligns with your ‘life purpose’. Start small, work smart, and make the shift on your terms.

What’s your first step toward working smarter on your passion? Share your thoughts below!

Monday, November 4, 2024

maima

வணக்கம். சில நேரங்களில் பெங்களூரில் நடக்கும் நிகழ்வுகளை கேட்கும் போதெல்லாம், மிகவும் வேதனையும் கவலையும் அடைகிறேன். ஆனால், ஒருவரையொருவர் குறை கூறிக் கொண்டிருப்பதால் ஒரு நல்ல குடும்பத்தை உருவாக்க முடியாது என்பதை மிகவும் உறுதியாக நம்புகிறேன். அடுத்தவருடைய பிரச்சினைகளை புரிந்து கொள்வதிலும், அடுத்தவருடைய தவறுகளையும் இயலாமையையும் மன்னித்து விடுவதிலும்தான் ஒரு குடும்பத்தை உருவாக்க முடியும் என்பதை அனுபவ பூர்வமாக கண்டு கொண்டிருக்கிறேன். எனவே, யாரிடம் பேசினாலும், முடிந்தால் நல்ல அறிவுரையை, நேர்மறையான சிந்தனையை சொல்கிறேன். இல்லை என்றால், பேசாமல் இருப்பதே மேல் என்று விட்டு விடுகிறேன்.

மேலும், நான் குடும்ப விஷயங்களில் அனுபவம் இல்லாதவன் என்பதால், இந்த சூழ்நிலையில் பேசாமல் இருப்பதையே விரும்புகிறேன். இரண்டு பக்கமும் என்னைவிட வயதில் முதிர்ந்தவர்கள், அனுபவம் அதிகம் உடையவர்கள் இருக்கிறீர்கள். எனவே, தங்களுடைய குடும்ப விஷயங்களில், சூழ்நிலையை நன்றாகவே புரிந்து கொண்டு, நேரிடையாக பேசி, நல்ல முடிவுகளை எடுப்பீர்கள் என நம்புகிறேன். மேலும், தங்களுடைய இந்த குடும்ப விஷயத்தில் என்னுடைய கருத்தை திணிப்பதற்கு, யாரிடமும் எனக்கு எந்த உரிமையும் இல்லை என்பதையும் புரிந்து வைத்துள்ளேன்.

என்னைவிட வயது முதிர்ந்தவர்களை மதிப்பவன் நான். அவர்களுக்கு என்னை விட உலகத்தை பற்றிய அனுபவம் அதிகமாக இருக்கும். மேலும், என்னுடைய சூழ்நிலையே எல்லாருக்கும் இருக்காது. ஒவ்வொருவருடைய சூழ்நிலையும் ஒவ்வொன்றானது. ஆகவே, அறிவுரையாக இல்லாமல், இந்த கால கட்டத்தில், என்னுடைய சொந்த சிந்தனையை, புரிதலை முன் வைக்கிறேன்.


Wednesday, March 6, 2024

NIOS Porting steps

BSP Creation

(a0 and t2 registers could not be written or read correctly in Nios V/m)

1) Patch files created with reference to
C:\intelFPGA_pro\23.2\ip\altera\soft_processor\altera_hal2\HAL
and updated the same with script file using the $QUARTUS_ROOTDIR.
Administrator rights is necessary.

2) sample BSP creation testing..
with reference to \top_project\readme.txt, in NIOS V command shell, the following commands are executed. Some projects need "quartus_py scripts/build_sof.py" command to avoid NIOS V cpu is not specified in the hardware project.

i) niosv-bsp -c --quartus-project=hw/top.qpf --qsys=hw/sys.qsys --type=hal sw/bsp_smp/settings.bsp
ii) niosv-app --bsp-dir=sw/bsp_smp --app-dir=sw/app_smp --srcs=sw/app_smp/hello.c
iii) niosv-shell
iv) cmake -S ./sw/app_smp -G "Unix Makefiles" -B sw/app_smp/build
v) make -C sw/app_smp/build
vi) Program the FPGA using programmer
vii) using separate shell, "juart-terminal -c 1 -i 0"
viii) niosv-download -g sw/app_smp/build/app_smp.elf -c 1

BSP Build using the MACRO defined

add_definitions(-DXXXXx)






TCL programming: Check the NIOS V Processor Developer Handbook itself.

Monday, February 19, 2024

NIOS V OS porting

 First Interrupt Execution Flow:

C:\intelFPGA_pro\23.2\ip\altera\soft_processor\intel_niosv_common\HAL\src\machine_trap.S is copied to bsp generated in project folders:

C:\test\top_project\sw\bsp_freertos\HAL\src\machine_trap.S

C:\test\top_project\sw\bsp_ucosii\HAL\src\machine_trap.S

trap_vector:

        :

save_registers:
    /* Save caller-saved registers on the stack */
#if ALT_CPU_NUM_GPR == 32
    addi sp, sp, -16 * 4
    sw a6, 10 * 4(sp)
    sw a7, 11 * 4(sp)
    sw t3, 12 * 4(sp)
    sw t4, 13 * 4(sp)
    sw t5, 14 * 4(sp)
    sw t6, 15 * 4(sp)
#else // 16 (RV32E)
    addi sp, sp, -10 * 4
#endif
    sw ra,  0 * 4(sp)
    sw t0,  1 * 4(sp)
    sw t1,  2 * 4(sp)
    sw t2,  3 * 4(sp)
    sw a0,  4 * 4(sp)
    sw a1,  5 * 4(sp)
    sw a2,  6 * 4(sp)
    sw a3,  7 * 4(sp)
    sw a4,  8 * 4(sp)
    sw a5,  9 * 4(sp)
   
    /* Call handle_trap to dispatch the correct handler, if available */
    csrr a0, mcause
    csrr a1, mepc
    csrr a2, mtval
    jal handle_trap
    csrw mepc, a0
        :

top_project\sw\bsp_ucosii\HAL\src\alt_irq_handler.c
top_project\sw\bsp_freertos\HAL\src\alt_irq_handler.c
alt_u32 handle_trap(alt_u32 cause, alt_u32 epc, alt_u32 tval)

{

    alt_u32 is_irq, exception_code;

    is_irq = (cause & NIOSV_MCAUSE_INTERRUPT_MASK);
    exception_code = (cause & ~NIOSV_MCAUSE_INTERRUPT_MASK);

    if (is_irq) {
        switch (exception_code) {
            case NIOSV_TIMER_IRQ:
            {
                if (alt_niosv_timer_interrupt_handler) {
                    ALT_OS_INT_ENTER();
                    alt_niosv_timer_interrupt_handler(cause, epc, tval);
                    ALT_OS_INT_EXIT();
                }
                break;
            }
            case NIOSV_SOFTWARE_IRQ:
            {
                if (alt_niosv_software_interrupt_handler) {
                    ALT_OS_INT_ENTER();
                    alt_niosv_software_interrupt_handler(cause, epc, tval);
                    ALT_OS_INT_EXIT();
                }
                break;
            default:
            {
                if (exception_code >= 16) {
                    alt_irq_handler();
                } else {
                    ALT_LOG_PRINTF("invalid exception code: %d, epc = %d, tval = %d\n", exception_code, epc, tval);
                }
                break;
            }
                    :
/*
 * A table describing each interrupt handler. The index into the array is the
 * interrupt id associated with the handler. 
 *
 * When an interrupt occurs, the associated handler is called with
 * the argument stored in the context member.
 */
struct ALT_IRQ_HANDLER
{
  void (*handler)(void*);
  void *context;
} alt_irq[ALT_NIRQ];

/*
 * alt_irq_handler() is called by the interrupt exception handler in order to 
 * process any outstanding interrupts. 
 *
 * It is defined here since it is linked in using weak linkage. 
 * This means that if there is never a call to alt_irq_register() then
 * this function will not get linked in to the executable. This is acceptable
 * since if no handler is ever registered, then an interrupt can never occur.
 */
void alt_irq_handler (void)
{
    alt_u32 active;
    alt_u32 mask;
    alt_u32 i;

    /*
     * Notify the operating system that we are at interrupt level.
     */  
    ALT_OS_INT_ENTER();
                        :
                alt_irq[i].handler(alt_irq[i].context); 
                        :
    /*
     * Notify the operating system that interrupt processing is complete.
     */ 

    ALT_OS_INT_EXIT();
}

There seems to be a major difference between FreeRTOS and uCOS II in interrupt handling that FreeRTOS seems to be calling BSP's handle_trap() from its own trap_vector instead of you provide the ALT_OS_INT_ENTER/ALT_OS_INT_EXIT() for the BSP's trap_vector() and handle_trap(). Check that as it would be better for you.

top_project\sw\bsp_freertos\HAL\src\os_cpu_c.c

/* handle_trap() and alt_tick() are Intel HAL function. */
extern alt_u32 handle_trap( alt_u32 cause, alt_u32 epc, alt_u32 tval );
extern void alt_tick( void );

#define HAL_HANDLE_TRAP();  alt_u32 ulMCAUSE = 0, ulMEPC = 0, ulMTVAL = 0;           \
                          __asm volatile( "csrr %0, mcause" : "=r"( ulMCAUSE ) );  \
                            __asm volatile( "csrr %0, mepc" : "=r"( ulMEPC ) );      \
                            __asm volatile( "csrr %0, mtval" : "=r"( ulMTVAL ) );    \
                            ulHalNestedInterruptCounter++;                           \
                            handle_trap(ulMCAUSE, ulMEPC, ulMTVAL);                  \
                            ulHalNestedInterruptCounter--;                           \

/* Hook for tick. To use this, configUSE_TICK_HOOK must set to 1 */
void vApplicationTickHook( void )
{
    /* ALT_LOG - see altera_hal/HAL/inc/sys/alt_log_printf.h */
    ALT_LOG_SYS_CLK_HEARTBEAT();

    ulHalNestedInterruptCounter++;
    alt_tick();
    ulHalNestedInterruptCounter--;
}
                        :
/* Override weak function defined in portASM.S */
void freertos_risc_v_application_interrupt_handler( void )
{
   HAL_HANDLE_TRAP();
}

/* Override weak function defined in portASM.S */
void freertos_risc_v_application_exception_handler( void )
{
   HAL_HANDLE_TRAP();
}

freertos_risc_v_trap_handler  is assigned as Vector Base Address in mtvec register.

│Installing the FreeRTOS trap handler

│The FreeRTOS trap handler is called freertos_risc_v_trap_handler() and is the central
entry point for all interrupts and exceptions.


top_project\sw\bsp_freertos\FREERTOS\inc\os\alt_hooks.h
#define ALT_OS_INIT()           alt_envsem = xSemaphoreCreateCounting(1, 1);                                \
                                alt_heapsem = xSemaphoreCreateCounting(1, 1);                               \
                                extern void freertos_risc_v_trap_handler( void );                           \
                                __asm__ volatile( "csrw mtvec, %0" :: "r"( freertos_risc_v_trap_handler ) )































Friday, September 15, 2023

Intel NIOS V Resources


Nios V/m software development


-- 39 ----
8. Jumps to alt_main()—The processor jumps to the alt_main() function, which begins initializing the HAL BSP run-time library.

Note: If you use a third-party RTOS or environment for your BSP library file, the alt_main() function can be different than the one provided by Intel.

---- 40 ----
The HAL alt_main() function performs the following steps:
 1. Initializes interrupts—Sets up interrupt support for the Nios V processor with the alt_irq_init() function.
 2. Starts MicroC/OS-II—Starts the MicroC/OS-II, if this OS is configured to run (with the ALT_OS_INIT and ALT_SEM_CREATE functions). For additional information about MicroC/OS-II use and initialization, refer to Selecting the Operating System.

 ----
3.4.3.1. Timer Devices The HAL provides two types of timer services, a system clock timer, and a timestamp timer. • The system clock timer is used to control, monitor, and schedule system events. • The timestamp variant is used to make high performance timing measurements. You can assign each of these timer services to the Nios V processor internal timer or an Intel Avalon Timer peripheral. Note: Nios V processor core includes a timer that provides both the system clock timer and timestamp services.

----
The HAL system initialization process calls the MicroC/OS-II function OSInit() before
alt_sys_init(), which instantiates and initializes each device in the system.
Therefore, the complete MicroC/OS-II API is available to device drivers, although the
system is still running in single-threaded mode until the program calls OSStart()
from within main().
----

C:\intelFPGA_pro\23.2\nios2eds\components\micrium_uc_osii\UCOSII\inc\os


9.3.5. Interrupt Service Routines for MicroC/OS-II
Implementing ISRs for MicroC/OS-II normally involves some housekeeping details, as
described in MicroC/OS-II: The Real-Time Kernel. However, because the Nios V
implementation of MicroC/OS-II is based on the HAL, several of these details are
taken care of for you. The HAL performs the following housekeeping tasks for your
interrupt service routine (ISR):
• Saves and restores processor registers
• Calls OSIntEnter() and OSIntExit()
The HAL also allows you to write your ISR in C, rather than assembly language.


 

Tuesday, July 25, 2023

Math olympiad

 “In terms of Olympiad Math, I am mostly self-taught. Ever since grade 10, I have been doing Olympiad Math, through the Art of Problem Solving website, classes on the Online Math Club and handouts by Evan Chen, a past Olympiad medallist. I won a gold medal and placed 12th overall in this year’s event,” said Atul.

He got a perfect score of 1600 on the SAT last year and he will be continuing my future studies, doing Mathematics and Computer Science at the Massachusetts Institute of Technology, USA. “I am also the director of the Sophie Fellowship, an initiative to prepare Indian students for Math Olympiads by showing them its beauty. With this, I also hope to reach out to more students in India, most of who are unaware of the prospects mathematics holds as a career,” he added.“In terms of Olympiad Math, I am mostly self-taught. Ever since grade 10, I have been doing Olympiad Math, through the Art of Problem Solving website, classes on the Online Math Club and handouts by Evan Chen, a past Olympiad medallist. I won a gold medal and placed 12th overall in this year’s event,” said Atul.

He got a perfect score of 1600 on the SAT last year and he will be continuing my future studies, doing Mathematics and Computer Science at the Massachusetts Institute of Technology, USA. “I am also the director of the Sophie Fellowship, an initiative to prepare Indian students for Math Olympiads by showing them its beauty. With this, I also hope to reach out to more students in India, most of who are unaware of the prospects mathematics holds as a career,” he added.


Wednesday, May 31, 2023

ProSolutions

Problem 1:

When testing sending serial text file through terminal, the serial task id is changed with idle task. I doubted that any interrupt occurs inside the critical section.

Solution: Inside the SVC, interrupt occured. The SVC priority setting was wrong. Instead of higher priority, lowest priority was set. So, interrupt occured inside. Just check any changed done in code.


Problem 2:

When _dispatch? function is step-executed using EWARM in Cortex-M0+ kernel till the end of the function and run, hardfault exception occurs.

Solution: The Cortex-M0+ kernel is using PendSV and the exception does not jump to PendSV_Handler while step-executing even when PendSV request is pending. When you run, the PendSV occurs in unexpected location and the PendSV handler performs the context switch and returns assuming the original location, the register values might have corrupted. So, excetion occurs. Thus, this does not mean the software issue, instead the debugger setting maybe, to allow branching to PendSV handler immediately.

Problem 3:

Abort at the entrance of MainTask in Arm. There are no specific instructions causing them.

Solution: Acutally, in the CPSR, the A flag which Disables the Asynchronous Aborts has delayed the abort exception from the actual location of abort. So, try to Make the A flag to 0 at starting of the program, so that you can find the exact location and cause. In Cortex-A52, the master MPU program needs to be done from CPU0. Since I tried to program it in CPU1, it caused it. But, since inside the kernel, the A flag was 1, it did not occur there. Once entered MainTask with A flag 0, it caused exception.

Problem 4:
I was trying to FPGA program the Agilex 7 F series evaluation board. But, it failed.

Solution: Installed the Agilex 7 device support. After that I could program the FPGA using the board test software (BTS) provided .sof files. But, not my own .sof. Because when looking at the design provided by FPGA design store, it was for another board of same Agilex 7 F device. Look carefully at the board type.

Problem 5:
When debugging Nios V, the exeuction goes to Enviornment call easily, though there is no interrupt enabled at that point.

Solution: Do not doubt the interrupt. That means it is exception. Please check mepc register to know about from where the exception occurred.

Monday, October 3, 2022

Cortex-M Hardfault exception Debug

 https://interrupt.memfault.com/blog/cortex-m-fault-debug

Some of the things found when using CubeIDE with nasam.

1) No Timer Interrupt/ No branch to task

As the vector table and remapped vector table are same and vector table is placed in ROM, the define interrupt function does not register the Timer interrupt.

Since some other function svc handler was linked without using yours, the SVC which is used to branch was not at all working


2) After using miine, there was an exception.

Since the `type` property of function was not used in the assembly, the SVC hander was not added +1 for Thumb mode. So, after jumping there, the Hardfault hander was raised.


Sunday, September 4, 2022

Consultancy services

A trusted consultant and service provider for business engagement and tourism in Tamil Nadu and Pondicherry region.

Services on business engagement:
・Company Registration
( 法人登記)
・(Virtual) Office setup
(  バーチャルオフィス )  
・Shared (Plug And Play) Office
(  シェアオフィス )  
・Logistics
(  ロジスティクス )  
・Import and Export
(  輸入/輸出 )  
・Business Partnership
(  ビジネスパートナーシップ )  

Services on Tourism:
・Luggage Handling
(  荷物扱い )  
・Luggage/Baggage Storage
(  手荷物預り )  
・Accommodation Arrangement
(  日本語が話せる宿泊施設 )  
・Airport Reception/Pick-up
(  空港お迎え )  
・Introductory Lessons for first time tourist
(  初めてのご旅行者にご紹介レッスン )  
・Tour guidance
(  ツアーご案内  )  
・Remote Tour Guidance
(  リモートでお客様サポート )  
・Refresh cafe
(  到着後・出発前にリフレッシュできるカフェ )  

Technology Services:

・Embedded Development
 (  組み込み開発)
・Japanese Translation and Interpretation
 ( 日本語翻訳、通訳)
・Technical Support
  ( 技術サポート)
・Distributor
  (販売代理店)

We endeavor to create a better friendly and trusted India.

Sempori Consulting - Mannivakkam

A trusted organisation for training Engineers on developing Software, Firmware, Middleware and Real-Time Operating Systems for Embedded Systems.

Special features of our training:

・Acquire hands-on experience in developing software for various CPU architectures such as Arm, PowerPC, MIPS, RX, SuperH, H8 and MicroBlaze

・Learn programming on Intel and Xilinx FPGA platforms

・Work on various evaluation boards from NXP, Renesas, Texas Instruments, Intel, ST Microelectronics, Toshiba and Xilinx.

・Work with industry grade networking and communication protocol stacks such as TCP/IP, IPv6 and USB stacks.

・Develop device drivers for various controllers such as Ethernet, USB, I2C, UART and so on.

・Develop application using various middleware such as HTTP, Filesystem, SNMP and Mailsystem.

・Learn security protocols such as SSL, SSH and cryptography.

・Learn porting of Real-Time Operating Systems such as FreeRTOS, μITRON to different CPUs.

・Acquire the skills to develop Operating Systems and Board Support Packages(BSP) from scratch.

・Develop platforms for latest technologies such as IoT.

・Work with different compilers and IDEs.


組み込みシステムズ専用ソフトウェア、ミドルウェア、ファームウェア、リアルタイムオペレーティングシステムの開発、および、トレーニングに実績がある会社です。

トレーニングの特徴:

・Arm、PowerPC、MIPS、RX、SuperH、H8、MicroBlazeなど、様々なCPUアーキテクチャのソフトウェア開発の実務経験を積むことができる。

・インテルや、ザイリンクスのFPGAプラットフォームでのプログラミングを学ぶ。

・NXP, Renesas, Texas Instruments, Intel, ST Microelectronics, Toshiba, Xilinx製各種評価ボードで作業する。

・TCP/IP、IPv6などの業界標準のネットワーク、通信プロトコルスタック作業する。

・Ethernet、USB、I2C、UARTなどの各種コントローラ用デバイスドライバの開発を学ぶ。

・HTTP、Filesystem、SNMP、Mailsystemなどの各種ミドルウェアを使用したアプリケーションを開発することができる。

・SSL、暗号などのセキュリティプロトコルを習得する。

・FreeRTOS、μITRONなどのリアルタイムOSの異なるCPUへの移植を学ぶことができる。

・OSやBSPをゼロから開発するスキルを身につける。

・IoTなどの最新技術に対応したプラットフォームを開発する。

・様々なコンパイラやIDEを使いこなすことができる。


Sunday, December 19, 2021

Tuesday, November 30, 2021

LS1043A Challenges

Timer interrupt: Timer Running, But timer interrupt does not occur
The GIC-400 Interrupt controller has allocation of priority bits for secure and non-secure modes. It needs to be set in Secure monitor mode. By default, non-secure mode had zero bits. Once I allocated maximum bits for non-secure mode, interrupt started coming.

UART and Clock control registers not visible in non-secure mode
By default the clock is enabled for UART. So, clock was not an issue. But, the module needs to be enabled to read/write in secure/non-secure modes. This was default enabled in secure mode, but not for non-secure. So, once enabled the bits, it was visible to the program.

LAN driver

References:

Layerscape Software Development Kit User Guide

NXP Dual Chip Module Automotive Gateway

Patch

U-Boot drivers

An Introduction to the QorIQ Data Path Acceleration Architecture (DPAA)

Linux kernel text

FMAN microcode

Actual Driver source for Independent mode is here:

The uploading of FMAN microcode is here:

LSDK Open Source Git

Layerscape Software Development Kit User Guide

Aarch64 Online Assembler