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.
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
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.
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.
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.
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.
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?
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 ?
Comments
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.
https://www.element14.com/community/groups/fpga-group/blog/2014/10/28/alternatives-to-vhdlverilog-for-hardware-design
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
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
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 attached a screen shot of the error I get.
thanks
peter
I will look at the other examples and try again
thanks