Shop OBEX P1 Docs P2 Docs Learn Events
DE0-Nano and DE2-115 add-on boards for Prop2 emulation are ready! - Page 4 — Parallax Forums

DE0-Nano and DE2-115 add-on boards for Prop2 emulation are ready!

1246

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-10 09:44
    Yes, I do have that jumper installed. I think the freq difference is probably due to the PLL in the nano/
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-10 10:00
    My DE2-115 is now alive as a P2!!!!

    Just ran Chip's 1080p demo - worked fine :)

    Next: World Domination...
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-10 10:25
    Here is a VGA 1080p version of the demo
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-10 10:39
    Here is a VGA 720p version of the demo
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2013-03-10 11:12
    I just tried Chip's NTSC 256x192 on my TV. Wow!!!!!!! looking good.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-10 17:02
    David Betz wrote: »
    I wrote a simple one COG program that blinks the 6 LEDs and that seems to be working fine so there isn't a problem with the LED itself or the connection of the LED to the Propeller pin.

    My multi-cog demo uses a funky token passing scheme to pass control from one COG to the next. When a COG gets the token it changes its blink rate. That isn't happening even with the COGs that are sucessfully blinking LEDs. Is there any chance that COG 5 isn't working? That would explain why LED 4 isn't blinking and also why the other LEDs don't change blink rates.

    Edit: I just modified my multi-cog demo to use only 5 COGs and it is working fine including flashing LED4. I think I'm having trouble with COG 5.
    I've done some more experimenting including running my multi-cog program again on the old DE2-115 configuration file and I'm pretty sure that COG 5 does not work with this new configuration. I've even tried a simpler program that does nothing except load an LED blinking program into COG 5 using coginit so I'm sure it's really loading COG 5. It doesn't work. The exact same code loaded into COG 4 works fine. Does this new configuration file support only 5 COGs?
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-10 17:57
    Cog 5 issue confirmed. I see it too.

    I noticed some changes. Are the old I/O pins still connected? I used to plug two Prop Plugs into the DE2, one for programming, the other for an instance of the monitor for observing results and moving data into and out of the chip. I can't do that anymore. I'm assuming those were moved out into the break out board.

    If so, I need to get some header pins to enable that workflow to continue. What is output on those pins, if anything now?

    Normally, I just leave the P2 on and running. I'll upload a new program, then jump into the monitor window to go poking around. Takes just a tap on the space bar to get communicating again. In this case, since I don't have two physical connections to the second Prop Plug, I decided to just run instances of the monitor on one COG at a time with this code, which is just my two monitor template with one stripped out:
    'Start the monitor on a COG
    'For NANO FPGA, use COG 0
    'For DE2, use any COG, but make sure only one monitor is running
    
    DAT
            org
    
            setcog #4               'set target COG 0
            coginit monitor_pgm, monitor_ptr1  'start monitor on target COG
    
            cogstop 0
    
    
    monitor_pgm     long    $70C            'ROM entry point for monitor
    monitor_ptr     long    15<<9 + 13      'Pins for one monitor
    monitor_ptr1    long    90<<9 + 91      'Pins for the other one 
    

    Steps were:

    1. Power on P2
    2. Verify monitor on COG 0
    3. Edit code to pick another COG
    4. Use PNUT to upload new program
    5. Verify monitor on designated COG
    6. Repeat for all COGS

    Worked great, until COG 5. When I try this with COG 5, the monitor does not run. I was going to write that accessing COG 5 sort of locks up the emulation, but it turns out that was just me. It's just as if COG 5 isn't there anymore, except the LED does light up anyway. And that's true for any COG ID it seems. Not sure this was the old behavior because I never ran more than a few COGS, and didn't pay attention to the LED when asking for the higher numbered COGS.

    Perhaps adding the logic for the DAC emulation required a bit more of the FPGA and running 6 COGS was right on the edge?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-10 18:40
    potatohead wrote: »
    Cog 5 issue confirmed. I see it too.

    ...

    Worked great, until COG 5. When I try this with COG 5, the monitor does not run. I was going to write that accessing COG 5 sort of locks up the emulation, but it turns out that was just me. It's just as if COG 5 isn't there anymore, except the LED does light up anyway. And that's true for any COG ID it seems. Not sure this was the old behavior because I never ran more than a few COGS, and didn't pay attention to the LED when asking for the higher numbered COGS.

    Perhaps adding the logic for the DAC emulation required a bit more of the FPGA and running 6 COGS was right on the edge?

    All 6 COGs worked with the previous configuration file that added support for the SD card. I tried both of my test programs on that and both were successful in loading COG 5 but both fail on the new configuration file. If the new one was configured for only 5 COGs that's fine with me. I don't need all 6 COGs for the code I'm writing. I was just surprised that they didn't all work.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-10 18:56
    Yep. Me too. I suspect it took more of the FPGA to do the DAC emulation. Chip will tell us soon enough, I'm sure.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-10 19:25
    Here is an ordinary SD YPbPr 256x192 demo program. This is component on ordinary TV sets, not HD, though it should display on all component video capable TV displays. It's a modification of the NTSC one to use the component signals, not the composite / s-video ones. This one with interlace added would equal 420i, in other words. On the display I'm using, 640 pixels would be getting close to the high end of what the TV is capable of.

    I'll add interlace later on. Just wanted something that runs on my older SD component display to experiment a little.

    Spent some of the day just getting my mind wrapped around the new color space capability. I'm kind of stunned over how easy it is to change displays and signal setup overall. Sheesh! Nice work Chip!
  • cgraceycgracey Posts: 14,151
    edited 2013-03-10 20:04
    I forgot to mention that the latest DE2-115 configuration only yields 5 cogs (0..4). Six would not fit! This was stated in the pinout.txt file. Also, all the pin connections were listed there.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-10 20:10
    cgracey wrote: »
    I forgot to mention that the latest DE2-115 configuration only yields 5 cogs (0..4). Six would not fit! This was stated in the pinout.txt file. Also, all the pin connections were listed there.
    Thanks Chip! At least now I know I'm not going crazy! :-)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-10 20:12
    Guess I need to read ALL the files next time. :)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-10 22:47
    Oh, this is too cool! So I'm working on various display options, just checking out the core features. The way VID works now is vastly more friendly than it is on P1. Pixels per waitvid locks in the max clocks for the scan line! This means changing pixel sizes, even on the fly, is cake now. Easy.

    Mode 8 is a very nice, simple 16 color display...

    Doing a whole scan line from one waitvid, streaming pixels in yields a lot of cycles for processing the next.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-11 12:22
    Agreed - I am playing with the video modes as well.

    BTW, your 480p mode worked fine on my Insignia 24"
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-11 12:25
    Excellent!

    I've not tested on anything else but the SONY. Really, the way it is right now is 240p (Is that even a term?)
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-11 12:37
    Sorry, I quoted my monitor incorrectly :)

    It says it is 480p @ 30Hz ... but it does display it
    potatohead wrote: »
    Excellent!

    I've not tested on anything else but the SONY. Really, the way it is right now is 240p (Is that even a term?)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-11 13:01
    Interesting!

    It's actually a 60Hz display, 240 lines old school NTSC, like Apple 2 / Atari type display with no half-scan line included. So nice to have that component input. Really wanted that on the P1.

    Have you guys been tinkering with different display mappings? One can take an 800 pixel display, render it on VGA, HDTV, NTSC, even composite with just a few changes. (Of course, lots of pixels get lost on composite.)
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-11 13:03
    I am guessing then that it is displaying two frames per screen, at 30Hz

    Either that, or my monitor is a VERY confused puppy.
    potatohead wrote: »
    Interesting!

    It's actually a 60Hz display, 240 lines old school NTSC, like Apple 2 / Atari type display with no half-scan line included.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-11 13:06
    Hmmm... Can you see color dot crawl?

    Scratch that, there won't be any. Forgot. I'll have to do an animation test of some sort to see whether or not the display is doubling up frames... I know my LCD VGA display does that with lower scan rates. Things that are supposed to flicker just don't...
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-11 13:15
    Very little, some slight wavyness - both mostly on the first (orange) bar.
    potatohead wrote: »
    Hmmm... Can you see color dot crawl?
  • AribaAriba Posts: 2,690
    edited 2013-03-11 19:01
    Today I had time to play a bit with the Nano AddOn board I received - thank you Parallax.

    I don't have a TV with component input here, so concentrated me on VGA.

    All the posted VGA drivers show a picture on my monitor, but not always at the right position and with warnings about non standard frequencies. (Yes a have a picky Monitor).
    If I set the pixel clock for the 640x480 driver from 30 to the standard 25 MHz, I can see why Chip has choosen 30MHz. The timing is right with 25MHz but you get a lot of jitter in the picture. I think with the real Prop2 with 3 times higher clock rate this will not be such a problem.

    Anyway after I figured out how this color bars are generated by streaming out of the CLUT ram, I tried out other Video shifter modes. One of them, mode 7, lets you stream 1bit pixels from the CLUT, and I thought this can be used for a simple Text display. Just hold the font data in the CLUT and stream out 8 pixels from the right position in the CLUT for every character row.

    Attached is my first VGA-Text experiment, it holds a font with 128 8x8 characters in the CLUT and allows 80x60 characters - not bad for the first try and on an Emulator that has only 1/3 of the speed of the real Prop2. This may not be the best approach for a text driver, but it is intresting anyway. It would be no problem to allow a different color for every character, this would just need a word per character in the screen buffer.

    It uses the timing for 640x480 VGA, so if your Monitor don't show the picture correct, you can change a constant at begin of the source to choose 25MHz pixel clock. The picture will then be a bit jittery.

    The font is a bit bold, it is made for TV monitors, but I had only this one around..


    Andy
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-11 19:32
    Sounds good, Andy - I will check it out tomorrow. We needed a text driver!

    It will be interesting to see what the maximum PLL output frequency will be with the actual chips - the higher the better...
  • RaymanRayman Posts: 14,640
    edited 2013-03-12 02:44
    Interesting about the 30 MHz VGA... I think I've seen that the Prop PLL is less jittery when the output is an even factor or multiple
    of the main crystal. But, the DE0-nano seems to have a 50 MHz oscillator, right? I'd think it would be pretty good at 25 MHz...
  • LeonLeon Posts: 7,620
    edited 2013-03-12 03:25
    Yes, it is 50 MHz.
  • RaymanRayman Posts: 14,640
    edited 2013-03-12 15:12
    Had a few minutes to get started today... Didn't quite get there today...

    I followed the instructions in the Cluso sticky thread and installed the stand-alone installer...
    Found the USB-Blaster driver in that install directory and installed it.
    Ran the programmer and programmed the DE0 sucessfully.

    But, no luck connecting via PropPlug...

    After floundering for several minutes, I think I figured out that I should have programmed the DE0
    with the Saphieha... code instead of the one in the stick thread. Can this be?
  • AribaAriba Posts: 2,690
    edited 2013-03-12 16:19
    Rayman

    It depends on the hardware you use.
    There are 3 possibilities:
    1) DE0-Nano without AddOn board: you need the code from the sticky thread
    2) DE0-Nano with Chips AddOn board: you need the code from post #38 in this thread
    3) DE0-Nano with Sapieha's AddOn board: You need the code posted in Sapieha's thread.

    Andy
  • TubularTubular Posts: 4,702
    edited 2013-03-12 16:59
    Apart from getting the correct .JIC binary as Andy pointed out....

    You need a jumper across pins 3 & 5 of the 26 pin connector. (adjacent to the square pad of pin 1)
    ... and remove the flash chip to the breadboard ...

    NTSC composite video out on DAC0, Component output is DAC 1/2/3
  • RaymanRayman Posts: 14,640
    edited 2013-03-12 17:15
    Ok, so I was using the wrong file... That explains it then...
    I did forget the jumper, but remembered, but it didn't help...

    I was under the impression that Saphieha's and Chip's boards were the same thing, guess not.
    Thanks for the tips.
  • TubularTubular Posts: 4,702
    edited 2013-03-12 19:25
    Backing up a step... after you load the Altera DE0 JIC file in, do you get the single green light on (indicating cog 0 running)?
    If you connect the prop plug and hit F7 in the Prop Tool does it recognise a propeller version 32?

    I think Pnut possibly only covers com ports up to 9, perhaps that is an issue
Sign In or Register to comment.