Shop OBEX P1 Docs P2 Docs Learn Events
The time for the P2 is now! — Parallax Forums

The time for the P2 is now!

I just read the announcement of the Arduino Vidor 4000, which is a new (not yet released) offering from Arduino that combines an ARM and an FPGA. We've discussed where P2's potential market is, and this announcement couldn't come at a better time. It shows that others also realize the importance of providing FPGA-like capabilities with an easy-to-use interface. People will flock to this product (because Arduino), then realize just how complicated the whole thing really is for anything non-trivial. They will start looking for a simpler solution, and this is where the P2 will shine.

«1

Comments

  • jmgjmg Posts: 15,140
    "The new MKR Vidor 4000 has three processors on-board. The main Microchip SAM D21 is accompanied by an Intel Cyclone 10 FPGA, alongside a u-blox NINA-W102— an ESP32-based wireless module—to provide both WiFi and BLE connectivity. The MKR Vidor 4000 also has a Microchip ATECC508A cryptographic co-processer providing hardware-based security, and hardware-based key storage, for connecting your projects to the cloud.
    The FPGA contains 16K Logic Elements, 504Kbit of embedded RAM and 56 18x18 bit HW multipliers for high-speed DSP;"


    Looks suitable for P1V hosting :) - one blog claims "It’ll be out next month (June 2018) for about $60 USD."


    There is also this new Ardunio
    https://store.arduino.cc/usa/arduino-uno-wifi-rev2


  • jmgjmg Posts: 15,140
    ... and here is claims of ever faster silicon...
    https://www10.edacafe.com/nbc/articles/1/1587631/Tachyum-Unveils-World-1st-Universal-Processor-Platform-with-More-than-10x-Performance-Conventional-Processors

    but very few actual details...

    (tho it sounds like Tachyon would run very fast on Tachyum ;) )
  • cgraceycgracey Posts: 14,133
    edited 2018-05-21 05:19
    We could make a complete IDE in 32KB that runs on the chip and lets you try out your source code changes in 1/4 second, with super snappy debugging. Total understanding not hard to achieve.

    Meanwhile, the ARM + FPGA thing is going to involve gigabytes of installs that take minutes to run each time on a big host system. And no one will ever be able to understand the last detail of it all. Average user probably achieves 2% knowledge of what's going on.
  • cgracey wrote: »
    We could make a complete IDE in 32KB that runs on the chip and lets you try out your source code changes in 1/4 second, with super snappy debugging. Total understanding not hard to achieve.

    Meanwhile, the ARM + FPGA thing is going to involve gigabytes of installs that take minutes to run each time on a big host system. And no one will ever be able to understand the last detail of it all. Average user probably achieves 2% knowledge of what's going on.

    Well, you could.

    I wish you would, Mparc is visible again, his Spinx was almost there on a P1.

    But first get Spin2 running, and OpenSpin2 and GCC...

    Enjoy

    Mike
  • cgracey wrote: »
    We could make a complete IDE in 32KB that runs on the chip and lets you try out your source code changes in 1/4 second, with super snappy debugging. Total understanding not hard to achieve.

    And not 'C'.

    The thing about Arduino is that it's a complete ecosystem not just a board or IDE. It's a variety of computing platforms, using many different processors, on which you run code written is the most universal programming language (C) in an IDE which hides all the ugly details, including the target processor. Onto that platform you plug your IO boards (shields) which all come with a load of example programs. And the 'net is awash with other sample (working) code.

    A P2 on an Arduino format board, with the necessary BSP (board support package) and GCC compiler with well thought out support for multiple cores might work. Otherwise it's just another not-an-Arduino and not-an-ARM development board.
  • Heater.Heater. Posts: 21,230
    edited 2018-05-21 09:37
    Arduinos are programmed in C++. You are right though, they go out of their way to hide the messy details. For example they only document a limit subset of C++ syntax/semantics. Which is probably a good thing as it is ridiculously huge and complex. So much so that when I first heard of the Ardunio I could not even find mention of "C++" on their website!
    A P2 on an Arduino format board, with the necessary BSP (board support package) and GCC compiler with well thought out support for multiple cores might work.
    You mean like the Propeller ASC board: https://www.parallax.com/product/32214 ?

    That is a wonderful board. Problem is it does not follow through, there is no support for it in the Arduino IDE. Also the price is a bit steep!

    Edit: I seem to recall somebody made an Arduino support library for the ASC.

  • I'm dubious that you could make a "complete IDE" in 32K. The compiler alone would likely take all of that, if not more. Heck the symbol tables probably get bigger than that.
    However, I think it'll be a lot easier to have a "native" compiler and editor on the P2 than P1. It'll still be tricky to make applications that use all of the P2's memory in that setup, since it will have to be made in pieces and linked or chain loaded.

    Also, I think for the native on P2 compiler, you'll want to have it be split into compiling and linking at the very least, if not also splitting out PASM assembling. The limited memory available on chip make the whole do it all together method even more problematic since that uses tons more memory during compiling. At least with things split apart you have a chance of making decent sized applications within the limited memory.

    As for Arduino, Brian is right, C is one of the keys. You can dismiss it all you want, but the reality is that the world uses C. So, it doesn't matter how nice you make things on P2, if it's Spin/PASM it's foreign and a hard sell.
  • Heater.Heater. Posts: 21,230
    Why the 32K limit? The P2 has a lot more space available than that.

    C compilers and others ran on 8 bit CP/M machines with 64K of RAM. That's how the first and only C compiler that ran on a P1 worked. See ZiCog BDSC.

    Surely some skillful sould could get TCC working on a P.

  • Heater,
    I was just replying to Chip saying he could make a complete IDE in 32K. I think it'll take more like 64-128K.

    I, also, think it's feasible to have a C compiler native to the P2, not so sure about C++ really, maybe an older flavor without templates and all the new "modern C++" features.

  • msrobots wrote: »
    But first get Spin2 running, and OpenSpin2 and GCC...

    We already have some high level languages for the P2. Dave Hein got GCC working; it's incomplete, but usable. Tachyon, of course, is built into the ROM. And Spin for P2 exists now, in the form of fastspin + spin2gui.
  • Heater.Heater. Posts: 21,230
    Chip,
    Meanwhile, the ARM + FPGA thing is going to involve gigabytes of installs that take minutes to run each time on a big host system. And no one will ever be able to understand the last detail of it all. Average user probably achieves 2% knowledge of what's going on.
    Yes. I think the Arduino guys have run off the rails with that MKR Vidor 4000 monstrosity. Jumped the shark as they say.

    It's no fun configuring an FPGA with the gigantic and massively slow and complex Quartus IDE. Not many are going to get into learning anything with that.

    I imagine the idea is that some gurus will work up useful FPGA configurations that get magically loaded to the FPGA when one includes the required "sketch" that interfaces to it from ones software.

    I'm not sure why it needs the crypto chip, can't you put the crypto engine into the FPGA?

    They could have done something a lot more fun and interesting, especially for beginners:

    1) Use a Lattice ICE FPGA. Much small, cheaper, simpler and lower power. This is for an IoT thing right?

    2) Use the Yosys tools to synthesize and load designs for the FPGA. Very small, quick and simple to use. Open Source to boot!

    3) Perhaps add Verilog syntax highlighting and other support into the Arduino IDE.

    4) Probably be helpful to integrate Icarus or Verilator simulators so that people can get an even quicker turn around on their HDL coding efforts.

    Yes, the Lattice parts are probably have much less logic than the Cyclone but plenty enough for people learning Verilog for the first time. Big enough to put an 32 bit processor in there, they could have stuck with the ATMEGA and used a RISC V core in the FPGA instead!



  • IMHO, no duinos for me. Their IDE is a joke, and the C variant is very limited (you call that C?). Also, you got to love those analog output functions (it is PWM, not analog).
  • Cluso99Cluso99 Posts: 18,066
    Roy Eltham wrote: »
    Heater,
    I was just replying to Chip saying he could make a complete IDE in 32K. I think it'll take more like 64-128K.

    I, also, think it's feasible to have a C compiler native to the P2, not so sure about C++ really, maybe an older flavor without templates and all the new "modern C++" features.
    There was a C compiler on the original Palm Pilot. I don't recall how much RAM there was. I think it used the 68xxx dragon ball.
  • Heater.Heater. Posts: 21,230
    samuell,

    I'm not into the Arduino thing at all but I suspect the Arduino IDE is just fine for beginners. Last time I looked at it, years ago, it was very quick and simple. Just what a beginner needs.

    I don't call the language used to program Arduinos "C". I call it "C++". Because that is what it is. The Arduino uses the same GCC as the Propeller, Linux and everything else.

    Certainly you don't get the C standard library or STL with the Arduino IDE. For very good reason. The 8 bit ATMEGA does not have enough memory space to put it! Same restriction as all other little micro-controllers.

    PWM is a perfectly fine way to get an analog output. Like the speaker and headphone drivers on your phone, laptop, whatever sound system you have now a days.
  • AleAle Posts: 2,363
    I'm with Chip on the 32 kBytes: Look at Turbo Pascal 3.0 for the IBM PC: 39 kBytes: Editor and compiler all in one !. (And Oberon... I don't think is the way to go (and I failed to port it), not that it is not possible, I just find it too unfamiliar, the whole concept, but I may be wrong).
  • samuellsamuell Posts: 554
    edited 2018-05-21 13:21
    Heater. wrote: »
    samuell,

    I'm not into the Arduino thing at all but I suspect the Arduino IDE is just fine for beginners. Last time I looked at it, years ago, it was very quick and simple. Just what a beginner needs.

    I don't call the language used to program Arduinos "C". I call it "C++". Because that is what it is. The Arduino uses the same GCC as the Propeller, Linux and everything else.

    Certainly you don't get the C standard library or STL with the Arduino IDE. For very good reason. The 8 bit ATMEGA does not have enough memory space to put it! Same restriction as all other little micro-controllers.

    PWM is a perfectly fine way to get an analog output. Like the speaker and headphone drivers on your phone, laptop, whatever sound system you have now a days.

    Hi heater,

    I agree that the Arduino is fine for beginners. However, it is only useful as a stepping stone. I cringe when I see a "serious" project that has an Arduino in it. This is not learning electronics as much at it is not learning how to program. I used to do my programming in Euphoria, until I've discovered that C was not hard at all. In that sense, I really encourage people to leave Arduino behind and start programming micro-controllers.

    Regarding if it is C or C++, I don't entirely agree. You may write your function as "void function()" instead of "void function(void)", but I don't see any OO programming in it. Where are the classes? Where is the polymorphism? Perhaps it is neither C or C++, as it is not conformant to any of the standards. Lets call it a C like language.

    As for the analog output function, it could be renamed as "PWM" or something. It would be a bit more transparent. Also, calling the program a "sketch" is not my thing.

    Kind regards, Samuel Lourenço
  • And not 'C'.
    Here we go again. This kind of attitude is one reason that there is no port of GCC to the P2 yet. C is actively hated by by many here.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-05-21 14:38
    David Betz wrote: »
    And not 'C'.
    Here we go again. This kind of attitude is one reason that there is no port of GCC to the P2 yet. C is actively hated by by many here.

    Maybe you're right but Brian was asking for GCC :) I think P2 will need as Brian put it "and GCC compiler with well thought out support for multiple cores might work."

    I thought everybody hates Spin, but most of all Forth :)

    Funny thing though, is that when you are busy just doing stuff, you are too busy loving it to be hating something else, since it doesn't bother you, but it seems to bother everybody else.

  • ceptimusceptimus Posts: 135
    edited 2018-05-21 14:44
    samuell wrote: »
    Regarding if it is C or C++, I don't entirely agree. You may write your function as "void function()" instead of "void function(void)", but I don't see any OO programming in it. Where are the classes? Where is the polymorphism? Perhaps it is neither C or C++, as it is not conformant to any of the standards. Lets call it a C like language.

    As for the analog output function, it could be renamed as "PWM" or something. It would be a bit more transparent. Also, calling the program a "sketch" is not my thing.

    Kind regards, Samuel Lourenço

    Arduino supports C++ classes and their associated functionality. You (usually) put your main() function in the .ino file, and then you put each class in its own .cpp file with a corresponding .h file header. The Arduino loads all the .cpp and .h files in the same folder as the .ino file automatically and puts a set of tabs, similar to a browser, along the top to access each file. The ide supports the creation of new class files and headers - click the little down arrow thing over at the top right of the IDE window. Classes are the mechanism that most of the Arduino libraries use: when you put something like #include <Servo.h> there are C++ classes behind the scenes doing most of the work. Of course, you can view and modify these files yourself if you wish, but they are not automatically displayed to avoid intimidating newbies.
  • Heater.Heater. Posts: 21,230
    edited 2018-05-21 16:20
    samuell,

    I don't follow you. If someone solves a problem with an Arduino, then if it works, if it is reliable and cheap, if it was quick and easy to develop, then it's as good as any "professional" solution crafted with hand coded assembler by a CS graduate and running on a custom microcontroller board.

    Stepping stones are good. My first introduction to programming was in BASIC, via a teletype to some far away mainframe. It was magical and inspiring. As was the case for millions of kids years later with their C64s, Sinclair Spectrums and so on. And I assume is the case for kids flashing LEDS or getting simple bots to work with Arduino today, or those using the Raspberry Pi.

    Sure 99% of them may never get off that first stepping stone. That's OK. Hopefully they had some fun and learned a little something even if programming ends up not being their "thing".

    As for C vs C++ in the Arduino: The "Hello World" program for the Arduino, from the Arduino web site looks like this:
    LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
    void setup() {
      // set up the LCD's number of columns and rows:
      lcd.begin(16, 2);
      // Print a message to the LCD.
      lcd.print("hello, world!");
    }
    
    void loop() {
      // set the cursor to column 0, line 1
      // (note: line 1 is the second row, since counting begins with 0):
      lcd.setCursor(0, 1);
      // print the number of seconds since reset:
      lcd.print(millis() / 1000);
    } 
    
    That is OOP. You can't do "lcd.print(...)" etc in C. Have a look at LiquidCrystal.h to see where the class is:
    https://github.com/arduino-libraries/LiquidCrystal/blob/master/src/LiquidCrystal.h

    Which inherits from Print.

    It is fully conformant to some version of the C++ standard or other. (Excluding all the STL and stdlib stuff as noted above)

    I agree, I hate the terminology of "sketch" etc.
  • C

    I have come to a realization. Most of us have our preferences and reasons. They are very highly distinctive.

    In addition, the P2 is a bit of a fresh playground. How it works is odd, or highly differentiated from how a lot of other systems work. Pick one, depending on perspective.

    There is more than a bit of, "If I were king and could do it all over again..." in play. Given the nature of this project, that is to be expected, is it not?

    Nobody knows how "the masses" will use this device. We all know how we intend or can see it being used.

    Many of us have our reasons for doing things right now, and the nature of all this speaks to that too. Same way.

    I, for one, am very interested in FastSpin. Eric is making good progress and offering common sense, lean "in the spirit of spin" features that appear well matched to P2.

    Several here appear interested in TAQOS. I saw, "paste this file for..." and think to myself, "That right there is where Forth can crush it." People can benefit and use the tool without having to become expert.

    I didnt quite see that coming, though I should have given I've written, "throw a dictionary at it" numerous times. Seeing that play out is very intriguing.

    I'm about done with business travel and can play for reals. Can't wait.

    About that realization:

    Passion. At this early stage, making tools is expensive. That cost is either dollars and time, or it's time and passion, or drive of some sort.

    Based on what I saw before, getting gcc onto P2 is a heavy lift. It's not so much hating C, though some do, and that is OK. It's that nobody has the combination of passion, skill, time to advance that cause. Dollars aren't there right now either.

    It's a heavier lift than many of our current tool efforts are.

    Seems to me, running on passion, right now, to get this thing through the gate, makes a lot of sense. And that's true mostly because there aren't other options on the table right now.

    So. It may just have to go the P1 way. We got what we got, and people run with it. Should interest grow, perhaps that combination of passion and or dollars will present itself. I think it will. I think that because the capability is going to prove compelling.

    Until more people care, and that takes real product out there more than anything, and it takes that product working too, what we got is pretty awesome, and it is a serious commit to something we just don't know will work.

    I believe it will. I'm sure we all do. But, translating that into the means needed for something like gcc is a stiff wager.

    Seems to me, placing that bet post risk is necessary.

    I think broad acceptance includes C. Any acceptance beyond this group of passionate people takes real chips too.

    Anyway, some perspective worth what you paid.


  • David Betz wrote: »
    And not 'C'.
    Here we go again. This kind of attitude is one reason that there is no port of GCC to the P2 yet. C is actively hated by by many here.

    Maybe you're right but Brian was asking for GCC :) I think P2 will need as Brian put it "and GCC compiler with well thought out support for multiple cores might work."

    I thought everybody hates Spin, but most of all Forth :)

    Funny thing though, is that when you are busy just doing stuff, you are too busy loving it to be hating something else, since it doesn't bother you, but it seems to bother everybody else.
    In fact, I think there is more interest in Forth here than there is in C. However, that is probably justified since you have provided an excellent implementation with great support. I'm not sure that can be said of the current C offering.

  • David Betz wrote: »
    And not 'C'.
    Here we go again. This kind of attitude is one reason that there is no port of GCC to the P2 yet. C is actively hated by by many here.

    And I respect their opinions.

    However, without proper C support sales of the P2 will be 1% of what they would be with a decent, manufacturer supported, C tool chain.

    We can argue all day about my prediction : time will prove one of us right.
  • Heater.Heater. Posts: 21,230
    edited 2018-05-21 17:10
    potatohead,
    I have come to a realization. Most of us have our preferences and reasons. They are very highly distinctive.
    What? Where have you been?

    Surely you cannot have missed all the language war thread that have broken out here over the years? Did you miss the infamous, now sunk, Official Javascript Religious War Thread?
    https://forums.parallax.com/discussion/152201/the-official-javascript-religious-war-thread/p1

    Not to mention all the interminable debates about language choice that go on wherever programmers gather on the net.

    Not to mention the editor wars. The command line vs IDE factions. The operating system battles. Or RISC vs CISC camps.

    Then there is the extreme minutia of source code formatting styles, commenting styles, tabs or spaces, what kind of line end character to use.

    What about the GOTO wars!

    Grief, it's endless.

    My observation is that: Programmers like to think they are rational, logical beings. Which of course they are in large part. Else they would never get anything to work. But they have preferences that they will defend to the death for purely emotional reasons. All the while inventing all manner of reasons as to why their choice is the only rational one!

    For example:

    When high level languages came on the scheme the old guard of assembler programmers dissed them. We had to wait for those guys to die off before high level languages took over.

    Then there is the GOTO. Old school programmers will come up with all kind of reasons why GOTO is essential.

    Me, I want C and C++. Because it's a standard, because it's performant, because it's cross-platform.

    I want Javascript. Because it's a standard, because it's dead easy when perhaps hyper-performance is not critical (besides we have extra cogs to do the fast bits), because it's cross-platform.

    There. See how rational I am :)

  • Well, I could have improved that. The major point comes later.

    Bootstrapping gcc is enough of a lift that it makes the most sense once working devices are a reality.

  • David Betz wrote: »
    In fact, I think there is more interest in Forth here than there is in C. However, that is probably justified since you have provided an excellent implementation with great support. I'm not sure that can be said of the current C offering.
    I'm pretty sure it can't be said of the current C offering.

  • Dave Hein wrote: »
    David Betz wrote: »
    In fact, I think there is more interest in Forth here than there is in C. However, that is probably justified since you have provided an excellent implementation with great support. I'm not sure that can be said of the current C offering.
    I'm pretty sure it can't be said of the current C offering.
    It's unfortunate because there was a fair amount of enthusiasm for improving PropGCC at the start. The trouble is, none of the more recent work ever found its way into an official release. I think Parallax should consider that when planning GCC for P2. It isn't enough to just get it working. It has to be supported and continually improved.
  • Heater.Heater. Posts: 21,230
    Well there is a thing.

    Whilst I'm dreaming of C and Javascript, the Forth guys are rolling up their sleeves and getting solutions working. Hats off to them for that.



  • Heater. wrote: »
    Well there is a thing.

    Whilst I'm dreaming of C and Javascript, the Forth guys are rolling up their sleeves and getting solutions working. Hats off to them for that.


    Yes, I agree. The support for Tachyon is phenomenal and what it can do is amazing on P1 and I'm sure it will be even more impressive on P2. I have always been attracted to the Forth language. I just never seem to have the time to dive in and learn it in depth. I'm hoping that will change in the near future as my contract work seems to be winding down.
  • Forth will be very useful when the P2 first comes out because of the lack of development tools for Spin and C/C++. However, Eric is doing some great work on fastspin, and I'm sure many Spin developers will use it. Chip's version of Spin2 should come out some time after the chip comes out after he's had some time to work on it.

    I'll continue plugging away on p2gcc. I plan on cleaning up how data sections are handled. Currently, global data is a real kludge. I also plan on integrating P1's PropGCC library code into p2gcc. I wrote a minimal math library several months ago that supports floating point, but I haven't integrated it yet. p2gcc will support C++ once I port the relevant library code from P1 PropGCC.

    At some point Parallax needs to fund a GCC project for the P2 like they did for the P1. I think C/C++ is essential for the P2 to be a success.
Sign In or Register to comment.