Building 5 x P1V's in a DE2-115
ozpropdev
Posts: 2,792
I just got 5 x P1V's running in a DE2-115. I tried to squeeze 6 in but ran out of space.
These were "standard" 80MHz 32xIO versions with an additional Verilog module for propplug management.
For the record it took 80+ minutes to compile on my old Q6600 quad core @2.4GHz on Win 7.
Heres the resource results.
The selected propeller is connected to the propplug and KEY0 is a reset button only for that propeller.
A second 7 segment display shows how many cogs are active in the selected propeller.
The 8 x green leds still indicate the actual cogs in use for the current selected propeller.
See Verilog code and schematic for more details. Apologies on my rough Verilog code (its my first attempt!)
Cheers
Brian
P.S. I'm adding PortB back in to all P1V's next so they can all "socialize" with each other. FPGA is fun
These were "standard" 80MHz 32xIO versions with an additional Verilog module for propplug management.
For the record it took 80+ minutes to compile on my old Q6600 quad core @2.4GHz on Win 7.
Heres the resource results.
Flow Status Successful - Thu Aug 21 19:18:16 2014 Quartus II 32-bit Version 13.1.0 Build 162 10/23/2013 SJ Web Edition Revision Name p1vclean Top-level Entity Name p1vclean_4 Family Cyclone IV E Device EP4CE115F29C7 Timing Models Final Total logic elements 74,782 / 114,480 ( 65 % ) Total combinational functions 67,593 / 114,480 ( 59 % ) Dedicated logic registers 27,079 / 114,480 ( 24 % ) Total registers 27079 Total pins 28 / 529 ( 5 % ) Total virtual pins 0 Total memory bits 3,276,800 / 3,981,312 ( 82 % ) Embedded Multiplier 9-bit elements 0 / 532 ( 0 % ) Total PLLs 1 / 4 ( 25 % )The extra Verilog uses KEY1 to select a propeller (0-4) which is displayed on a 7 segment led display.
The selected propeller is connected to the propplug and KEY0 is a reset button only for that propeller.
A second 7 segment display shows how many cogs are active in the selected propeller.
The 8 x green leds still indicate the actual cogs in use for the current selected propeller.
See Verilog code and schematic for more details. Apologies on my rough Verilog code (its my first attempt!)
Cheers
Brian
P.S. I'm adding PortB back in to all P1V's next so they can all "socialize" with each other. FPGA is fun
zip
229K
Comments
5 props, 40 cogs...
How much routing resources it eats and how long it compiles?
Presuming you have 64KB of hub in each, that is 320KB, plus 40 cogs of 2KB is 80KB, for a total of 400KB RAM.
Compile took over 1 Hour 20 Minutes.
The only resource data I've got is above.
Now I have a valid reason to get a new faster PC
Cheers
Brian
PentaProp!
But this is REALLY cool and now I want to do it to a DE2!
Can you share construction techniques for how to get all that Verilog hooked together? I'd like to try and get this going in time for OBC's Propeller Expo (August 30)
I post that info tomorrow with some more stuff.
BTW Nice pictures
Cheers
Brian
don't use = to assign a value. Use <= instead
There are 2 assignment operators in Verilog: = and <=. The first is so called blocking. If you use this, your assignments will be executed sequentially, as in programming language. This is not natural for FPGA and may cause unwanted side effects which I had to learn some time ago.
@mindrobots
I created symbols for the "prop" and "propplug_manager" (FILE - CREATE/UPDATE -Symbol file for current file)
Then FILE - NEW - Block diagram, then click on the Symbol tool (AND gate icon) to select a symbol then paste.
I then made the schematic file the top entity. (Right click on schematic filename in the "Project Navigator" window.
Not sure yet how to do all that in Verilog as a "top" entity yet. (No schematic required).
Still learning as I go... below is a cleaned up/refined version of the proplug manager whuch seems to work fine. I'm having a few dramas with Quartus and that in combination with my long compile times doesn't help.
The problem I am having with Qaurtus is each time I add a new peripheral to a prop I seem to lose or
partially corrupt already proven pin assignments. This seems a bit random too. Running some simple
cog tests on each of the 40 cogs show that they are running Ok but the peripherals are not!
I know it's something I must be doing wrong but the $64K question is what? Anyhow still having heaps of fun
Cheers
Brian
to mess up some the pin assignments.
Thank you for the details. Hopefully, I can have some quiet time with my DE2 this weekend (Haha!!) and sit down and try this. I'll certainly let you know if I break my Quartus (Ouch!) along the way!
It is a bit too much fun - I'm waiting for someone to come along and tell me it is illegal (or bad for me)!
This - in my prop1v experiments - reduces compilation time several times
The Quartus fits the logic as it can, and then the router has a problem to connect all this and it can spend up to 15 minutes doing this.
Changing this setting reduces my compilation times under 10 minutes (1 prop circuit, AMD FX8320@4GHz)
It is bad for you - when you are working with Quartus, you don't eat and drink.
Ah, yes, I hope to benefit from the Quartus diet.
Quartus is a huge program. The several-minute wait times (and several steps to run) have a big divider effect on your productivity, because your mental cache is pretty thoroughly dumped by the time you get to try out your changes. I've always wanted to make a development tool for FPGAs that would compile, download, and execute your code in a few seconds, or less. Then, development would proceed 20x faster. I would be able to approach projects in a much less formal, more organic way, rather than have to mentally spool up and implement a whole concept before enduring the long waits and numerous steps to see the results. Of course, FPGA compilers are a lot more complicated than assemblers, so this may not be practical without some accommodations being made for each specific FPGA architecture, where little blocks get compiled for later routing, so that a top-down effort is not needed each time. The practical difficulty in doing this would be adapting the tool to every device it supports. Altera decided long ago to decouple a few big things to allow their tools to evolve without too much pulling and pushing. Anyway, simple and fast tools might allow FPGAs to gain the widespread use that microcontrollers have. FPGAs are still way more complicated to use than micros.
Yes, it is, but things go better. New Quartus versions(12+) compiles several times faster. than these(8..9) which I started two years ago. Then, there are some settings which can shorten this time. The compilation time of my project with extended port B was over 20 minutes when original Propeller project compiles in about 4 minutes Then I found "Aggresive routability optimizattion" which, when set, shorten the compilation time of this project to 6..7 minutes.
The Quartus is a huge beast and there are many things to learn.
Better be running regularly around the orchard and snacking lightly or that diet won't work.
I've been running a few trials of 5 x P1V's and had some interesting results.
Apart from the HUGE compile times on my old PC (~!1Hr 20 Mins) the P1V clock speed seems to be an issue with these builds.
@140 Mhz 9 out of the 40 cogs either failed completely or were erratic.
@133 Mhz 3 out of the 40 cogs were erratic.
Trying 120 Mhz next. Compiling.........
Update: 120 MHz seems to have fixed erratic behaviour. All 40 cogs running nicely. :)
Hope to post source and demo code in the next day or so.
It made no difference at all to my compile times.
I was hoping it would help, in my case it didn't
It was worth trying though, Thanks
Yes, it seems 140 MHz P1v works, but it sometimes makes a mistake. Today I run this vga driver @ 140 MHz and the inttostr function couldn't strip all leading zeros from the resulting string. It returned strings like "00002" instead of simply "2"
Then I reduced the system clock to 120 MHz and it worked OK
I reduced it further to 106.5 MHz to get synchronization with the pixel clock.
How did you attach the LCD?
5 x P1V propellers with 64 I/O pins running @ 120MHz. (Note: PortB not implemented in counters yet!)
The only other modification is the extraction of the DIRA/DIRB status to allow for tri-state control of additional
logic and interfaces. This assists in the propplug management. All five propellers can be programmed via
a single propplug. An additional propplug can be connected (see picture) for additional comms.
There are five spin programs, one for each propeller.
prop0.spin runs a lcd message demo. Lcd is mapped to PortB pins. Sends data out a second proplug too.
prop1.spin uses two 7 segment displays(HEX5&4) to display IR detector activity.
prop2.spin simply counts 0 to 9999 on 7 segment displays (HEX3..0)
prop3.spin shows a "cylon" style led pattern on red leds(7..0). SW(7..0) status pauses display.
prop4.spin also shows a "cylon" style led pattern on red leds(17.80). SW(17..8) status pauses display. (Test of INB)
To load each propeller simply select the propeller using KEY1. Current selected propeller is shown on HEX7 display.
KEY0 is a manual reset for the current selected propeller.
The HEX6 display shows the number of cogs used by the current selected propeller and the green leds show their individual status.
With 320 IO pins available for hooking up all the DE2 goodies it opns the door to lots of fun.
See spin code and schematic for pin assignments.
BTW. I'm curious on the compile times achieved on your faster PC's rather than my old "clunker"
Cheers
Brian
Edit: Apologies for the copped schematic. Quartus export seems to behave badly!