Playing tetris on VC707

172 views
Skip to first unread message

Emma Williams

unread,
Feb 1, 2019, 1:13:25 AM2/1/19
to OpenPiton Discussion
I am trying to implement openpiton on FPGA and as a test play tetris on target board. I am trying to boot linux from SD card. I am using VC707 as target. I have following two queries:

1): can I do this using bit files provided in openpiton repository ( http://www.princeton.edu/~cloud/openpiton/bitfiles/ ) ?? or do i have to generate a bit file using protosyn?
I have tried one of the bit files and it just displays "Done" on uart nothing else.

2):For generating my own bit file I have tried this command:
               protosyn -b vc707 -d system --uart-dmw ddr
in Virtual box with Vm image provided by openpiton. but this command returns the error "synthesis failed".

Jonathan Balkind

unread,
Feb 1, 2019, 8:51:34 AM2/1/19
to OpenPiton Discussion

Hi there!

 

You can make use of the bitfile we provide. Seeing DONE on the UART is what you want to see if you have switch 7 flipped the correct way.

 

What you should do next is close putty/screen and use our tool pitonstream to run the tests you want to run. If you run pitonstream -h it will give you the help output.

 

Go to $PITON_ROOT/build and create a file called tests.list with one test name per line (try pass.s, fail.s. timeout.s, and uart-hello-world.s to see each piece of functionality). Then you should be able to run `pitonstream -v vc707 -f tests.list -p YOURUARTPORT` where YOURUARTPORT should be replaced with whatever you were connecting screen/putty to (without the /dev/ at the start).

 

pitonstream will:

1. compile the assembly test for you

2. ask you to push reset on the board

3. copy the compiled test into the memory on the FPGA

4. start the core to run the test

5. print any UART output from the test and wait for the test to hit pass or fail, or to timeout

6. go back to step 1 for the next test in tests.list

 

If you want to run protosyn to generate your own bitfile, then you will need to install vivado. We cannot distribute that in our virtual machine unfortunately, but you should be able to straightforwardly install OpenPiton on a machine on which you already have vivado installed (you may be able to install it into our centos7 VM, but I don't think it will be very productive as vivado would be very slow inside the VM). We can provide help with troubleshooting if you need it.

 

Thanks,

Jon

--
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/7e1871af-3edd-401f-902c-b92aef073152%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Emma Williams

unread,
Feb 4, 2019, 5:34:55 AM2/4/19
to OpenPiton Discussion

Thanks a lot for reply. As you said "Seeing DONE on the UART is what you want to see if you have switch 7 flipped the correct way" I wanted to know from where I can get all configurations of switches?  I couldn't find it in any manual. 

Secondly I want to play tetris as a first step. what should i do for that after seeing Done on uart?

Lastly thanks for suggestion of vivado. Protosyn executed successfully and bit file was generated and i also displayed done.

Jonathan Balkind

unread,
Feb 5, 2019, 12:45:54 AM2/5/19
to OpenPiton Discussion

Hi again!

 

Actually switch 7 is the only switch that we make use of outside of special configuration for our Piton chip.

 

To run tetris, you'll need to

 

1. Flip switch 7 back to the low position

2. Download openpiton_linux4.14_vc707.tar.gz from our website. This is an archive containing the OS disk image and login credentials for the vc707 FPGA implementation (including tetris)

3. Extract this and then write the OS disk image to an SD card at least 2GB in size. We use dd on linux/mac or win32diskimager on windows to do this

4. Program the FPGA with the SD plugged in, connecting putty/screen as you did before to observe DONE

5. You should see the OpenBoot "ok" prompt after a few seconds. Enter "boot Linux" (no quotes, and note the capital L) to boot to the login screen

6. Enter the provided user credentials to login

7. Run tetris!

 

Please let me know if you have any problems with any of these steps.

 

Glad to hear that protosyn worked for you!

Sikan Sun

unread,
Jul 31, 2019, 11:33:04 PM7/31/19
to OpenPiton Discussion
I am following the instructions and got problem for copying boot image.
The putty window is shown as the attached file. It is stoped during copying boot image step and do not boot linux.
Any suggestion for this?

Kaven

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

putty console.png

Jonathan Balkind

unread,
Jul 31, 2019, 11:45:50 PM7/31/19
to OpenPiton Discussion

Hi there,

 

The instructions in the prior part of the thread are for the SPARC version of OpenPiton. For OpenPiton+Ariane, you'll want to first use sgdisk to partition your disk and then dd the image onto the first partition. I'd recommend you start with the released disk image that you can find from the downloads page of the OpenPiton website. The commands should be:

 

`sudo fdisk -l` to find out what disk you're using (for example /dev/mmcblk0 or /dev/sdb)

 

If your disk is /dev/sdb (just an example - double check this first! You don't want to accidentally overwrite one of your hard disks):

 

`sudo sgdisk --clear --new=1:2048:67583 --new=2 --typecode=1:3000 --typecode=2:8300 /dev/sdb`

 

That command created the partition table. You'll now want to write the bbl.bin file to the first partition (you can use `sudo fdisk -l` again to see the partition names. For /dev/sdb, it will be /dev/sdb1. For /dev/mmcblk0 it's likely to be something like /dev/mmcblk0p1)

 

`sudo dd if=bbl.bin of=/dev/sdb1 oflag=sync bs=1M`

 

Then you should be good to go!

 

Happy to help if you have further problems.

 

Thanks,

Jon

Kaven Sun

unread,
Aug 1, 2019, 4:23:14 AM8/1/19
to OpenPiton Discussion
Thank you for your reply. Follow your instruction, I can boot Linux now. But the tetris application still not working.
After the Linux boot, it display:
Welcome to Buildroot
buildroot login:

After login, how can I run tetris application?

Kaven

To unsubscribe from this group and stop receiving emails from it, send an email to open...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/262f64fc-db1f-4137-92b2-c372261f1c41%40googlegroups.com.

Jonathan Balkind

unread,
Aug 1, 2019, 10:37:25 AM8/1/19
to OpenPiton Discussion

Hi Kaven,

 

After logging in as "root", the tetris binary is placed in the root directory. You can run it with "/tetris".

 

Thanks,

Jon

Reply all
Reply to author
Forward
0 new messages