[SOLVED] uart ip :: how to tranfer a register value from fpga to c code

Status
Not open for further replies.

dipin

Full Member level 4
Joined
Jul 16, 2014
Messages
223
Helped
14
Reputation
28
Reaction score
14
Trophy points
18
Activity points
1,731
hi
i need to use uart ip from quartus (using qusy) , i got a reference program with soc kit.

https://www.youtube.com/watch?v=7xJ9dhVDCwU

here my intention is i:: there is a design running in my fpga @ (200 hz & 46 bit width) . output is coming out from top module in 46 bit register. i wanted to print or save it in my pc. after few searching, i thought i will do usb _uart( which i had in my fpga) .

is it possible to change the c code using in the video so that instead of "" hello world"" , am i able to print/ save my register value ?

i am able to do it, how can i transfer value from my verilog module to c code for printing ? saving ??

any help is really appreciated & thanks in advance


regards
 

is it possible to change the c code using in the video so that instead of "" hello world"" , am i able to print/ save my register value ?
yes, make the register accessible via the Avalon bus and add that to the Nios II system design, or you can use whatever QSYS uses as GPIO and connect the GPIO to your register.

i am able to do it, how can i transfer value from my verilog module to c code for printing ? saving ??
By reading the the aforementioned register that is now memory mapped in the Nios II address space on the Avalon bus and writing to whatever the address of the usb_uart is.
 
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
hi,
thanks for the replay ads-ee, cleared my doubt now. so i am thinking to use it through avalon bus so that i can control it from pc (future work)

so i need to add my "top module" & "external bus to avalon bridge ip" along with (nios II processor +onchip ram+UART(rs_232 serial port)) in qsys system right?

first time i am doing something like this . thats why i am asking all these doubts. i am really sorry if these doubts are silly

regards
 


Yes that is what you will do...though admittedly easier said than done. ;-)

My advice find one of the Qsys tutorials that are on Altera's website and go through that at least for the first attempt to understand the flow.
 
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
hi,

above one is my top module declaration..( in qsys system i am adding only my top module)
so i just need x_out, and y_out to print on my pc, when i declare the custom component in my qsys system can i able to delete all other signals and only include x_out, y_out and clk and reset ????

if not possible then i need to do multiple avalon slaves right?
is it necessory to add external bus to avalon bridge ip as same number of times as avalon slaves?

regards
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…