Wednesday, January 20, 2021

Xilinx PUDC_B behavior

 Xilinx has lots of datasheets and documents describing their products. Still, it is sometimes not possible to know how Xilinx devices work. An example is the PUDC_B pin. This pin controls the pre-configuration pullups on I/O pads. When driven low then pullups are enabled. In 7 series this pin is located in a normal IO bank. So how do we disable the pre-configuration pull-ups? We need to drive PUDC_B to high (using a pullup resistor), in order to do that we need to supply I/O voltage to the bank that includes the PUDC_B pin. But when that power supply ramps up then initially PUDC_B would sample low and enable all pullups? So there must be a short time when pull-ups are enabled regardless of the PUDC_B pin?

So what it is? Does PUDC_B=high (resistive pull-up) really guarantee that pre-configuration pull-ups are disabled? Need to test. Need a suitable FPGA board first.


TE0723 Zynq Arduino board has PUDC_B pin accessible for measurements. Attaching DSO probes to spare I/O and PUDC and VCCIO of the bank.

And what we see? The spare I/O pin does indeed get pulled up, reaching 0.9 volts then dropping back to 0 when PUDC_B voltage reaches about 1 volt. Sure 0.9 volts is not yet logic high, but it is also not anymore valid logic 0 either. So the conclusion is that PUDC_B does not fully disable configuration pullups as the input reference is at about 1 volt causing the internal pullups to be enabled during power-up for short time.

Here at Xilinx forums some DSO screenshots!

Thursday, January 14, 2021

GOWIN LittleBee development board

This small board (SKU TEC0117) for GOWIN FPGA is available from Trenz Electronics webshop. The JTAG programmer is on board - it is just a simple standard FT2223H MPSSE JTAG (empty FTDI EEPROM).

Pre programmed demo design is from RISC-V competition, it should show the following on the UART Terminal (115200, 8N1):


Note: depending on the production batch the boards may be unprogrammed from the factory. Note: you do not need GOWIN tools license to use the gowin programmer.

With empty FTDI EEPROM you need to select the second UART assigned to the board.

TIP: the GOWIN boards are delivered with empty FTDI EEPROM so they will enumerate as two UART's - it is OK to disable VCP loading for the channel A, then you only see one COM port assigned to the board. 


Select D2XX for Channel A and click program.


Thursday, December 31, 2020

I want to be better...

 I want to be better...

We all can be better...

We can always be better...


That's my agenda for the new year 2021. 

Let's make it a better year!


Happy new year!



Thursday, January 30, 2020

ADC INL/DNL testing with SciLab

ADC INL/DNL testing using histogram is pretty simple. AnalogMAX DAQx support files include a capture utility that already emits data in format readable direclty in SciLab. To calculate INL/DNL run following SciLab script:

mode(0)

x = read("C:\temp\capture.txt", -1, 1)
trunc = 16

minbin = min(x)
maxbin = max(x)
h = histc(minbin:maxbin,x)
ch = cumsum(h)
T = -cos(%pi*ch/sum(h))
hlin = T(2:$) - T(1:$-1)

hlin_trunc = hlin(trunc+3:$-trunc)
lsb = sum(hlin_trunc)/(length(hlin_trunc))

dnl = [0 hlin_trunc/lsb-1]
inl = cumsum(dnl)

It may take a little bit of thinking to understand what the code does, short explanation: cumsum (cumulative sum) calculates a function that looks like inverse sinus, applying cosinus function converts it to linear rising function(range -1..+1), taking a difference between adjacent values of this result will give DNL. That's it!

Note the input to ADC should sinus with small clipping.

Example plots with SciLab:

Histogram from input

Cumulative sum from the histogram
Cosinus from cumulative sum of the histogram

DNL Plot


Monday, January 20, 2020

Xilinx FTDI License

Xilinx tools can work with FTDI (FT2232/FT232/FT4232) based USB chips as JTAG adapter if they are programmed with "Digilent License" - this license includes special FTDI EEPROM configuration and also special data in the "user EEPROM" area that is not visible with regular FTDI tools.

NOTE: any EEPROM writing with FTDI provided tools will automatically erase user EEPROM with no confirmation asked, if this happens then the adapter will no longer be recognized by Xilinx tools.

Recovery: Digilent has/had a recovery tool available to recover the EEPROM in case it was accidentally over-written.

Digilent has licensed manufacturing rights for FTDI JTAG solutions to a small number of companies. As of today now no new licenses are issued by Digilent. If on-board solution is required then the options are:

https://shop.trenz-electronic.de/de/TE0790-03-XMOD-FTDI-JTAG-Adapter-Xilinx-kompatibel
https://shop.trenz-electronic.de/en/24625-JTAG-SMT2-Surface-Mount-Programming-Module

There is an legal option to provide Xilinx tools compatibility without using Digilent License, this can be done using custom XVC server that talks Xilinx XVC protocol and forwards the JTAG commands to FTDI device with empty user EEPROM. There are some commercial products using this method.

Audio Signal Generator



Best buy would be generator with following schematic:


Unfortunately they are no longer available from the author. There are only a few forum threads about his hardware:
https://www.diyaudio.com/forums/equipment-and-tools/205304-low-distortion-audio-range-oscillator-21.html
https://www.eevblog.com/forum/testgear/looking-for-ultra-low-distortion-1khz-sine-generator/


There are many sellers on eBay selling board like this:
It is a low distortion 1KHz signal generator, THD spec: 0.1% (-60dB).

LT AN67 based signal generator (PCB REV 2 from diyaudio) did not work properly (oscillation not stable).

Sunday, January 5, 2020

Maailma päästmine

Maailma päästmine

(Saving the World  a short story in estonian language)

Iga algus on raske - kuidas alustada operatsiooni "Maailma päästmine"? Alustame millestki lihtsamast näiteks uue ajastu loomisest. See on tegelikult imelihtne: me lepime kokku et aasta 2019 on nüüd hoopis aasta 0. Valmis - nii raske ja keeruline see uue ajastu loomine oligi. Aga nii ei saa ju uut ajastut luua, see ei saa ju nii lihtne olla? Tegelikult saab küll, kui meie jaoks on aasta 2019 aaasta null, siis me ju elame juba uues ajastus. Aga kuidas seda uut ajastut nimetada? Ajakiri "TIME" nimetas 2019 aasta inimeseks Greta - meie võimuses on uue ajastu nimetamine Greta ajastuks.

Seega:
aasta 2019 AD (Anno Domini) = aasta 0 AG (Anno Greta)
aasta 1 AG = 2020 (kaks korda 20 lihtne meelde jätta)

aasta 1..10 = esimene aastakümme (2020..2029 AD)
aasta 1..100 = esimene sajand (2020..2119 AD)

Lihtne valem kuida saada meile tavapärasest kalendrist Greta ajastusse - ajastusse kus Maailma ja planeedi Maa päästmine on meie kõigi kätes!

Aga kui uue ajastu loomine on nii lihtne - teeks veel midagi? Näiteks kingiks Greta'le oma päeva? Kuidas oleks näiteks 24 september? Mõeldud, tehtud: 24 september on nüüdsest peale Greta päev. See pole üldse oluline kui mitu inimest Greta päeva tähistab, niikaua kui kasvõi üks inimene seda teeb. Google kalendrisse iga aastase kordusega meeldetuletuse lisamine võtab aega ainult mõne minuti.

Nüüd läheb asi raskemaks, pead järele mõtlema mida sa oleks nõus tegema kui sinust oleneks maailma päästmine. Ka sa näiteks oleks nõus tegema ühe postituse sotsiaalmeedias (säuts - tweet/re-tweet)? Hinga sügavalt sisse, sulge korraks silmad - oled nõus? Saad sa sellega hakkama kui aeg käes? Joo klaas tavalist vett, söö üks õun, ole elus homme - ja sinu säuts vöib päästa maailma.

[...]


Lühikokkuvõte olukorrast aastal null:
- Kalifornia põleb
- Vihmametsad põlevad, tõenäoline tahtlik süütamine et saada maad (soja?) kasvatamiseks
- Austraalia põleb
- Avastatakse uus putukaliik millele leidja paneb nimeks: Greta
- Putukate arvukus on dramaatiliselt langenud nii Ameerikas kui Euroopas
- COP25 (ÜRO Kliima muutuse konverents) ei otsusta praktiliselt mitte midagi
- Ameerika Ühendriikides vang #1 sureb vanglas - asi mida põhimõtteliselt ei saa juhtuda, aga see oli kasulik mitmetele võimukatele inimestele
- Ameerika Ühendriikide kodanik (ajakirjanik, roheline kaart) läheb Türki et saada luba abiellumiseks kus ta tapetakse Saudi Araabia saatkonnas, keha tükeldatakse ja põletatakse saatkonna territooriumil. Käsutäitjatele tehakse näidis kohtuprotsess (5 surmanuhtlust) aga niiditõmbaja(d) jäävad puudutamata ja Trump - POTUS (ametis olev USA president) toetab neid jätkuvalt (Saudi araabia ostab USA'st palju relvi!).
- USA immigratsiooni laagrites eraldakse lapsi nende vanematest, arste ei lubata territoorimile et teha lastele vaktsineerimist, mitmed lapsed surevad
- Donald J. Trump on teinud USA'st tõelise naljanumbri, kuid tegelikult on asi naljast kaugel - küsitluste tulemusel hinnatakse Trumpi maailma kõige ohtikumaks inimeseks!

Prognoos aastale üks:
- kui GOP (Good Old Party - republikaanid) Trumpi huntide ette ei viska võib ta uuesti valimised võita
- Trump võib iseendale ja oma parteile vee peale tõmmata
- kui just ei alga uus suuremat sorti sõda on aasta üks natuke parem aastast null

Prognoos esimesele kümnendile:
- Robotite pool tehtud töö osatähtsus suureneb
- luuakse uus sotsiaalmeedia platform mis mis kõik olemasolevad mõttetuks muudab
- kliimaga läheb ilmselt halvasti


Prognoos esimesele sajandile:
- kõik patendid kaoatavad kehtivuse
- kõik autoriõigused kaotavad kehtivuse
- inimeste poolt tehtud tööd hakatakse teistmoodi väärtustama
- kõik planeedi elanikud saavad üldiselt kehtiva digitaal-identiteedi