All Activity

This stream auto-updates   

  1. Yesterday
  2. Hi, I'm new here so I hope I'm not breaking any rules by just writing a post to ask a beginner question. Wat I'm trying to do is build the Gameduino examples delivered with Designerstudio 1.0.8 (I tried 1.0.7 and 1.0.5 too), the FPGA circuit runs fine, but the C code won't compile. The errors I get are pasted below : I'm running Designer lab on Mint linux 18.2 Kind regards, Paul ###################################################################################################################33 Arduino: 1.0.8 (Linux), Board: "Papilio DUO - AVR - No USB - ISP" In file included from /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:17:0: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.h:50:39: error: 'prog_uchar' has not been declared static void copy(unsigned int addr, prog_uchar *src, int count); ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.h:61:25: error: 'prog_uchar' has not been declared static void microcode(prog_uchar *src, int count); ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.h:62:45: error: 'prog_uchar' has not been declared static void uncompress(unsigned int addr, prog_uchar *src); ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:129:47: error: 'prog_uchar' has not been declared void GDClass::copy(unsigned int addr, PROGMEM prog_uchar *src, int count) ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:151:33: error: variable or field 'microcode' declared void void GDClass::microcode(PROGMEM prog_uchar *src, int count) ^ In file included from /home/paul/work/fpga/papilio/DesignLab-1.0.8/hardware/arduino/avr/cores/arduino/Arduino.h:28:0, from /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:14: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:151:25: error: expected primary-expression before '__attribute__' void GDClass::microcode(PROGMEM prog_uchar *src, int count) ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:151:50: error: expected primary-expression before 'int' void GDClass::microcode(PROGMEM prog_uchar *src, int count) ^ In file included from /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:242:0: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/font8x8.h:1:16: error: 'prog_uchar' does not name a type static PROGMEM prog_uchar font8x8[] = { ^ In file included from /home/paul/work/fpga/papilio/DesignLab-1.0.8/hardware/arduino/avr/cores/arduino/Arduino.h:28:0, from /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:14: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp: In static member function 'static void GDClass::ascii()': /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:258:28: error: 'font8x8' was not declared in this scope byte b = pgm_read_byte(font8x8 + i); ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp: At global scope: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:346:14: error: 'prog_uchar' has not been declared void begin(prog_uchar *s) { ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:368:3: error: 'prog_uchar' does not name a type prog_uchar *src; ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp: In member function 'void GDflashbits::begin(int*)': /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:347:5: error: 'src' was not declared in this scope src = s; ^ In file included from /home/paul/work/fpga/papilio/DesignLab-1.0.8/hardware/arduino/avr/cores/arduino/Arduino.h:28:0, from /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:14: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp: In member function 'byte GDflashbits::get1()': /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:351:34: error: 'src' was not declared in this scope byte r = (pgm_read_byte_near(src) & mask) != 0; ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:355:7: error: 'src' was not declared in this scope src++; ^ /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp: At global scope: /home/paul/work/fpga/papilio/DesignLab-1.0.8/libraries/Gameduino/GD.cpp:374:45: error: 'prog_uchar' has not been declared void GDClass::uncompress(unsigned int addr, prog_uchar *src) ^ Error compiling. This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.
  3. Sprint 2

    I have the audio working now and everything is pretty much done, I do need to tweak some of the values that control the engine sound frequency but otherwise it's ready to go. I also did Sprint 1 because the hardware is almost identical. I'll post the code here soon in case anyone else wants to play with it, I have not had time to port it to the Papilio, been too busy working on more games but that should be simple, other than the ROMs and RAM the code should be platform-agnostic. The biggest challenge with actually playing the Sprint games is the controls, you need some sort of steering wheel with an optical encoder, ideally 36 pulse per revolution. You also need a gear shift, this has 3 switches for 1st, 2nd and 3rd gear, open circuit selects 4th. Super Bug is one that I considered doing at some point, the hardware is a bit different on that though, 6800 based and more closely related to Fire Truck which is another game I'd like to make. For now I'm working on some other 6502 based games, Ultra Tank first and from that I can derive Sprint 4 which is one of the first games to have color. I'm also looking at Atari Football which has an interesting scrolling playfield. Later perhaps Missile Command, it uses relatively simple hardware though it will probably require external RAM.
  4. Sprint 2

    nice!! The screenshot brings up good memories. Super Bug next ? :DD -V
  5. Last week
  6. Programing Error Codes

    I'm new to the Papilio world. I've created a new .bit file to change some basic functionality within a design. I now get 0x19 or 0x11 as an error code. (failed to configure). Where can I find a detailed description of these error codes? Thanks in advance for any help.
  7. SPI MODE0

    Let me take a look at that and I'll get back to you. Probably there's a bug there, I don't recall testing it with non-usual modes (it's also tricy to implement). Alvie
  8. Hello,I want to share an interesting project of designing a color detector by using RGB LEDs with you. If you have any interests, then keep on reading. Have you ever wanted an automated way to detect the color of an object? By shining light of a certain color on the object and looking at how much light is reflected back, you can tell what color the object is. For example, if you shine a red light on a red object, that light will be reflected back. If you shine a blue light on a red object, the object will absorb some of that light and less of it will be reflected back. https://www.youtube.com/watch?v=DqboDjQX0UE Step 1: Parts Needed I used a PIC 16F887 Microcontroller, but almost any with a pulse-width-modulation capability will work. 1 RGB LED (http://www.kynix.com/Product/Cate/545.html) 1 Microcontroller (http://www.ti.com/microcontrollers/msp430-ultra-low-power-mcus/overview/overview.html) 1 Standard red LED 1 1k ohm resistor 1 Photoresistor (changes resistance depending on the amount of light shone on it) Some wires I only need the microcontroller and RGB LED to have a wide range of color detectors, but if you only want a circuit that detects one color, you don't need a microcontroller - you only need a bright LED of the color you want to detect. The standard red LED is the "indicator LED" - it lights up when the right color is detected. Step 2: Build the Circuit The schematic is rather simple, and in general form, is shown below. The RGB LED is externally powered by a PWM signal. I put electrical tape around the photoresistor so ambient light doesn't get in - only the light directly above it will be detected. Step 3: The Code This code was written for a Microchip PIC 16F887, but hopefully you can get the general idea. I used the built-in potentiometer on my development board to vary the color spectrum of the RGB LED (and it doesn't go through the entire spectrum because I don't have 3 PWM modules, but it's good enough) Comments included. #include <16F887.h> #include <delay.h> #include "delay.c" #include <stdlib.h> #include <STRING.h> #use delay(clock = 4000000) #FUSES INTRC,NOWDT,NOPUT,NOMCLR,NOPROTECT,NOCPD,NOBROWNOUT,NOIESO,NOFCMEN,NOLVP #byte CCP1CON = 0x17 #byte CCP2CON = 0x1D #byte PWM1CON = 0x9B int value = 128; int p1 = 0; int p2 = 0; void my_setup_ccp1(int8 value) { output_low(PIN_C2); CCP1CON = value; PWM1CON = 0; } void my_setup_ccp2(int8 value) { output_low(PIN_C1); CCP2CON = value; } //=================================== void main() { //A4 = power source for photodiode output_high(PIN_A4); output_high(PIN_B1); setup_adc(ADC_CLOCK_INTERNAL); set_adc_channel(0); setup_adc_ports(sAN0); //Timer/Interrupt setup enable_interrupts(INT_TIMER2); my_setup_ccp1(CCP_PWM); my_setup_ccp2(CCP_PWM); setup_timer_2(T2_DIV_BY_1, 128, 1); //setup_compare(2,COMPARE_PWM|COMPARE_TIMER2); while(1){ // Prevent PIC from going to sleep. //SET PWM DUTY CYCLE output_high(PIN_A5); //Pin A3 is the photodiode connection if(input(PIN_A3) == 1) output_high(PIN_A4); else output_low(PIN_A4); //Read value of potentiometer to change color of LED value = read_adc(); switch (value) { case 0: p1 = value; output_low(PIN_C0); p2 = value; break; case 50: p1 = value; output_high(PIN_C0); p2 = value; break; case 100: p1 = value; output_high(PIN_C0); p2 = value; break; case 150: output_high(PIN_C0); p1 = 50; p2 = value; break; case 200: output_low(PIN_C0); p1 = 0; p2 = value; break; case 250: p1 = 0; p2 = value; output_low(PIN_C0); break; } p1 = value; p2 = 128 - p1; set_pwm1_duty(p1); set_pwm2_duty(p2); } } Step 4: Applications! A simple color detector like this can be used in robotics, or for cool projects like separating legos by color, sorting M&Ms;, or as an aid for color blindness. Hopefully this guide was helpful in enhancing a project you had in mind! LEDs are good for so many things....
  9. hamster tutorial help

    Excellent, glad you got that sorted out too. BTW, I'm working on new papilio pro examples over at gitlab. I've still got a long way to go but it might be interesting to see what you think. https://gitlab.com/Papilio-FPGA/papilio-quickstart-vhdl I've also put together a cloud environment so you don't have to mess around with installing Xilinx ISE to synthesize these new projects. You will need to place your Xilinx.lic file in ~/.Xilinx/Xilinx.lic for it to work. Keep in mind this is all just tests that I'm running, not really ready for prime time yet. But might be worth checking out if you are interested. https://codenvy.io/f?id=factoryyd01z6lgdawlk52f Jack
  10. Path of least resistance for beginner..

    Rob, Glad you got it working, there are tutorials over at http://learn.gadgetfactory.net that can help you get started too. Jack.
  11. hamster tutorial help

    Okay the first line of my ucf file I had: NET switch_1 LOC = "P120" | IOSTANDARD=LVTTL; ; #pap1 was switch (6) p3 instead of NET switch_1 LOC = "P120" | IOSTANDARD=LVTTL; #pap1 was switch (6) p3 The double "; ;" was causing a syntax error I didn't notice. I was actually downloading the previous bit file unknowingly. Downloading to SPI Flash, leaves everything working! -Rob
  12. hamster tutorial help

    Hello. Im able to download pre made bitfiles to my Papilio Pro + LogicStart using the bitloader, and DesignLab, however, Im running into a problem trying to create a simple vhdl example from the hamster fpga ebook. Specifically, Im at section 6.4 "Downloading the Design Into the Device." Do I select FPGA or SPI Flash to download to? The screen-shot seems to imply FPGA. At any rate, the Switches_LEDs project fails to operate on the physical board as I expect. Instead when I download to SPI, 3 of the digits show "8" while one is blank. The LEDs are all off, and the switches have no effect. I did make the following changes from the tutorial for the Pro board: I set device to Spartan6 xc6slx9 tqg144 speed -2 And the constraints file is: # Constraints for Papilio Pro NET switch_1 LOC = "P120" | IOSTANDARD=LVTTL; ; #pap1 was switch (6) p3 NET switch_0 LOC = "P121" | IOSTANDARD=LVTTL; #pap1 was switch(7) p4 NET LED_1 LOC = "P133" | IOSTANDARD=LVTTL; #pap1 was led(6) p16 NET LED_0 LOC = "P134" | IOSTANDARD=LVTTL; #pap1 was led(7) p17 Above changes based on pinout chart: http://papilio.cc/index.php?n=Playground.PapilioPinouts Bit stuck for ideas, any help appreciated. Thanks.
  13. Path of least resistance for beginner..

    Sorry, for anyone following, finally got it working. Had to select a sketch that supported both the Papilio Pro *and* the LogicStart. "MegaWing_Logicstart" was the one. That's great. Now I'll start working on some actual vhdl in the ISE. Cheers
  14. Path of least resistance for beginner..

    Alright, so after writing this, I suspected I have to upload the ZPUino image , which this thread seems to say. I'l dig around that area.
  15. Hello. I recently got around to diving into a Papilio Pro I received about 3 years ago. I struggled through the Windows 10 issues with the missing port/usb detection and the Windows 7 Web Pack ISE crashes. Im now able to download the Papilio Pro 'hello world' bit file example, and confirms it dumps a default ascii table to a virtual COM port. I then downloaded DesignLab, but notice there's no Papilio Pro board (just the Papilo Pro / ZPUino ?) So I think Im out of luck there. I also have a LogicStart mega wing, and was hoping there was some simple precompiled bit file I could download and verify its working properly. Does such a thing exist, or do I have to manually create one with the Xilinx ISE and clips Hamsters fpga ebook? Thanks very much, Rob.
  16. Earlier
  17. Hi, What for for me currently is to open a project e.g. ZPUino multiple serial ports and add the component (e.g. spi) and start modifying it but I am not 100% sure this is the right way to create a clean library
  18. DesignLab_Examples/00.Papilio_Schematic_Library/Libraries/Wishbone_Peripherals is outdated, you should use the other one... I will have to take a look later at how to update that library, it has been a while. Jack
  19. Sprint 2

    Having wrapped up Super Breakout I focused on Sprint 2 and have that running now, I still need to implement the audio and do some testing but the game seems to be working fine. The photo doesn't really do it justice, there is a lot of moire distortion which is only an artifact of the camera interacting with the scan lines on the CRT. The cars are moving quickly so they appear blurry in the photo but everything looks good in person. These old games are small, Sprint 2 would fit easily in a P1 250k with room to spare. I'll share the code when I'm finished, or if I get tired of working on it and stall.
  20. Papilio Pro still produced?

    Currently you can get them for cheap at seeed studio: https://www.seeedstudio.com/Papilio-Pro-p-1301.html
  21. Papilio Pro still produced?

    So, where can I buy it now?
  22. Hi, I am trying to modify the standard Wishbone peripherals. Here is what I did I cloned the git repository containing the DesignLab examples, renamed my local libraries to libraries-old and configured the ide to use DesignLab_Examples as Sketchdir.(it llook like the examples directory might also need a rename) Next using the file open I go to libraries/ZPUino_Wishbone_Peripherals and open the "edit_library.ino" in that folder. Next I clicked on the sketchdir://Chip_Designer.xise to open the ISE. This opens the ISE editor. For this example the editor open with an error that it can not find AUDIO_zpuino_wb_pokey.vhd So I started seaching for that file and found it in a different folder where I found a similar project For short DesignLab_Examples/00.Papilio_Schematic_Library/Libraries/Wishbone_Peripherals and DesignLab_Examples/libraries/ZPUino_Wishbone_Peripherals Are similar but different. The Wishbone_Peripherals is lacking a project file and the ZPUino_Wishbone_Peripherals is lacking a vhd file. How am i supposed to modify the library?
  23. Docker is indeed not intended for "End Users", it is a product for DevOps professionals. Do use it you need also understand basically how it works. For example it is not a got idea to always execute the docker run command you mentioned above every time, because you will fill up your machine with containers. It is better to use only docker start/stop after the initialization. It helps of course to bundle independent software packages (e.g. ISE, fusesoc and the gcc toolchain for your favorite soft processor) into a reproducible environment. But it has also a lot of drawbacks. The question is what you want to reach. The cloud9/Docker approach would make senses when combined really with the cloud version of cloud9, running also the builder in the cloud. Combined with maybe some "extended" version of fusesoc to configure e.g. the slots of zpuino. For people that want to use the FPGA as a "super-flexible" Microcontroller instead of diving deep into FPGA design. In the meantime I have switched the workflow for Bonfire to FuseSoC. For editing and debugging I use ISE, but only on the project generated by FuseSoc (with the --no-export option). So i can use the comfort of ISE and isim, but have always a project structure which I can easily reproduce on a new computer/VM. I'm always trying to have an environment which I can recreate in a few hours. In the past I had often a development machine, maintained over years where I simply didn't know anymore how it was setup and was therefore also not able to break down the prerequisites of a project. Nowadays my development VMs are usually only a few weeks or months old and I frequently create new ones. So I will not update my Vivado 17.02 VM to 17.03, I will create a new one from scratch and move all my work over. I never install anything besides Office and a Web Browser on the host system (which usually is Windows). fusesoc helps a lot, because it is a tool chain agnostic method to organize and package HDL projects. BTW: I have started with the zpuino UART to isolate it and extract it to a FuseSoC project, I will post details soon.
  24. Super Breakout preview

    This is now complete and working, source is attached. Currently this is targeted for an Altera EP2C5T144C8 mini board but porting it to the Papilio should be very easy, doing so is on my list of things to do but I think I'll take a break after debugging the last few issues with this. All it should really take is replacing the Altera PLL with a Xilinx DCM and replacing the ROMs with something Xilinx compatible. Several of them are only 4 bits wide and it seems like Romgen doesn't support that but I'm sure it could be modified. Also I intend to replace the sync and address decoder PROMs with combinatorial logic since they're such small devices that it's a bit pointless to use ROM for that application these days. For the control input I'm using one of these https://www.ebay.com/itm/new-incremental-optical-rotary-encoder-600-pulses-line-AB-two-phase-5-24V/272391186094 but if you prefer to use a pot as originally used in the game, duplicate the ramp generator and analog comparator from the the schematic in the Super Breakout manual. I've already designated some pins for that purpose and included a second paddle interface file to substitute for the one that interfaces to the encoder. To make it really authentic, some strips of colored lighting gels could be stuck to a B&W CRT as was done in the original game, or the color could be added with a bit of additional code was was done with the FPGA implementation of Space Invaders. If one wishes to use a VGA monitor instead of the original composite type, the scan doubler from Space Invaders could also be added easily enough. Super_Breakout.zip
  25. I managed to install the libusb-win32 driver. The people of pulseview said they never removed the pipistrello support..
  26. Open Bench Logic Sniffer with 64MB capture buffer

    Sorry but I stopped following the sigrok/pulseview stuff years ago since the development was in my view not the way to go unless you are prepared to do all the compiling yourself. Windows is supported in a very limited way with the nightly build of whatever development code they have that day. However, you can build the windows installer of the last release code on a Linux system yourself if you follow the instructions. The biggest problem is that on windows you need to replace the FTDI driver for the FT2232 chip with a driver based on the Linux libftdi driver. I have not managed to get that working since early 2014. This is really a question to the sigrok team though.
  27. @mkarlsson How did you manage to build the pulseview-0.2.0-installer.exe with the pipistrello OLS 64M driver? I am asking because with the v2.0.2 I am not able to save sr-files (it is an old version with bugs). The actual nightly build of pulseview doesnt have the 64M driver. Do you have an actual build for windows or can you explain how to compile the pulseview for windows with the driver for 64M? Or: How to use the actual nightly build for win with the pipistrello OLS 64M? With your version (http://www.saanlima.com/download/pulseview-0.2.0-installer.exe) the 64M variant is usable, with the nightly build not.
  28. SPI MODE0

    Hi, I started looking into the code to try and understand the problem myself. the SPI master does have enough flags passed to the code e.g. spi_samprise is kinda taken into account to determine when to sample the signal (at rise or fall of the clock) https://github.com/GadgetFactory/DesignLab_Examples/blob/master/libraries/ZPUino_Wishbone_Peripherals/COMM_zpuino_wb_SPI.vhd#L250 and (I think sets the do_sample correctly) https://github.com/GadgetFactory/DesignLab_Examples/blob/master/libraries/ZPUino_Wishbone_Peripherals/spi.vhd#L81 However https://github.com/GadgetFactory/DesignLab_Examples/blob/master/libraries/ZPUino_Wishbone_Peripherals/spi.vhd#L95 Will alway shift on the rising edge of the spi clock. I made small modifications trying to fix it but I am getting into trouble because I need to skip the first rising edge e.g. if try to I skip the first rising edge all my data if off by one clock cycle.
  29. Load more activity