Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] qsys jtag_uart doubt

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,

is it possible to print a series of number in nios 2 console using jtag uart along with nios2+onchip ram.

i am implemented an counter and made it as a custom component in qsys and i am using it
(adder+onchipram+nios 2+jtag uart).

i tried it but it is printing 0.

update:: i am able to print only one number.. ( i am counting from 1 to 65556, but its only printing 52429) so is it possible to print all numbers ?

thanks and regards
 
Last edited:

No code, no diagram of interconnections...
What do you expect here ?
 

hi ,
i just wanted to know is it possible to print a series of numbers

Capture_qsys.JPG

module counter_jtag_check (clk,reset);

input clk;
input reset;

jtag_count u0 (
.clk_clk (clk), // clk.clk
.reset_reset_n (1'b1) // reset.reset_n
);


endmodule

c code::
/*
* main.c
*
* Created on: Jun 6, 2017
* Author: dipin
*/

#include "stdio.h"
#include "io.h"
#include "system.h"
int main()
{
signed int ans;

ans = IORD(COUNTER_INTERFACE_0_BASE,0);
printf("%d",ans);
while(1);

return 0;
}

" COUNTER_INTERFACE_0_BASE" is the same in my system.h file

regards
 

I may be wrong, but shouldn't you send data to Uart from whithin the while loop ?

Code:
while(1) {
   ans = IORD(COUNTER_INTERFACE_0_BASE,0);
   printf("%d",ans);
   }

Add:
I'm assuming you're using as template some of the Hello World examples took from the Nios2 IDE that prints to the Jtag Uart, on which you could insert your code.
 
  • Like
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
hi,
thanks for the replay andre_teprom,
you are exactly right, i dont have any experience before in qsys, this is my first time, thats why i used the code from demo program.
i will sure try your suggestion :)

regards
 

hi ,
i tried the code putting inside while loop, but its printing the same value infinite times :(
any solutions ? anyhelp is really appreciated

regards
 

As belike you, I'm also newbie on this area, and the only thing I could help with would be at the programming scope. By the way, I could not see the counter at the above picture, shouldn't be there ?
 
  • Like
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
hi,

i declared it as a custom component, which is jtag_count1 in qsys system.
any way thanks much for your suggestion on c code. it helped me for being close to my target

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top