OpenCores
no use no use 1/1 no use no use
JSP receive interrupt.
by parrado on Nov 24, 2010
parrado
Posts: 19
Joined: Jul 16, 2008
Last seen: Nov 12, 2020
I have tested MINSOC on my DE2-70 board ( adv_jtag_bridge + USB-Blaster) and "hello" firmware worked fine using UART.

Now I'm testing same firmware by using JSP, I can see "Hello World" message on terminal ( telnet localhost 9944 ), however when I write on keyboard in this terminal, characters are not echoed like with UART test, furthermore a break point on interrupt handler shows that interrupt is not delivered.

I just modified board.h in this way:

......

#define UART_BASE 0x9e000000
#define UART_IRQ 6

.....

and minsoc_defines.v

.....


`define APP_INT_JSP 6

.......

`define APP_ADDR_JSP `APP_ADDR_DEC_W'h9e


......


And on minsoc_top.v
.....

adbg_top dbg_top (

.....

//JSP Signals
// WISHBONE slave

// WISHBONE target interface

.wb_jsp_adr_i ( wb_jsp_adr_i[4:0] ),
.wb_jsp_dat_i ( wb_jsp_dat_i ),
.wb_jsp_dat_o ( wb_jsp_dat_o ),
.wb_jsp_we_i ( wb_jsp_we_i ),
.wb_jsp_stb_i ( wb_jsp_stb_i ),
.wb_jsp_cyc_i ( wb_jsp_cyc_i ),
.wb_jsp_ack_o ( wb_jsp_ack_o ),
.wb_jsp_sel_i ( wb_jsp_sel_i ),

// Interrupt request
.int_o ( pic_ints[`APP_INT_JSP] ),

....
);


............


minsoc_tc_top #(`APP_ADDR_DEC_W,
`APP_ADDR_SRAM,
`APP_ADDR_DEC_W,
`APP_ADDR_FLASH,
`APP_ADDR_DECP_W,
`APP_ADDR_PERIP,
`APP_ADDR_DEC_W,
`APP_ADDR_SPI,
`APP_ADDR_ETH,
`APP_ADDR_AUDIO,
`APP_ADDR_UART,
`APP_ADDR_PS2,
`APP_ADDR_JSP,
`APP_ADDR_RES2
) tc_top (

..............


// WISHBONE Target 7
.t7_wb_cyc_o ( wb_jsp_cyc_i),
.t7_wb_stb_o ( wb_jsp_stb_i),
.t7_wb_adr_o (wb_jsp_adr_i ),
.t7_wb_sel_o ( wb_jsp_sel_i),
.t7_wb_we_o (wb_jsp_we_i ),
.t7_wb_dat_o ( wb_jsp_dat_i ),
.t7_wb_dat_i ( wb_jsp_dat_o ),
.t7_wb_ack_i ( wb_jsp_ack_o),
.t7_wb_err_i ( wb_jsp_err_o),


....

);


Does JSP interrupt mechanism work in same way than in UART?.
Does telnet client sends each character is typed?


Thanks in advance.


RE: JSP receive interrupt.
by rfajardo on Nov 25, 2010
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
Hi Parrado,

well done. I think I know what's wrong.

sw/uart/uart.c:13:
int_add(2, &uart_interrupt);

change that "2" to UART_IRQ

I have to update that on a next review. But before that I'm waiting for some further utilities.

Please, let me know if it works. I might consider adding that feature in an easier way to minsoc.

Best regards,
Raul
RE: JSP receive interrupt.
by parrado on Nov 25, 2010
parrado
Posts: 19
Joined: Jul 16, 2008
Last seen: Nov 12, 2020
Hi Raul,

Thanks a lot for your reply.

I had modified it, in fact

int_add(UART_IRQ, &uart_interrupt);


however it still does not work.

RE: JSP receive interrupt.
by rfajardo on Nov 25, 2010
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
It could be a good idea to try simulating it and checking the interrupt signal and level, compare with the interrupt level of the regular uart module.
RE: JSP receive interrupt.
by nyawn on Nov 26, 2010
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: May 31, 2023
I suggest you double-check that the settings you compiled the adv_dbg_if and adv_jtag_bridge with match. Having different settings for "support multi-device chains" or "optimize for USB cables" can cause this problem.

While the JSP interrupt should work like the regular UART, it's not a very well-tested feature. I use it in a polled mode for my own testing, so it is possible there is a hardware problem in the JSP itself. This is the first user report I've heard about it. I'm very interested in your simulation results...
RE: JSP receive interrupt.
by parrado on Nov 26, 2010
parrado
Posts: 19
Joined: Jul 16, 2008
Last seen: Nov 12, 2020
Thanks for your answer Nathan

I suggest you double-check that the settings you compiled the adv_dbg_if and adv_jtag_bridge with match.
Having different settings for "support multi-device chains" or "optimize for USB cables" can cause this problem.


They already match. However "optimize for USB cables" is not present in adbg_defines.v

While the JSP interrupt should work like the regular UART, it's not a very well-tested feature. I use it in a polled mode for my own testing, so it is possible there is a hardware problem in the JSP itself. This is the first user report I've heard about it. I'm very interested in your simulation results...


Did you test polled mode for receiving characters from host?

Thanks again.

RE: JSP receive interrupt.
by nyawn on Nov 30, 2010
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: May 31, 2023
I just tried this again myself. First, you are correct, "optimize for USB" is only an option in the adv_jtag_bridge makefile. It also appears to be broken. So, you should set JSP_OPTIMIZE_FOR_USB=false.

Second, make sure your telnet program is in raw mode, and not line mode. My terminal was buffering characters, and not sending them until I hit enter. You may be encountering the same thing.

Once these two things were taken care of, my simple test program worked. The program was a simple loop that waited for a single character, added one, and sent it back, so I know the character was being processed by the program.
no use no use 1/1 no use no use
© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.