Page 1 of 1
[SOLVED] PCIe Development Board to know more about PCI dev
Posted: Wed Aug 04, 2021 4:43 am
by Rukog
Have any of you tried to buy a PCIe dev board to know more about PCI development ?
https://www.aliexpress.com/item/1005002591885426.html
I tend to believe that similar to my knowledge in USB dev with development board such as STM32 Dark Pill that I am able to use it to create a USB driver (host and master) from scratch, I would be able to do the same for GPU driver if I know about the firmware code inside PCIe chip.
Thus being able to communicate with like I do with HID protocol for USBDevice.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 5:53 am
by Korona
Buying a PCIe dev board to learn how to program PCI on the host side is like buying a spare engine to learn how to drive.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 6:12 am
by rdos
I think a better idea is to buy an FPGA dev board from Xilinx (or some other distributor). The one I have comes with a PCIe bus, a network chip, a fiber kit, USB & graphics (HDMI). It also interfaces with high-speed ADCs & DACs. They sell it rather cheap and it includes a license for their commercial FPGA design toolkit so you can do professional stuff. There are good tools for debugging the design too, even if such tools operate slightly differently than your typical application debugger.
With such a kit, you can learn how both sides of PCIe operate and do your own designs too.
I programmed my design with Verilog and then wrote a driver for my OS to handle the device. The design actually doesn't work with Windows since Windows has no idea how to operate it (no driver).
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 8:17 am
by Rukog
rdos wrote:I think a better idea is to buy an FPGA dev board from Xilinx (or some other distributor). The one I have comes with a PCIe bus, a network chip, a fiber kit, USB & graphics (HDMI). It also interfaces with high-speed ADCs & DACs. They sell it rather cheap and it includes a license for their commercial FPGA design toolkit so you can do professional stuff. There are good tools for debugging the design too, even if such tools operate slightly differently than your typical application debugger.
With such a kit, you can learn how both sides of PCIe operate and do your own designs too.
I programmed my design with Verilog and then wrote a driver for my OS to handle the device. The design actually doesn't work with Windows since Windows has no idea how to operate it (no driver).
big OOF
Don't you have a cheaper devkit please
I do not need horsepower, I just need to figure out how PCIe are programmed
Is this one will do the same job?
https://www.aliexpress.com/item/1005002863348126.html
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 10:39 am
by bloodline
Doesn’t the RaspberryPi 4 have a PCIe bus? Can’t you experiment with that?
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 11:33 am
by Rukog
bloodline wrote:Doesn’t the RaspberryPi 4 have a PCIe bus? Can’t you experiment with that?
Too bad, it's just the PCIe port and doesn't act like a PCIe device.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 11:49 am
by bloodline
Rukog wrote:bloodline wrote:Doesn’t the RaspberryPi 4 have a PCIe bus? Can’t you experiment with that?
Too bad, it's just the PCIe port and doesn't act like a PCIe device.
Understood, sorry I got the wrong end of the stick there! You want to develop a PCIe device, that does sound interesting!
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 12:54 pm
by rdos
Rukog wrote:rdos wrote:I think a better idea is to buy an FPGA dev board from Xilinx (or some other distributor). The one I have comes with a PCIe bus, a network chip, a fiber kit, USB & graphics (HDMI). It also interfaces with high-speed ADCs & DACs. They sell it rather cheap and it includes a license for their commercial FPGA design toolkit so you can do professional stuff. There are good tools for debugging the design too, even if such tools operate slightly differently than your typical application debugger.
With such a kit, you can learn how both sides of PCIe operate and do your own designs too.
I programmed my design with Verilog and then wrote a driver for my OS to handle the device. The design actually doesn't work with Windows since Windows has no idea how to operate it (no driver).
d.jpg
big OOF
Don't you have a cheaper devkit please
My complete dev system ended up at around $5000, so it's cheap.
I also bought an 1GHz ADC & DAC (that fits on my evaluation board) and built a 12-core AMD Threadripper based computer with 128 GB RAM.
It might. You should try to figure out if the FPGA tools from Altera are part of the package, or if you need to buy them separately (which could cost a fortune). Some designs also operate by simulating CPU cores in the FPGA, and that kind of stuff is not at all as fast as native Verilog.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 1:03 pm
by rdos
bloodline wrote:Doesn’t the RaspberryPi 4 have a PCIe bus? Can’t you experiment with that?
That would require you to use Linux, and a real OS developer doesn't want to rely on a competitive OS.
I think there are some advanced embedded processors that have PCIe device functions, but designing with them is very complicated. You would need an evaluation board. And you might not get to look at the PCIe basics either since it is probably implemented in some chipset. FPGAs implement PCIe with IPs (code libraries) that are very low level. You can control everything.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Wed Aug 04, 2021 5:48 pm
by qookie
rdos wrote:
That would require you to use Linux, and a real OS developer doesn't want to rely on a competitive OS.
Or you can duplicate what the Linux code does, which is what TianoCore, U-Boot, and the BSDs have done.
(As a side note, I've tried doing that but I've been unsuccessful, instead getting an SError on almost any register read)
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Thu Aug 05, 2021 1:03 am
by rdos
qookie wrote:rdos wrote:
That would require you to use Linux, and a real OS developer doesn't want to rely on a competitive OS.
Or you can duplicate what the Linux code does, which is what TianoCore, U-Boot, and the BSDs have done.
(As a side note, I've tried doing that but I've been unsuccessful, instead getting an SError on almost any register read)
I don't believe in duplicating any code, be it tutorials or Linux. By deciding to write an OS, I also decided to do my own choices for everything. I might use interesting ideas other people have, possibly improve on them too, but reusing code is not for me.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Thu Aug 05, 2021 4:18 am
by Korona
Well, good luck with non-x86 or more complicated x86 devices then, because in many situations, the Linux driver is the only documentation. Which does not mean that you should re-use it's code (that'd also be illegal if your project is not GPL, like in the case that qookie posted above -- TianoCore is permissively licensed), but you will have to read Linux code to write your own driver. Devices like Intel iGPUs have undocumented registers and quirks that make it impossible to use the hardware if you don't know about them.
Re: Buying a PCIe Development Board to know more about PCI d
Posted: Thu Aug 05, 2021 5:00 am
by rdos
Korona wrote:Well, good luck with non-x86 or more complicated x86 devices then, because in many situations, the Linux driver is the only documentation. Which does not mean that you should re-use it's code (that'd also be illegal if your project is not GPL, like in the case that qookie posted above -- TianoCore is permissively licensed), but you will have to read Linux code to write your own driver. Devices like Intel iGPUs have undocumented registers and quirks that make it impossible to use the hardware if you don't know about them.
I suppose using quirks from Linux drivers would be ok (I use the RTL network chip quirks in my OS). However, I would not even dream about implementing a network interface that matches that of Linux in order to be able to reuse the code. For one, I find this interface very poor, so I wouldn't want to have it anyway.
Besides, many chips without documentation don't have open-source drivers, and so Linux doesn't help much there. WiFi chips come to mind.
As for GPUs, I currently use LFB, either through VBE or UEFI, which also means I try to avoid Intel as they have extremely poor LFB performance. Their BIOSes (and UEFIs too) won't give you the right resolutions either, and so if you use 16:9 or other non-standard VGA modes, then you cannot use Intel. Asking the BIOS manufacturer to fix it won't work either since Intel will not fix it for them either.