tnt23: (amiga)
[personal profile] tnt23
В жёлтом углу ринга - выход CPLD, управляющий ножкой /PROGRAM спартана.
Синий сигнал - выход INIT от FPGA (CPLD его не анализирует, но может удержать в логическом нуле, см. ниже)



Открываем катехизис, читаем.

Once in user operation, the device can be re-configured
simply by pulling the PROGRAM pin Low. The device
acknowledges the beginning of the configuration process by
driving DONE Low, then enters the memory-clearing phase
.


Сразу же попадалово. DONE из FPGA в CPLD заведен, но мне на нём не удалось увидеть ничего, кроме 0. Или DONE действительно как-то отключён (зачем? и зачем тогда его заводить в CPLD?), или одно из двух.

The device indicates that clearing the configuration memory
is in progress by driving INIT Low.


Ну хотя бы можно косвенно убедиться в том, что FPGA дышит - если ответит на /PROGRAM спустя малое время опусканием INIT, то, значит, не вся неонка у нее унутре отгорела ещё.

At this time, the user can delay configuration by holding
either PROGRAM or INIT Low, which causes the device to
remain in the memory clearing phase. Note that the bidirec-
tional INIT line is driving a Low logic level during memory
clearing. Thus, to avoid contention, use an open-drain driver
to keep INIT Low.
With no delay in force, the device indicates that the memory
is completely clear by driving INIT High.


INIT от FPGA заведен в CPLD через резистор в 10К, явно для описанного удержания. Хотя у CPLD на этом выходе стабильная единица.

Взглянем на картину в перспективе:


Жуткое мочилово по PROGRAM, и всё это время INIT низкий.





Кусок кода конфигурирования FPGA из модуля emu10k1:

	/* The FPGA is a Xilinx Spartan IIE XC2S50E */
	/* GPIO7 -> FPGA PGMN
	 * GPIO6 -> FPGA CCLK
	 * GPIO5 -> FPGA DIN
	 * FPGA CONFIG OFF -> FPGA PGMN
	 */
	spin_lock_irqsave(&emu->emu_lock, flags);
	outl(0x00, emu->port + A_IOCFG); /* Set PGMN low for 1uS. */
	write_post = inl(emu->port + A_IOCFG);
	udelay(100);
	outl(0x80, emu->port + A_IOCFG); /* Leave bit 7 set during netlist setup. */
	write_post = inl(emu->port + A_IOCFG);
	udelay(100); /* Allow FPGA memory to clean */
	for (n = 0; n < fw_entry->size; n++) {
		value = fw_entry->data[n];
		for (i = 0; i < 8; i++) {
			reg = 0x80;
			if (value & 0x1)
				reg = reg | 0x20;
			value = value >> 1;
			outl(reg, emu->port + A_IOCFG);
			write_post = inl(emu->port + A_IOCFG);
			outl(reg | 0x40, emu->port + A_IOCFG);
			write_post = inl(emu->port + A_IOCFG);
		}
	}
	/* After programming, set GPIO bit 4 high again. */
	outl(0x10, emu->port + A_IOCFG);
	write_post = inl(emu->port + A_IOCFG);
	spin_unlock_irqrestore(&emu->emu_lock, flags);

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

tnt23: (Default)
tnt23

May 2019

S M T W T F S
   1234
567891011
121314151617 18
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 4th, 2026 06:09 pm
Powered by Dreamwidth Studios