Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

DMA and Uart

hi !

i would like to start implement DMA controller with uart

I already generate and download my system into

fpga startix II dev board succefully .

I saw also documents about DMA , bit into status and

control register .

To increase performances in my application i would like to use

DMA with uart .

In this case i need transaction between Ram to uart and vicerversa, try to image a communication RS485 .

My fpga will be a master of RS485 com. and then send data from

ram to uart , and receive data from uart to ram .

When interrupt end transaction occur i process buffer in

I would like to know wich important steps i have to follow

thanks

walter

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    what i have to do ?

    create a system multiprocessor , where one cpu works for the

    communication .

    Otherwise the dma is a avalon master like a cpu .

    If i use one cpu for logical processing and an other cpu for the communication

    i should resolve my problems .

    Anyway if i choose this system , may i share variables for two cpu?

    for example with the cpu n°1 i get and send data and

    put them in memory with name (struct mydata), and with cpu n°2 that i use for logical processing may i read and write the same variable (struct mydata) ?

    http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ok i found an old post about dma -> uart

    i copy and paste and now run successfull , better then nothing

    ciao

    walter
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by pmicro@Jun 22 2006, 12:50 AM

    anyway if i choose this system , may i share variables for two cpu?

    for example with the cpu n°1 i get and send data and

    put them in memory with name (struct mydata), and with cpu n°2 that i use for logical processing may i read and write the same variable (struct mydata) ?

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16325)

    --- quote end ---

    --- Quote End ---

    Yes, in general you can share data among different CPUs. There are different ways to do that. I typically use the one we developed for ERIKA Enterprise, it is quite simple because it allows you to share data structures without changing the source code using them...

    bye

    Paolo