MyHDL examples for LogiPi

Does anyone know of a good resource for myHDL examples for LogiPi or Spartan 6?

I googled, but didn't really find anything great for beginners.

thanks

Comments

  • Hi @woolfel

    We do not have any logi-pi specific examples using myhdl, but it should be straightforward to convert any other examples you find to work with the logi-pi.

    Here is a full workshop on using myhdl.  https://bitbucket.org/cfelton/pyohio

    You will just need to make sure use the logi-pi ucf file when building the generated HDL.  Then use the logi-loader after you have built the example.  

    Hope this helps.
    woolfel
  • thanks for the tip. I'm still a newbie to FPGA. If I get examples working with myhdl, I'll post them on my github
  • The myhdl website has many examples in their examples section, but nothing that goes down to synthesis for a specific board. What kind of example would you like to get for the logi-pi ? I can add something with myhdl to the logi-project repository sometime next week
  • Hi jpait,

    I already went through a few the basic examples on myHDL website. Right now I'm reading about converting to Verilog and VHDL. I thought of a couple of examples, though I haven't gotten that far yet.

    Simple decision tree - since I'm playing with Raspberry Pi, BrickPi and autonomous robots, I was thinking simple navigation logic that uses ultrasonic distance reading and takes appropriate action

    data filter - input an array of data elements and filter out the noise. an example of this would be similar to line following using Picamera. The Pi would do the line detection on the image and send the data to LogiPi. the filter would remove lines that are too thick or thin.
  • thanks, I will take a look.
  • Hi jonathan,

    I was able to follow that tutorial, run the simulation, generate the .bit file and load it with logi-loader. Dumb question, how would I call it from python after that? Looking at the other examples in logi-apps on github, I need to use logipi driver to initiate the process.

    thanks

    peter
  • What do you mean by call it in python ? If you want tobcommunicate from python with the hardware in the FPGA, you 'LL need to use a communication bus such as i2c, SPI or UART. In logi-projects we have designed a SPI to wishbone bus that allow us to have our components memory mapped on the SPI bus. We then have designed Python bindings for this bus which allows us to communicate with our hardware components from python.
  • thanks for responding so quickly.

    that helps clarify things. I was able to follow your tutorial on element14, generate the verilog, generate the bit file in xlinix ise and load it with logi loader. The part where I got lost was running that code on the LogiPi.  If I understand it correctly, I need to use the SPI or i2c bus from python.

    when I run the pwm simulation from python with myhdl, it prints out to the terminal window. I was stupidly assuming I could update the testbench to call the pwm_module running on LogiPi, but didn't really know how.

    thanks, I'll keep reading the samples and scratch my head a bit more.

    peter
  • I took a look at the drivers in logi-projects. I forgot to include the LogiPi ucf when I generated the .bit file, so I need to update the ISE project to use that. This is the correct one to use?
    https://github.com/fpga-logi/logi-projects/tree/master/logipi-gpio_example/hw/hdl

    Once I have the new .bit file for pwm_module, I'll need to write a python script that looks similar to the sample testbench and use SPI/i2c to communicate with LogiPi
  • I tried to use the ucf file under logipi-gpio-exaple folder and got an error in Xilinx ISE. Anyone have a tip on using ucf file or configuring Xilinx ISE?

    I attached a screen shot of the error I get.

    thanks

    peter
    logipi-ucf-error.png
    1721 x 1144 - 166K
  • The pin names declared in the ucf must match the name of the input/output ports of your pwm module. Can you copy paste the entity section of you pwm module for me to check ?
  • thanks for the tip. after you said that, I realized I never changed the original code to read/write to the input/output

    I will look at the other examples and try again
    thanks

Sign In or Register to comment.