Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20641 Discussions

Quartus 18.1 - CYCLONE V Preloader issue

syam
Novice
2,390 Views

Hi

 

Am working on a project with CYCLONE V - 5CSXFC6D6F31C8N with Quartus 18.1. After compilation in emif.xml file in the hand off folder the SDRAM related clock info is being written as 0 by quartus. The preloader doesn't work therefore. 

syam_0-1647019807939.png

 

We had to manually set the value to make it work. But not sure this is the best value. Please suggest appropriate values for these. 

syam_1-1647019889516.png

 

Our EOSC input for HPS is 25MHz. We are not using f2h_sdram_ref_clk. Memory clock frequency is 300 MHz. 

syam_2-1647020047823.png

 

syam_3-1647020139995.png

Best Regards

Syam

 

0 Kudos
25 Replies
aikeu
Employee
1,962 Views

Hi syam,


I will get back to you soon when I have relevant info.


Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,932 Views

Hi 

Any update on this ?

 

Regards

Syam

0 Kudos
aikeu
Employee
1,915 Views

Hi syam,


Sorry for late reply.

I was not able to find out why the preloader fail due to certain parameters value being used. I suspect is due to the hardware difference of ddr3 being used.

I noticed the quartus version after 18.1 is using the default values as below:

You can try to work with those default values.

These values are found in the hidden parameters in of the HPS IP. You can try right click on the blue gradient in the UI pic above to display the hidden parameters. The parameters in the emif.xml is auto generated based on these settings.


Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,897 Views

Hi 

The image you have sent cannot be opened. 

 

There is definitively a problem with the preloader generation. I set the clock for the DDR3 from the FPGA at 50Mhz. But the preloader bootloader shows 0. 

 

syam_0-1649327361917.png

 

syam_1-1649327388796.png

 

 

0 Kudos
aikeu
Employee
1,884 Views

Hi syam,

 

Sorry that I am not aware the image is not able to open in the community forum page. I was using another link to upload the image.
Below is the image, refer to the default values of the IP:

PLL_MEM3.JPG

You can try to check the hidden parameters of the IP in platform designer to verify again the difference before and after generate.

The hidden parameters can be displayed when right click on the blue gradient part of the pic above.

 

Thanks.

Regards,

Aik Eu

0 Kudos
syam
Novice
1,863 Views

Thanks. Can you please point out where the hidden fields relevant to the marked items in the boot log are located ?

 

syam_0-1649688022199.png

 

0 Kudos
aikeu
Employee
1,857 Views

Hi syam,


I cant be sure regarding most of the parameters at the moment.

Does the specic values for DDR clock 118MHz relected in the emif.xml file?

I see that your F2S_SDR_REF clock is 0 KHz even you have set to 50Mhz, I think is because the bridge was not enabled yet.

When in u-boot, you can run the cmd "bridge enabled" and if possible check any changes to the F2S related clock values.


Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,848 Views

Hi Aik

 

Thanks for the response. 118MHz is not reflected in the emif.xml file. 

 

The boot log is from the preloader before u-boot.img is loaded. So am not sure how to do the bridge-enabled stuff. Can you please share the procedure to do so. 

 

Best Regards

Syam

0 Kudos
aikeu
Employee
1,839 Views

Hi Syam,


The bridge enabled which I mentioned is after u-boot image loaded where you can stop auto boot and type "bridge enabled".


May I know how you enable the logs which shows those info regarding CLOCK?

Are you booting up with QSPI or sdcard? The logs which I normally see when boot up is like the example logs in the document below: 

https://rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Cyclone_V_SoC_45_Boot_from_SD_Card


Other than that, may I know under the SDRAM->PHY Settings of the Cyclone V HPS IP settings, what is the Memory clock frequency{MEM_CLK_FREQ} that you set?



Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,825 Views

Hi Aik

 

We are working with Quartus 18.1. The rocket board link you shared is for the latest Quartus 21.1. For 18.1 the appropriate link would be this - https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide

 

The preloader boot log automatically gets printed via the serial interface on power up and it comes from the preloader software. 

 

We are booting from the SD Card. 

 

SDRAM->PHY Settings of the Cyclone V HPS is shown below. 

 

syam_0-1649857213385.png

 

0 Kudos
aikeu
Employee
1,815 Views

Hi syam,


In U-boot, type help.

Check if there is command bridge and clocks in the help list?

If there is command bridge, type bridge enabled.

Type clocks to show the available clock infos.

Compare the clock infos with those infos shown during the preloader boot up.

Can re-try the above steps without bridge enabled as well to notice any difference.


I recommend using the booting up process with the document in my previous comment instead:

https://rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Cyclone_V_SoC_45_Boot_from_SD_Card

The U-boot version that you are using is from 2013 version.



Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,802 Views

Hi Aik

 

We are using the preloader/uboot source code that shipped with Quartus 18.1. So I would assume this one is correct. 

 

We have a .scr file on the SD card that enables the bridge you are talking about. 

 

syam_2-1649946067753.png

 

We will inspect the frequency shown on uboot log and revert with our findings. 

 

 

0 Kudos
syam
Novice
1,781 Views

Hi Aik

 

Here is the bootlog attached. The bridges seems to be registered. 

 

Note that we are able to boot in to Linux. But we are unable to use the 50Mhz from FPGA to run the SDRAM. 

 

syam_0-1650286395146.png

 

 

 

0 Kudos
aikeu
Employee
1,773 Views

Hi syam,


From your boot log seems like you didnt stop the autoboot and run the clocks cmd.


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,769 Views

Hi syam,

 

Refer the attach for reference which I did on my side.

DDR_clock.JPGMEM_CLOK_FREQ2.JPG

 

Thanks.

Regards,

Aik Eu

0 Kudos
syam
Novice
1,755 Views

Hi Aik

 

We don't have the clocks command in our version of u-boot (shipped with Quartus 18.1). We have only these commands in our version. 

 

? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootz - boot Linux zImage image from memory
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
exit - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls - list files in a directory (default /)
false - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt - flattened device tree utility commands
fpga - loadable FPGA image support
go - start application at address 'addr'
help - print command description/usage
i2c - I2C sub-system
iminfo - print header information for application image
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mdio - MDIO utility commands
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mmc - MMC sub system
mmcinfo - display MMC info
mtdparts- define flash/nand partitions
mtest - simple RAM read/write test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
sf - SPI flash sub-system
showvar - print local hushshell variables
sleep - delay execution for some time
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true - do nothing, successfully
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version

 

Best Regards

Syam

0 Kudos
aikeu
Employee
1,743 Views

Hi syam,


Looks like the old u-boot dont have that clocks command and that 2013 version of U-boot is too old to be supported.


I suggest you git clone the newer U-boot version for your project build.

Try to build your u-boot with the process mentioned in the document below:

https://rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Cyclone_V_SoC_45_Boot_from_SD_Card



Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,718 Views

Hi syam,


I will close this thread for now as the initial question for this thread has been answered. 

Do considered open a new thread for your next question.



Thanks.

Regards,

Aik Eu


0 Kudos
syam
Novice
1,709 Views

Hi 

Pls dont close this thread. The issue is not resolved. We are using Quartus 18.1 and the uboot shipped with it. 

Intel is asking us to follow the uboot for a the latest version of quartus. Are you saying that Intel doesn't support the boot flow and components therein for Quartus 18.1 any more ? 

syam_0-1650956624196.png

 

Also in Quartus 18.1 with SOC EDS we are were generating the following - preloader-mkpimage.bin and u-boot.img. 

If you see the instructions you shared the preloader binary is in different format so it is not going to work in the Quartus 18.1 boot flow. Please help. 

syam_1-1650956799442.png

 

Best Regards

Syam

 

 

 

0 Kudos
aikeu
Employee
1,703 Views

Hi syam,


I think it is a bug from the older u-boot from 2013.

Will require to use the latest U-boot to avoid that problem.


Thanks.

Regards,

Aik Eu


0 Kudos
Reply