?

Log in

No account? Create an account
Портирование MIPSfpga на плату Terasic DE1 с ПЛИС Altera Cyclone II - Юрий Панчул — LiveJournal [entries|archive|friends|userinfo]
Money can buy bandwidth. Latency requires bribing God.

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Портирование MIPSfpga на плату Terasic DE1 с ПЛИС Altera Cyclone II [Feb. 2nd, 2016|10:32 pm]
Yuri Panchul
Я получил запрос из крупного университета на Ближнем Востоке про использование MIPSfpga на плате Terasic DE1 с ПЛИС Altera Cyclone II. Хотя у меня нет этой платы на руках, я попробовал помочь преподавателю перенести MIPSfpga на эту плату, и я надеюсь, что университет сможет приспособить MIPSfpga для своей учебной программы. Ниже - фрагмент моей переписки с преподавателем:


Prof. XXX:

I was able to comfortably fit MIPSfpga into DE1 using my variation of MIPSfpga Getting Started / Fundamentals package. I can show you how you can reproduce my result and then how you can correct your own port of MIPSfpga Getting Started by borrowing some of the components I have created.

First, here is how to reproduce my result:



  1. Unzip MIPSfpga Getting Started to C:\MIPSfpga

  2. Get mipsfpgfa-plus into C:\github\mipsfpga-plus

  3. cd C:\github\mipsfpga-plus\boards\de1

  4. make_project.bat

  5. Run Altera Quartus II version 13.0 sp1

  6. Open project C:\github\mipsfpga-plus\boards\de1\project\de1.qpf

  7. Analyze/Synthesize/Place&Route/Assemble

  8. Open Device / Hardware Setup / ByteBlaster / Set file / ouput_files / de1.sof / Start




You should get the following:

Screenshot 2016-02-02 19.55.38

Note I do not have a DE1 board with me so I did not test running on the board. However I am confident it will run either immediately or after I adjust my clock divider.

Now how to correct your own port of DE1:



  1. First, I noticed that you have two versions of mipsfpga_ahb_const.vh with different sizes for ram and reset_ram. This is OK if you have a proper “set_global_assignment -name SEARCH_PATH” line in your .qsf file. Does Quartus pick the correct .vh file?


  2. I was able to fit the design comfortably by specifying 1KB reset_ram size and 1 KB user ram size. However the boot/reset sequence in the original MIPSfpga Getting Started does not fit into 1 KB because it is linked with crt0 from the standard C library. This crt0 code is totally unnecessary because its function is to setup C runtime in “big” operating systems before calling main() and most of it is not applicable for MIPSfpga. By omitting calling crt0 and setting up a stack pointer inside the boot sequence itself, it is possible to shrink the boot sequence to 1KB. You can get it here – https://github.com/MIPSfpga/mipsfpga-plus/blob/master/programs/00_counter/boot.S


  3. Now you may say that 1 KB for user ram is too small. Still, it is enough to do many lab exercises, and if you need more, it is possible to write an interface to the 8 MB SDRAM present on the DE1 board.


  4. Also, if you need more block ram, it is possible to eliminate EJTAG module and load the software program into your synthesized system via UART present in DE1 board.


  5. Options like “set_global_assignment -name ENABLE_ADVANCED_IO_TIMING ON” can bloat the design. If you use it, this would explain why you cannot fit. You can see my constraint file right here - https://github.com/MIPSfpga/mipsfpga-plus/tree/master/boards/de1


  6. I got Fmax 45.97 MHz on my synthesis so you may need to adjust PLL to divide 50 MHz clock.


  7. If necessary, I can sit with you over Skype and make sure you fit the MIPSfpga into DE1 and can run it. My Skype is yuri.panchul.




The whole thing is doable we just need to avoid the pitfalls I outlined (bloating options in constraint file, proper sizes for memories, compact bootloader, clock divider).

terasic_de1

Какие посты вам нравятся больше?

О радостях микроэлектронных технологий
12(66.7%)
О развитии демократии на Украине
4(22.2%)
О сеянцах камелии горной
0(0.0%)
От жизни на Западе Запада
2(11.1%)
Из-за бугра плюете?
0(0.0%)
LinkReply

Comments:
[User Picture]From: panchul
2016-02-04 11:01 pm (UTC)

Re: Зачем Intel купил производителя FPGA Altera за $16.7 миллиардо

При чем тут аналоговые системы? FPGA - цифровые.
(Reply) (Parent) (Thread)
[User Picture]From: flying_d
2016-02-04 11:15 pm (UTC)

Re: Зачем Intel купил производителя FPGA Altera за $16.7 миллиардо

У меня в детстве в качестве игрушки была плата наведения от некоей ракеты. Круглая такая, с дыркой :) Я просто провел некую аналогию.
(Reply) (Parent) (Thread)
[User Picture]From: panchul
2016-02-05 12:59 am (UTC)

Re: Зачем Intel купил производителя FPGA Altera за $16.7 миллиардо

Это я знаю, в институте изучал, в секретный конспект с нумерованными страницами записывал. На операционных усилителях.
(Reply) (Parent) (Thread)