Hi,
I'm trying to compile the FPGA with Quartus sp13. It seems something has been changed somewhere.
The opencore I2C connection changes from separate I/O lines to bi-directional ports ( in VHDL, not the actual hardware pins ) and Qsys determines it needs more address space than it should ( 16 ). The map given from the repository shows it only needs 8.
Result is that while I have fixed enough to get an image, it doesn't work. It gives a failure reading the si_5338.
Any ideas?
opencore I2C problem
-
- Posts: 303
- Joined: Mon Mar 04, 2013 4:53 pm
Re: opencore I2C problem
What commands are you running from the commandline? What errors does it have? Can you provide a screen shot?
I was able to use the build_bladerf.sh script to build using 13.0sp1, load the FPGA and set/get the si5338 registers.
I was able to use the build_bladerf.sh script to build using 13.0sp1, load the FPGA and set/get the si5338 registers.
-
- Posts: 8
- Joined: Fri Mar 01, 2013 3:03 pm
Re: opencore I2C problem
I tried the same thing and found the same problem.
It appears that there is an older version of oc_i2c_master included in ~/altera/13.0sp1/ip/altera/altera_dp/hw_demo/altera_avalon_i2c
If you open Qsys and right click on 'Communication - OpenCores I2C Master' you'll see 2 different entries for the core, if you hover over 'details' you'll see the location of each version.
It seems that even if you select the newer version included with the bladeRF (with separate I/O pins and enables) Qsys will revert to the one in the altera directory.
To fix this I made a copy of ~/altera/13.0sp1/ip/altera/altera_components.ipx and edited out the definition for the old version of oc_i2c_master.
After doing so I was able to run the build_bladerf.sh to completion.
However like you the resulting image also cannot talk to the si_5338
I'm pretty certain you don't want to let the build use the older oc_i2c_master though.
It appears that there is an older version of oc_i2c_master included in ~/altera/13.0sp1/ip/altera/altera_dp/hw_demo/altera_avalon_i2c
If you open Qsys and right click on 'Communication - OpenCores I2C Master' you'll see 2 different entries for the core, if you hover over 'details' you'll see the location of each version.
It seems that even if you select the newer version included with the bladeRF (with separate I/O pins and enables) Qsys will revert to the one in the altera directory.
To fix this I made a copy of ~/altera/13.0sp1/ip/altera/altera_components.ipx and edited out the definition for the old version of oc_i2c_master.
After doing so I was able to run the build_bladerf.sh to completion.
However like you the resulting image also cannot talk to the si_5338
I'm pretty certain you don't want to let the build use the older oc_i2c_master though.
Last edited by drelectro on Mon Sep 30, 2013 1:35 am, edited 1 time in total.
-
- Posts: 8
- Joined: Fri Mar 01, 2013 3:03 pm
Re: opencore I2C problem
Ahh, OK so I pulled a new copy of the source and ran and I now have a fully working fpga image.
I guess there must be some have been some left over intermediate files from when I was futzing around trying to solve the I2C issue.
Code: Select all
./build_bladerf.sh -r hosted -s 40
I guess there must be some have been some left over intermediate files from when I was futzing around trying to solve the I2C issue.
-
- Posts: 303
- Joined: Mon Mar 04, 2013 4:53 pm
Re: opencore I2C problem
So you're good now?
I highly recommend running:
The nios2_command_shell sets up those environment variables that we were having issues with beforehand, so we can slim down that shell script a bit.
Glad you were able to get it working. This build process leaves a bit to be desired for sure. We will be improving it for sure.
I highly recommend running:
Code: Select all
nios2_command_shell.sh ./build_bladerf.sh -r hosted -s 40
Glad you were able to get it working. This build process leaves a bit to be desired for sure. We will be improving it for sure.
-
- Posts: 4
- Joined: Sun Sep 15, 2013 3:21 pm
Re: opencore I2C problem
I gave up trying with 13sp1. I downloaded 12sp1 and it worked fine.
-
- Posts: 303
- Joined: Mon Mar 04, 2013 4:53 pm
Re: opencore I2C problem
What's weird is that this past weekend I've been working with 13.0sp1 and it's been nothing but fine.
I wonder what issue you were having.
I wonder what issue you were having.