UART Assembly Test on FPGA

211 views
Skip to first unread message

Yi He

unread,
Feb 8, 2017, 12:04:12 PM2/8/17
to OpenPiton Discussion
Hi!

I'm having problem loading assembly test from PC to DDR.

Somehow it keeps waiting for configuration complete message from FPGA, even if I have configured the FPGA.

Like this:
UART will be configured for 115200 baud rate
Press reset button on FPGA
Waiting...


Could you help me check if I'm doing it correctly.

(1) Run protosyn -b genesys2 --uart-dmw ddr
(2) Open Vivado, connect the board.
(3) Run pitonstream -b genesys2 -f /PATH/TO/uart-hello-world.s
(4) Configure the FPGA.


Thank you so much!


Best Regards,
Henry

Alexey Lavrov

unread,
Feb 8, 2017, 12:44:57 PM2/8/17
to Yi He, OpenPiton Discussion
Hi Yi,

You have to make sure that Switch 0 on FPGA in on and an led above it is on.
After that you have to press reset button on FPGA.
Also, you have to specify file for pitonstream with assembly tests, not test name directly.

Best,
Alexey

11:04 AM, February 8, 2017, Yi He <yi...@uchicago.edu>:




--

You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
openpiton+...@googlegroups.com.

To post to this group, send email to
open...@googlegroups.com
.

To view this discussion on the web, visit
https://groups.google.com/d/msgid/openpiton/25852c4a-2714-48c6-a534-c77c82c8a5f6%40googlegroups.com
.

For more options, visit https://groups.google.com/d/optout.



Yi He

unread,
Feb 8, 2017, 3:26:21 PM2/8/17
to OpenPiton Discussion, yi...@uchicago.edu, ala...@princeton.edu
Hi, Alexey!

Thank you so much! I didn't turn on the Switch.

Now most tests are good, but some tests have errors on the midas link phase.

The error looks like this:

midas: At pkg=Midas::Interface, file=/root/piton/piton/tools/perlmod/Midas/3.30/lib/site_perl/5.8.0/Midas/Interface.pm, line=370
midas: FATAL ERROR: M_LINKFAIL (#18): Linker failed.
midas: FATAL ERROR: Command "g_ld -b elf64-sparc -no-warn-mismatch --no-check-sections -T diag.ld_scr -o diag.exe" failed with status 1.
sims: Caught a SIGDIE. midas compilation error at /root/piton/piton/tools/src/sims/sims,1.262 line 4297.

I'm wondering if you have experienced a similar error and if you know how to handle this.


Thank you again!

Henry

Jonathan Balkind

unread,
Feb 8, 2017, 5:21:16 PM2/8/17
to OpenPiton Discussion

Hi Henry,

 

Which test are you trying to run when you see this?

 

Thanks,

Jon



To post to this group, send email to
open...@googlegroups.com
.

To view this discussion on the web, visit
https://groups.google.com/d/msgid/openpiton/25852c4a-2714-48c6-a534-c77c82c8a5f6%40googlegroups.com
.

For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.

Alexey Lavrov

unread,
Feb 8, 2017, 5:34:23 PM2/8/17
to Jonathan Balkind, OpenPiton Discussion
Hi Henry,
 
I'm glad it was just switch problem.
Currently, all assembly tests are compiled without any options before loading to FPGA by pitonstream script. Depending on a test you want to run you may have to add them manually.
We are considering to add such an option for the next release.
 
There is also a set of tests
which can not be run on FPGA because they are using special checkers which can not be implemented on FPGA.
 
As Jon asked, please let us know which test are you trying to run.
 
 
Best,
Alexey
 
 
08.02.2017, 17:21, "Jonathan Balkind" <jbal...@cs.princeton.edu>:

Hi Henry,

 

Which test are you trying to run when you see this?

 

Thanks,

Jon

 

From: <open...@googlegroups.com> on behalf of Yi He <yi...@uchicago.edu>
Date: Wednesday, 8 February 2017 at 15:26
To: OpenPiton Discussion <open...@googlegroups.com>
Cc: <yi...@uchicago.edu>, <ala...@princeton.edu>
Subject: Re: UART Assembly Test on FPGA

 

Hi, Alexey!

 

--


You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.
 

 

--

You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Saeid Barati

unread,
Apr 20, 2017, 5:27:53 PM4/20/17
to Alexey Lavrov, Jonathan Balkind, OpenPiton Discussion
Hi everyone, I'm stuck at this step too. 

Here is what I do:
1) Run "protosyn -b genesys2  -d system --bram-test=uart16550-hello-world.s"
​2) Then​ program the board with Vivado, Turn the "Swith 0" to 1.(the LED0 is on as well) and then reset the board. 
3) Run "pitonstream -b genesys2 -f file.txt" where file includes only one line with"uart16550-hello-world.s".

Then it get stuck waiting for a long time:

UART will be configured for 115200 baud rate
Press reset button on FPGA
Waiting...


Is there any step that I'm doing wrong or I've forgot to do?

Thanks in advance,
Saeid





Hi, Alexey!

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/b2173b77-ded9-4910-9cd1-defbc558937f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 

 

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Alexey Lavrov

unread,
Apr 21, 2017, 1:03:31 PM4/21/17
to OpenPiton Discussion
Hi Saeid,

--bram-test option implies than the *only* test you want to run on FPGA is the one specified as its parameter.
In your case after you press reset button, uart16550-hello-world.s will be executed every time.

In case you want to be able to load different tests on a board using pitonstream, you have to generate a bitfile with an options --uart-dmw ddr.
For example, for genesys2 it will be:
protosyn -b genesy2 -d system --uart-dmw ddr

After you generate a bitfile, you should turn on the switch in run pitonstream as you described.

Best,
Alexey

Hi, Alexey!

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/b2173b77-ded9-4910-9cd1-defbc558937f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 

 

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Saeid Barati

unread,
Apr 24, 2017, 1:42:40 PM4/24/17
to Alexey Lavrov, OpenPiton Discussion
Thanks Alexey, but the problem remains even after using "uart-dmw" option. It stalls at "waiting .." stage.

I did the commands below in order:
1) Run "protosyn -b genesys2 -d system --uart-dmw ddr"
​2) Then​ program the board with Vivado, Turn the "Swith 0" to 1.(the LED0 is on as well) and then reset the board. 
3) Run "pitonstream -b genesys2 -f file.txt" where file includes only one test ("uart16550-hello-world.s" ).

The output on terminal would be :

UART will be configured for 115200 baud rate
Press reset button on FPGA
Waiting...

Any comment or help would be much appreciated.

Cheers,
Saeid






jbalkind

unread,
Apr 24, 2017, 1:50:55 PM4/24/17
to OpenPiton Discussion
Saeid,

Have you pushed reset after "waiting..." is printed? No output changes?

Jon

Saeid Barati

unread,
Apr 24, 2017, 2:00:03 PM4/24/17
to jbalkind, OpenPiton Discussion
I've tried both ways. Resetting before/after running pitonstream (seeing the waiting message). 

Still no difference. 

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Alexey Lavrov

unread,
Apr 24, 2017, 2:25:13 PM4/24/17
to OpenPiton Discussion
Hi Saeid,

I suspect the problem can be that pitonstream opens /dev/ttyS0 serial port by defaut, while your device can be using a different serial port.

I would suggest to unplug a usb cable connecting your PC to FPGA and plug it back, looking at /dev directory to check which device is assigned to FPGA's UART.
After that change port in pitonstream ($DV_ROOT/tools/src/proto/pitonstream,1.0, line 138) to that interface.

Hope this will fix the problem.

Best,
Alexey 

On Monday, April 24, 2017 at 2:00:03 PM UTC-4, Saeid Barati wrote:
I've tried both ways. Resetting before/after running pitonstream (seeing the waiting message). 

Still no difference. 
On Mon, Apr 24, 2017 at 12:50 PM, jbalkind <jbal...@cs.princeton.edu> wrote:
Saeid,

Have you pushed reset after "waiting..." is printed? No output changes?

Jon


On Monday, April 24, 2017 at 1:42:40 PM UTC-4, Saeid Barati wrote:
Thanks Alexey, but the problem remains even after using "uart-dmw" option. It stalls at "waiting .." stage.

I did the commands below in order:
1) Run "protosyn -b genesys2 -d system --uart-dmw ddr"
​2) Then​ program the board with Vivado, Turn the "Swith 0" to 1.(the LED0 is on as well) and then reset the board. 
3) Run "pitonstream -b genesys2 -f file.txt" where file includes only one test ("uart16550-hello-world.s" ).

The output on terminal would be :

UART will be configured for 115200 baud rate
Press reset button on FPGA
Waiting...

Any comment or help would be much appreciated.

Cheers,
Saeid






--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Saeid Barati

unread,
Apr 24, 2017, 2:55:30 PM4/24/17
to Alexey Lavrov, OpenPiton Discussion
Thanks Alexey. I used "setserial" package to find out which serial port is being used. 

setserial -g /dev/ttyS[0123]
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4

which means it's using the "ttyS0" as the serial.

For sanity check, I've also tried running "dmesg | grep ttyS" . Output was:

[    0.563921] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.585144] 0000:00:16.3: ttyS4 at I/O 0xf0e0 (irq = 19, base_baud = 115200) is a 16550A

Then I tested both "ttyS0" and "ttyS4" in the pitonstream source code. Still no success. 

I truly appreciate your help. 

Thanks,
Saied

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.

Alexey Lavrov

unread,
Apr 24, 2017, 3:03:39 PM4/24/17
to OpenPiton Discussion
Hi Saeid,

Depending on how you connect a board to your PC, a serial device can also appear as /dev/ttyUSB[01234]. Can you check if you have any of those when you connect a board?

Are you running on a real hardware or inside a VM?

Alexey

Saeid Barati

unread,
Apr 24, 2017, 4:35:00 PM4/24/17
to Alexey Lavrov, OpenPiton Discussion
Alexey, 

You were right. In my system, UART was connected via "ttyUSB0". Once I've updated pitonstream  to use this port, it passes the tests. 
(I'm running on the real hardware).


Thanks,
Saeid

To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+unsubscribe@googlegroups.com.

To post to this group, send email to open...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages