Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Discussion of developmental aspects of the MiSTer Project.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

I have Quartus Lite 19.1 set up on a bootcamped MacBookPro (Windows 10).
I set up an SD card using the MacOS installer this morning and confirmed it boots and displays the MiSTer menu with the snowy background.
I went through the basic DE10-Nano tutorial and tweaked it to get a Knight Rider ping pong on the LED. I havw 64M add on card installed so just about any core should run.
So... I have a lot of basic stuff working.

I tried downloading the Vectrex and Bagman cores. The projects open up just fine in Quartus and I am able to start compilation, but they both fail here:

Code: Select all

Error (12006): Node instance "pll_hdmi" instantiates undefined entity "pll_hdmi". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Error (12006): Node instance "pll_cfg" instantiates undefined entity "pll_cfg". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Error (12006): Node instance "pll" instantiates undefined entity "pll". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
I feel like I don't have something configured correctly. Do I need to install Main_MISTer somehow first? There are plenty of guides on setting up the SD card etc but I'm not finding much luck on how to actually compile and run a core.

So my first question is, what am I missing in order to be able to synthesize the MiSTer cores?

My next question is... do I need to set up the ROM files etc on the SD card and have that inserted before I start the USB Blaster 2 programming?

Thanks,

-Dave
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

I’m starting to think I’ve got the wrong version of Quartus installed.

set_global_assignment -entity "pll_hdmi" -library "pll_hdmi" -name IP_TOOL_NAME "altera_pll"
set_global_assignment -entity "pll_hdmi" -library "pll_hdmi" -name IP_TOOL_VERSION "13.1"

I’ve been confused because I’ve seen references to having to use old versions for Cyclone 3 support but DE10 Nano is Cyclone 5?
User avatar
Grabulosaure
Core Developer
Posts: 79
Joined: Sun May 24, 2020 7:41 pm
Location: Mesozoic
Has thanked: 3 times
Been thanked: 92 times
Contact:

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by Grabulosaure »

@ethern0t
Quartus 13.1 is needed for MIST development, it uses a Cyclone 3, later versions don't support Cyclone 3 anymore.

The DE10nano for MiSTer is based on a Cyclone 5, which is supported in latest versions of Quartus, but version 17.0.2 is strongly preferred for MiSTer development.
RndMnkIII
Core Developer
Posts: 92
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by RndMnkIII »

You can import the project on Quartus 19 but you need to update the PLL IP to the new version.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

Thank you Grabulosaure, installing 17.x got be around that issue.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

Now I'm starting to understand why people disable HDMI output to save compilation time. Is the only way to help that to disable HDMI completely and get an I/O expansion board with a VGA port?
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

Okay, so after switching to 17.0 everything is building properly. The SRAM test and the Vectrex core both work fine (the latter boots into Mine Storm).

However, the Bagman arcade core produces a blank screen. Do I need to set up a serial terminal over a second USB cable to see what's going wrong? I believe I have the files in the correct places on the SDcard.
tRAcE
Posts: 13
Joined: Tue May 26, 2020 11:14 am

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by tRAcE »

You should really use Quartus 17.0.x, especially if you think about releasing your changes later, as (nearly) all official code is done in this version.
As a nice side effect, this version for some reason is often faster on compiling than later ones and later ones don't add any new functionality to the Cyclone 5 support in Quartus.

Happy developing ;)
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

I tried another arcade core, Phoenix, and it produces a black screen as well except after a few seconds it starts playing a terrible sound effect that might be the noise the birds make. So *something* is working.

Difficulty: I don't have any input devices yet (don't have a cable/adapter to hook up a USB keyboard properly yet; I have the official USB daughterboard on backorder at the moment).

If I boot the fpga in standalone mode, I do get the OSD and the user button brings up the System Settings screen.

On the main OSD I just have Cores on the left hand side vertically, and a single Arcade <DIR> visible.
User avatar
Sorgelig
Site Admin
Posts: 890
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 214 times

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by Sorgelig »

arcade cores are starting by MRA files.
If you load them through USB blaster then they won't work as they have no ROM.
If you add some changes to existing arcades, then make a change and then copy RBF to appropriate place then start through MRA file.
If you create your own arcade then you can create special boot.rom which will be able to boot at core start and you will be able to use USB blaster loading.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

Thanks Sorgelig! That explains why it didn’t work. Does the ARM side push the rom data somewhere the FPGA can see it or does the FPGA read rom data on demand from the ARM side and/or cache it locally somehow?

-Dave
User avatar
Sorgelig
Site Admin
Posts: 890
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 214 times

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by Sorgelig »

ARM pushes the boot.rom right after core start.
MRA works similarly but rom getting assembled from MAME zip and then pushed to the core also right after the start.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects?

Unread post by ethern0t »

Is the format of boot.rom documented anywhere? Pointing me at the ARM-side linux code is fine.

Is there a utility that takes an MRA file and a rom zip / extracted ROMs and generates a boot.rom file already for core debugging?

If there isn't I can take a stab at writing one.

-Dave
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

If I had to guess:

Code: Select all

                <part crc="e0156191" name="e9_b05.bin"/>
                <part crc="7b758982" name="f9_b06.bin"/>
                <part crc="302a077b" name="f9_b07.bin"/>
                <part crc="f04293cb" name="k9_b08.bin"/>
                <part crc="68e83e4f" name="m9_b09s.bin"/>
                <part crc="1d6579f7" name="n9_b10.bin"/>
                <part repeat="40960">00</part>
                <part crc="4a0a6b55" name="e1_b02.bin"/>
                <part crc="705193b2" name="c1_b01.bin"/>
                <part crc="c680ef04" name="j1_b04.bin"/>
                <part crc="dba1eda7" name="f1_b03s.bin"/>
                <part crc="2e0057ff" name="r9_b11.bin"/>
                <part crc="b2120edd" name="t9_b12.bin"/>
                <part crc="2a855523" name="p3.bin"/>
                <part crc="ae6f1019" name="r3.bin"/>
in Bagman.mra means boot.rom could be constructed from

copy/b e9_b09.bin+f9_b06.bin+f9_b07.bin+k9_b08.bin+m9_b09s.bin+n9_b10.bin+file_of_40960_zeroes.bin+e1_b02.bin+c1_b01.bin+j1_b04.bin+f1_b03s.bin+f9_b11.bin+t9_b12.bin+p3.bin+r3.bin boot.rom

(the only tricky part is what looks like a gap in the rom address space of about 41k)
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

Well, that didn't work. The resulting boot.rom was about 84k long, placed in the root directory of the SD card, but running that core from the Programmer still produced no output. I googled a bit but couldn't really find any information about the boot.rom format.

I did see a bit where you could include a rom with the rbf by inserting a 16 byte header at the front containing the length of the boot rom at the end, but that seems to be for standalone mode, not debugging.

(I also tried renaming a .nes file to boot.rom and launching the NES core from the Programmer but that produced no output either)

-Dave
JaguarLV
Core Developer
Posts: 28
Joined: Mon May 25, 2020 12:39 am
Been thanked: 22 times

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by JaguarLV »

The boot.rom file for Bagman should be placed in \games\a.bagman and the boot.rom file for NES should be placed in \games\NES.
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

@JaguarLV, thank you, that worked for bagman! It's confusing because the layout for boot.rom files doesn't seem to match the suggested layout for the RBF and MRA files.

I copied super Mario bros into \games\NES\boot.rom but it didn't work there for some reason, does it need to have its header stripped first somehow?

-Dave
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

Is any of this documented anywhere? I tried to make a boot.rom for phoenix and placed it in \games\a.phoenix but it didn't work either. Based on the MRA file it looked like it was just the concatenation of 12 2k files.
JaguarLV
Core Developer
Posts: 28
Joined: Mon May 25, 2020 12:39 am
Been thanked: 22 times

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by JaguarLV »

There is no standard format for the rom files. It is just a bunch of binary files put together. Check the MRA file, the core source code, and MAME source code for the name, size, CRC values, and order for the binary files.

The default directory for the arcade boot.rom file is in the main .sv file. Look for the line that looks like this:
localparam CONF_STR = {
"A.PHNX;;",

You can also find the same info by pressing F12 after you load the core. The name will be on the left showing vertically.

In the case of Phoenix, the boot.rom file needs to be placed in \games\a.phnx
ethern0t
Posts: 40
Joined: Sat Jun 06, 2020 3:42 pm

Re: Missing pll, pll_cfg, pll_hdmi projects? [Solved - use v17 of Quartus]

Unread post by ethern0t »

So I’m guessing that for the NES core I’m going to need to strip the header off the .nes file I’m using?

Thanks again for your help!

Dave
Post Reply