Grug Huhler
Grug Huhler
  • 48
  • 95 937
Tang Nano 4K Cortex M3 APB Access to FPGA-Based Designs
This video provides examples of creating APB completers on the Tang Nano 4K FPGA development board. The completers are modules that use the ARM APB2 protocol and implement memory-mapped registers that software on the FPGA's Cortex M3 can read and write. One completer does nothing but implement 4 registers; a second implements a simple PWM controller. Both completers are in Verilog and provide a template for integrating your own designs on the FPGA that interact with software on the M3.
Contents
0:00 Introduction
0:30 APB & completers
1:22 APB signals
2:04 APB states & timing
3:10 Verilog
7:07 M3 instantiation
8:24 Build & flash
10:01 System working
11:47 Software build
12:18 Exit
Additional information:
Previous video on getting started with the M3. This video goes into UART connections and software in more detail: ua-cam.com/video/pC7OXV67fqM/v-deo.html
Video about Gowin PLLs: ua-cam.com/video/cAwbOCInDKU/v-deo.html
Project gitub with complete Gowin project: github.com/grughuhler/tang_4k_apb
See README files on the github.
See also my Tang Nano playlists.
Переглядів: 386

Відео

Tang Nano 4K: Getting Started with Its Cortex M3 Core
Переглядів 467Місяць тому
This video presents the Tang Nano 4K FPGA development board and shows how to run software on its ARM Cortex M3 hard IP core. The Tang Nano 4K's most interesting feature is this M3 core. Chapters 0:00 Introduction 0:46 M3 Subsystem 1:55 Tang 4K board 2:36 Board pinout 3:40 Verilog 5:34 M3 instantiation 7:28 Project running 9:16 Documents 12:29 Software 17:41 USB adapter 18:01 Summary Getting sta...
Consistency of Pulse Per Second Signals from Two GPS Receivers
Переглядів 2222 місяці тому
This video uses the FPGA design from my previous two videos to measure pulse-per-second (PPS) signals from two GPS receivers. The goal is to compare them for consistency. The measurements are from a Tang Nano 20K FPGA development board. Chapters 0:00 Introduction 0:39 Measurement goals 0:55 FPGA design 1:55 Edge time differences 3:27 Period differences 4:23 Summary Previous videos: ua-cam.com/v...
GPS disciplined High Accuracy Timers on Tang Nano 20K FPGA
Переглядів 5222 місяці тому
This video shows how to control the frequency of counters on an FPGA using the pulse-per-second (PPS) signal from a GPS receiver. This allows the counter frequency to be very accurate. The project supports both the Tang Nano 20K and Tang Nano 9K FPGA development boards. The FPGA contains a PicoRV32 soft RISC-V core that runs software that implements a feedback loop that maintains the counter fr...
Ultra-Precise Timestamps and Counter Frequencies on an FPGA (Tang Nano 9K)
Переглядів 4532 місяці тому
This video shows how to create counters whose rate of counting can be very precisely controlled. The design includes a facility to allow GPS time synchronization for accuracy that will be the subject of a later video. The demonstration uses a Tang Nano 9K FPGA development board. A project file for the Tang Nano 20K is also provided, but the technique applies to any FPGA. We show a frequency cha...
Tang Nano 9: Use FIFOs to cross clock domains
Переглядів 3232 місяці тому
This video shows a simple example of using a Gowin soft IP FIFO to transfer data from a fast to a slow clock domain. It runs on a Tang Nano 9K FPGA development board. Chapters 0:00 Introduction 0:28 Clock domains 1:29 FIFOs 2:34 Bad implementation 4:55 Failure observed 5:08 Good implementation 7:49 Success observed 8:46 Instantiation 10:10 Summary Links: Project on github: github.com/grughuhler...
PicoRV32 Interrupts on the Tang Nano 9K FPGA Board
Переглядів 4213 місяці тому
This video shows how to enable and use interrupts on the Tang Nano 9K FPGA development board and shows some surprises with them. The Nano 20K board is also supported. The video shows both instructions that generate interrupts and interrupts caused by a pushbutton. It is part of a series of videos on a simple SoC based on the PicoRV32 RISC-V soft core implemented on the Tang Nano boards. NOTE: W...
Speed of a Renesas X9C103 Digital Potentiometer
Переглядів 2614 місяці тому
This video introduces the Renesas X9C103 10K digital potentiometer and tests how fast it can be changed from one position to another since this was not very clear in the device datasheet. Chapters 0:00 Introduction 0:33 Device block diagram 1:15 Control signal timing 2:08 Test setup 2:25 Fast timing test 3:49 Slow timing test 4:28 Exit See also github.com/grughuhler/grug_misc_projects
Tayloe-Style Upconverting RF Mixer Transmitter Demonstration
Переглядів 2 тис.4 місяці тому
This video shows a breadboard demonstration of using a Tayloe RF mixer to upconvert IQ data and transmit a radio signal to a receiver. It builds on two videos I made about Tayloe mixers and radio receivers. Note: Would be a good idea to add a simple low-pass filter to the transmitter output. See this video: ua-cam.com/video/LbQTqltaQqI/v-deo.html Chapters 0:00 Introduction 0:58 NA5Y schematic 1...
Faster User Flash Controller for the Tang Nano 9K
Переглядів 6225 місяців тому
This video describes a Gowin user flash controller that I wrote for the Tang Nano 9K FPGA development board. It's faster than the Gowin Soft IP core controller, especially for slower clock speeds. Chapters 0:00 Intro 0:27 IDE version and building 1:00 Load and run 1:30 Flash in action 2:45 Performance 5:17 Flash documentation 6:54 Read state machine 8:46 Verilog 10:43 Resources and timing 11:16...
Gowin User Flash on Tang Nano 9K FPGA Development Board
Переглядів 5675 місяців тому
This video demonstrates Gowin's user flash (FPGA internal flash) on the Tang Nano 9K FPGA development board by integrating it with a mini-SoC based on the PicoRV32 RISC-V core. It uses the Gowin flash controller soft IP and presents its advantages and disadvantages. Chapters 0:00 Intro 0:30 About user flash 1:27 Adding user flash 2:14 Controller interface 3:12 Verilog 6:17 Build project 6:46 Ru...
Tang Nano 20K vs Tang Nano 9K FPGA Board
Переглядів 6 тис.5 місяців тому
This video highlights the differences between the Tang Nano 20K FPGA development board and the Tang Nano 9K. Both boards are inexpensive development boards that can be used on breadboards for experiments and learning. I use the development tools from Gowin. Chapters: 0:00 Intro 0:27 FPGA differences 1:31 Board differences 3:13 Clock control 5:45 Pins and pinout 7:37 PicoRV32 9:32 Resources and ...
Tango Nano 9K PicoRV32 SoC: More Flexible SRAM from Verilog Inference (And Gowan Scope Demo)
Переглядів 8086 місяців тому
This video updates my previous video on a mini-SoC for the Tang Nano 9K built using the PicoRV32 core. Now the SRAM is created by inference, and its size can be changed easily. In addition, it shows the Gowan Analysis Oscilloscope (GAO) working with this project. Chapters 0:00 Intro 0:33 sram8bit.v 1:43 sram.v 2:05 top.v 2:45 Software 4:07 GAO and clocks 4:59 GAO config 7:42 GAO fail 8:25 GAO s...
Tang Nano 9K Simple PicoRV32-based SoC on FPGA
Переглядів 2,6 тис.6 місяців тому
This video shows how to create a very simple system-on-a-chip (SoC) using the PicoRV32 RISC-V core and the Tang Nano 9K FPGA development board. The goal is a simple and consistent design that is not abstracted but is easy to extend. We show both Verilog for the SoC and C code for software on the PicoRV32 soft core. Chapters 0:00 Introduction 0:40 Pins & connections 1:15 View of board 1:25 UART ...
Gowin Analysis Oscilloscope on the Tang Nano 9K FPGA Board
Переглядів 1,9 тис.6 місяців тому
This video shows how to use the Gowin Analysis Oscilloscope (GAO) tool on the Tang Nano 9K FPGA development board under Windows 10. The signals viewed are from my Gowin SRAM demonstration (with an i2c connection to a Raspberry Pi). SRAM demo video: ua-cam.com/video/8z6oe_gdFb4/v-deo.htmlsi=KzWpUHJodlN05Prg Also see this video for a github link to the project. Chapters 0:00 What is Gowin Analysi...
Block SRAM on the Tang Nano 9K FPGA Development Board, Test Via I2C
Переглядів 1,1 тис.6 місяців тому
Block SRAM on the Tang Nano 9K FPGA Development Board, Test Via I2C
I2C target (slave) on Tang Nano 9K FPGA board integrated with PWM controller dimming LED.
Переглядів 1 тис.6 місяців тому
I2C target (slave) on Tang Nano 9K FPGA board integrated with PWM controller dimming LED.
Update to Arithmetic on the Tang Nano 9K-- use a bidirectional data signal with the Raspberry PI.
Переглядів 5487 місяців тому
Update to Arithmetic on the Tang Nano 9K use a bidirectional data signal with the Raspberry PI.
Strange way to blink an LED: Demonstrating Clock Hardware IP Blocks on the Tang Nano 9K FPGA board
Переглядів 1,3 тис.7 місяців тому
Strange way to blink an LED: Demonstrating Clock Hardware IP Blocks on the Tang Nano 9K FPGA board
Arithmetic (from Shift Registers) Using the Tang Nano 9K FPGA Board
Переглядів 2,2 тис.7 місяців тому
Arithmetic (from Shift Registers) Using the Tang Nano 9K FPGA Board
Getting started with the Tang Nano 9K FPGA board on Ubuntu 22.04 Linux
Переглядів 6 тис.7 місяців тому
Getting started with the Tang Nano 9K FPGA board on Ubuntu 22.04 Linux
Simple Tayloe Breadboard Software Defined Radio Receives Distant Signals
Переглядів 12 тис.9 місяців тому
Simple Tayloe Breadboard Software Defined Radio Receives Distant Signals
Tayloe RF Mixer Demonstration Using ADALM2000
Переглядів 3,9 тис.9 місяців тому
Tayloe RF Mixer Demonstration Using ADALM2000
Measure Blinking/Flickering of LED Christmas Lights Using a Phototransistor and an ESP32
Переглядів 49511 місяців тому
Measure Blinking/Flickering of LED Christmas Lights Using a Phototransistor and an ESP32
Use Ohm's Law for AC To Analyze a Circuit
Переглядів 156Рік тому
Use Ohm's Law for AC To Analyze a Circuit
Using an Oscilloscope to Measure Inductance/Capacitance like an LCR
Переглядів 2,7 тис.Рік тому
Using an Oscilloscope to Measure Inductance/Capacitance like an LCR
Lamp-Stabilized Wien Bridge Oscillator Using LM386 Audio Amplifier
Переглядів 10 тис.Рік тому
Lamp-Stabilized Wien Bridge Oscillator Using LM386 Audio Amplifier
WS2812B Addressable RGB LEDs and Raspberry Pi Pico PIO, Part 2
Переглядів 402Рік тому
WS2812B Addressable RGB LEDs and Raspberry Pi Pico PIO, Part 2
WS2812B Addressable RGB LEDs and Raspberry Pi Pico PIO, Verified Via ADALM2000 Logic Analyzer
Переглядів 2,2 тис.Рік тому
WS2812B Addressable RGB LEDs and Raspberry Pi Pico PIO, Verified Via ADALM2000 Logic Analyzer
Test of a Flower Pot Antenna For the VHF Aviation Band
Переглядів 8 тис.Рік тому
Test of a Flower Pot Antenna For the VHF Aviation Band

КОМЕНТАРІ

  • @spillagonner
    @spillagonner 3 дні тому

    Hey, Grug! You might have mentioned that you changed the assignment of pins on the RPi.

    • @electronics.tinker
      @electronics.tinker 3 дні тому

      You are right. Looking back on it, that whole github repo is a bit of a mess. I don't think I'll change the videos, but I may fix up the repo, including better documentation of pins. I need to recall why I changed pins on the rpi... Perhaps not all pins are capable of being set to open drain.

  • @theltenetwork9203
    @theltenetwork9203 5 днів тому

    Thanks, this helped alot with my lab where I needed to decode an I2C signal.

  • @CaptainFuzzo
    @CaptainFuzzo 7 днів тому

    thanks a ton, this is exactly what i was looking for

  • @GlennHamblin
    @GlennHamblin 11 днів тому

    Thanks, I appreciate the introduction to this little board. I really want to learn FPGAs, I just have yet to find a good project to apply it to. 😊

    • @electronics.tinker
      @electronics.tinker 10 днів тому

      Thanks. I'm glad you enjoyed it. I think learning some Verilog (or VHDL) is good, and these cheap FPGAs are a great vehicle for that. But I also agree that modern microcontrollers are so capable that many projects do not require an FPGA. One area where FPGAs shine is implementing peripherals that operate autonomously alongside a microcontroller. For example driving addressable LEDs requires fairly tight and consistent timing. It's nice to have that decoupled from software in case the microcontroller has something serious to do along with controlling the LED. Cheers.

  • @spillagonner
    @spillagonner 14 днів тому

    Definitely a learning experience! Thanks (although I think my head might explode).

  • @paulspark7287
    @paulspark7287 16 днів тому

    With the Nano 20K, have you experienced the issue of not being able to program it again? I programmed a design earlier and unlike other FPGA boards, the design is persisted after powering off. I cannot program my 20K anymore no matter what I try. Initially it wouldn't program until I dropped the frequency from 2.5 to 2MHz.. but neither is helping now. I've tried powering up with the S2 button held down but I still can't get anything to load.

    • @electronics.tinker
      @electronics.tinker 15 днів тому

      Sorry, I do not see that. My Tang Nano 20K programs reliably. I use default frequencies and do not have to press a button. I can load the design to SRAM (which is not permanent) or to flash (which is). I can program it using the latest Gowin educational tools on Windows (but not Linux). On Windows, the only problem is that sometimes I need to select Edit/Cable Setting/USB Cable Setting and let the tool find the device. On Linux Ubuntu 22.04 openfpgaloader works very reliably. See my video on getting started with the Tang Nano 9K for more on openfpgaloader. Best wishes

    • @paulspark7287
      @paulspark7287 15 днів тому

      @@electronics.tinker It was my mistake. I thought multiple files could be programmed at once, but they all need to be loaded individually.. So I just had to hold down S2 while powering up and ensure that only one file was checked in the Gowin programmer. The errors the programmer gives back tend to be a bit misleading. ..and yeah, I'm using Windows.

  • @spillagonner
    @spillagonner 19 днів тому

    Greg...at 7:16, after having done the floor planning, you say 'and...we should be able to synthesize...,' when you mean to say 'place and route.'

    • @electronics.tinker
      @electronics.tinker 19 днів тому

      You are right. I had not noticed that misspeaking. Cheers.

  • @spillagonner
    @spillagonner 21 день тому

    Hey Greg! Using your videos to try getting into FPGA. Downloaded Gowin FPGA Designer v1.9.9.03 Education build to my Ubuntu 22.04 ThinkPad. On start-up, terminal reports: Qt: Session management error: None of the authentication protocols specified are supported. Any clues? Should I be worried?

    • @electronics.tinker
      @electronics.tinker 21 день тому

      I get the same thing: Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed It has not caused me problems. I think Gowin tested their Linux-based tools on a version of Ubuntu even older than 22.04. As you use newer versions of Ubuntu, problems get worse. Gowin's strategy for supporting Linux is not very good. Frankly, the Gowin tools work a lot better on Windows (at least Windows 10-- I don't have a computer capable of running Windows 11). I have started running the Gowin tools mostly on Windows as the path of least resistance, and I run Ubuntu 22.04 under Windows Subsystem for Linux (WSL2) on the same machine. This allows me to continue to use Ubuntu for software builds. I prefer Linux to Windows, but Gowin does not make it easy! Cheers.

  • @cengizhan1235
    @cengizhan1235 Місяць тому

    Grug, great video. thanks. I am looking image processing or voice processing applications using tang nano 9k, i dont know if you are interested in signal processing.

    • @electronics.tinker
      @electronics.tinker Місяць тому

      Glad you liked the video. I don't know much about signal processing, though.

  • @YoutubeBorkedMyOldHandle_why
    @YoutubeBorkedMyOldHandle_why Місяць тому

    Great video, thanks for posting it. I don't have the 4K, but I have a 9K and a couple of 20Ks. Umm ... perhaps a dumb question but, what in your opinion is the point of an fpga chip having a hard core, as compared with just connecting an fpga to a separate microcontroller? It's interesting that this is available, but are there any practical uses where this might make sense, or is this mostly a matter of keeping traces on the silicon real short?

    • @electronics.tinker
      @electronics.tinker Місяць тому

      Yes, there are circumstances in which having a hard core makes sense. Imagine that the FPGA is being used to implement a high-speed peripheral, a computational accelerator, or both. Also, assume that these are to be memory-mapped peripherals of a controlling core. The number of signals coming out of the core is pretty high. For that reason alone, it can make sense to integrate the core into the FPGA. I think this is more likely in larger FPGAs where the you need may be even more sophisticated core than an M3. Integrating a a hard Cortex-A53 (to run Linux), hard DDR controller, hard ethernet, etc. is possible (actually easy to find) on larger FPGAs. The FPGA becomes a complete Linux-capable system-on-a-chip connected internally to the FPGA resources. More complex interconnects than APB will be used so the signal count and frequency will be high. Also , some of the signals may be differential. The smaller the FPGA, the less this makes sense (at least on average). Cheers.

  • @ivolol
    @ivolol Місяць тому

    Very nice video. Tang could almost employ you to promote their products given the quality of tutorial you provide. Does that GPIO interface, mean that the FPGA cannot get signals 'directly' through the GPIO pins but only through the ARM core? That would seem be a downside but maybe I misinterpret. It seems possibly that this board was intended to be focused on Camera/HDMI functions, rather than being 'general purpose'? I would look forward to any material you could show of a simple project demonstrating the MCU and FPGA interacting. If you install the msys2 distribution platform for windows, it allows you to get a number of toolchains. The most famous one is the MinGW-w64 fork of GCC that is compatible directly with Windows; but it also includes a great many other 'normally linux' tools to get (make, cmake, etc etc etc). It basically uses a version of Archlinux' pacman package manager to install tools for windows. Of interest, you can install the 'mingw-w64-x86_64-arm-none-eabi-toolchain' meta-package in order to get a GCC toolchain for ARM, and clang is also available as well (both for x86/x64 and ARM). Also available is using xpm ("the xPack Project Manager"), using that package installer you can get '@xpack-dev-tools/arm-none-eabi-gcc' which will also give you a GCC for ARM. As you say, using some linux distribution underneath WSL2 is also a good option these days. In terms of USB-Serial adapters, there a good number of other chips on the market that side-step the problem of using fake FTDI FT232RL chips. Ones using Silicon Lab's CP2102 or CP2104 ICs generally work very well, and probably either auto-install drivers on newer windows or they're pretty easily to find on the net and install.

  • @VandalIO
    @VandalIO Місяць тому

    Thank you for this !! Was looking for something like this

    • @electronics.tinker
      @electronics.tinker Місяць тому

      Glad you found it useful. I had noticed that there is not too much information out there on the M3 on the Tang Nano 4K.

  • @alexeygordienko6066
    @alexeygordienko6066 Місяць тому

    Man, thank you for your work on the manuals!👍

  • @lorenzocapobianco3043
    @lorenzocapobianco3043 Місяць тому

    3:10 [SOLVED] I had the same dependencies problems on Fedora. More in detail, the error message was "undefined symbol: FT_Done_MM_Var". After searching online, it seems the problem is related to the library "libfreetype.so.X" (where X is a number) stored in "IDE/lib" folder. Renaming or deleting it should solve the problem. In my case, I just renamed it into "libfreetype.so.6.old" and the IDE started working without any problem. Hope this can be useful for someone else too.

    • @electronics.tinker
      @electronics.tinker Місяць тому

      That's good information, thanks. I decided that the path of least resistance is to run Gowin on Windows, though.

    • @WILLMARFERNANDOROMEROMARIN
      @WILLMARFERNANDOROMEROMARIN День тому

      it work for me too in Ubuntu 24.04.1 LTS, thanks very much

  • @SaiprasadToshatwad
    @SaiprasadToshatwad Місяць тому

    What i mean is to create interface for HLS(High level synthesis) for any kind of fpga

  • @SaiprasadToshatwad
    @SaiprasadToshatwad Місяць тому

    Hi sir, I was curious about FPGAs and their capabilities for faster computing and matrix multiplication. That's why I bought a TAN Nano 20K for machine learning on the edge. I just want to know if we can talk to the Nano 20K via JTAG communication and perform high-speed computing. I mean, given an address for matrix multiplication in the FPGA, can we access that address to calculate the result in C programming?

  • @camister69
    @camister69 Місяць тому

    Thank You! It works! Ubuntu 18.04 LTS

  • @matthewvenn
    @matthewvenn Місяць тому

    Great video, thanks for the clear explanation!

  • @ErikS-
    @ErikS- Місяць тому

    Excellent tutorial.

  • @Tridenux
    @Tridenux 2 місяці тому

    is it possible to make 100mhz to 5.5ghz sdr by a human hand {DIY}

    • @electronics.tinker
      @electronics.tinker Місяць тому

      That would be much harder. Simple, cheap analog multiplexers are not fast enough. Also producing quadrature LO signals at such high speeds would need different techniques.

  • @lukaspfitscher8737
    @lukaspfitscher8737 2 місяці тому

    I have these thissh script: my verilog file and my io map file. I dont think you need all this GUI stuff fil_v="main.v" fil_io="io_map.cst" yosys -q -D LEDS_NR=6 -p "read_verilog $fil_v; synth_gowin -json net1.json" yowasp-nextpnr-gowin -q --json net1.json --write net2.json --device GW1NR-LV9QN88PC6/I5 --family GW1N-9C --cst $fil_io gowin_pack -d GW1N-9C -o main.fs net2.json openFPGALoader -b tangnano9k main.fs

    • @electronics.tinker
      @electronics.tinker Місяць тому

      You are using an open source tool chain which has its advantages. But. using Gowin hard IP blocks might be harder without the Gowin tool chain. I am not sure. Thanks for the comment.

  • @blenderbuch
    @blenderbuch 2 місяці тому

    Thanks! Just the simple first example I looked for.

  • @paulspark7287
    @paulspark7287 2 місяці тому

    Thanks so much for doing this video. I'm new to the Tang Nano devices. I was a reluctant to use them since I was so comfortable with SignalTap on the Cyclone IV but having seen the GAO in action I'm definitely keen to play more with the Tang Nano - and they certainly synthesise a lot faster than the Cyclone IV/V devices! I love the small size of the Tang Nano devices too.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Glad you found it helpful. I was attracted to the Tang Nano boards by their low cost. They are cheap enough to buy just to tinker with them and learn about FPGA development. I also like that they are bread board friendly. GAO is helpful, at least on Windows. The latest educational version is more stable.

    • @paulspark7287
      @paulspark7287 2 місяці тому

      @@electronics.tinker I only dug out my old Nano 1k board the other day. I bought it a few years back. I couldn't use the educational version - it no longer supported my device so I got in touch with Gowin. They replied to me very quickly and advised me to install the latest non-educational version. I had avoided the non-educational version thinking there would be an associated cost with the license but there doesn't appear to be.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      I have read that the non-educational version is free, but you have to apply for a license (I think annually). I have been using the educational version just to avoid bothering with a license. Have you noticed any features missing from the educational version other than support for some devices? That would be interesting to know. Cheers.

    • @paulspark7287
      @paulspark7287 2 місяці тому

      @@electronics.tinker I haven't used it enough to notice, sorry. When you install the 'full' version, it replaces the educational one (on Windows) so I haven't been able to do a side-by-side comparison. I do switch between 3 PCs though and I've had no trouble getting licenses for all 3. They're pretty good with their support - definitely a game changer for people wanting to get into FPGA on a budget. My project got too large for the Cyclone IV - mainly because of the amount of logging I was doing with SignalTap, so that's what forced me into buying a Cyclone V - just for development. I'm sure the Tang 1k/4k/9k will suffice my needs - and to be honest, the 4K seems to be the same price as the 9k now. I think the only concern with these boards is the number of pins.. but the Tang Primer seems to have that covered. I think you can even swap out 25k chips on those Primer dev boards too which is quite exciting.

  • @ΝικΝοκ
    @ΝικΝοκ 2 місяці тому

    Very nice and clear video! I have tang primer 20k and i have issues with analyser oscilloscope. Does it work for you?

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      The analyzer oscilloscope works for me only on Windows, where I have found it to be useful on both the Tang Nano 9K and the Tang Nano 20K. Tools version 1.9.9.03 education is better than the older version. But I have never gotten the oscilloscope to work on Linux (Ubuntu 22.04.05). The loader/programmer is also problematic on Linux but works ok on Windows. In the end, better to use Windows for Gowin if you can.

    • @ΝικΝοκ
      @ΝικΝοκ 2 місяці тому

      @@electronics.tinker it is sad that it doesnt work on linux... as for the programmer i found out that openFPGALloader works fine with ubuntu (it is mentioned on their website as am alternative). I hope they make an alternayive to gao too. Their fpgas are nice and affordable, it would be great to work on linux too

  • @abbassahwan5107
    @abbassahwan5107 2 місяці тому

    Amazing I have been looking for a guide like this to build something on that same FPGA. Do you know if there is anyway I can get it to run linux?

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      My bet is that running Linux on PicoRV32 would not be possible unless you add support to Linux for the PicoRV32's non-standard interrupts. And then you would have to run MMU-less Linux which is possible but not a great idea in my opinion. And you would need at add support for the Gowin PSRAM to get enough memory. Running Linux on a larger soft core than PicoRV32 is probably possible on the Tang Nano 9K. See the litex project. I am 100% sure it is possible on the Tang Nano 20K, but even then I think it makes more sense on a hard RISC-V core that complies to the supervisor-level spec or a hard Cortex-A core. I don't know of a cheap FPGA with either, though. Connecting a Raspberry Pi Zero to a small Tang Nano board by something faster than i2c would be possible and interesting. Best wishes.

    • @abbassahwan5107
      @abbassahwan5107 2 місяці тому

      @@electronics.tinker thank you for your detailed response to my question!! I did look up the litex project. It says it is possible to be made on the 9k. Thank you for the information!!

  • @ΝικΝοκ
    @ΝικΝοκ 2 місяці тому

    Thanks, seems very clear to me, cant wait to try it

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Since I made this video, Gowin released version 1.9.9.03 of the educational version of their tools. GOA is less glitchy with this version. I have found it to be useful.

    • @ΝικΝοκ
      @ΝικΝοκ 2 місяці тому

      Nice.. I use linux and openFPGALoader. I set up the .rao file and burn the design. But when i try to open the oscilloscope i get the error : Can not connect to jtag server... Any idea why this happens? Iuse the tang primer 20K board

    • @ΝικΝοκ
      @ΝικΝοκ 2 місяці тому

      I figure this out (using chat gpt) i had to rename one file (libz.so.1 to libz.so.1.bak). Now i have another problem... i have made a simple counter 25 bits. After setting the clock(clk) and triger (ther reset signal assigned to button T10 of the board), when i press the auto button and then click the reset button on the board seems like it doesnt trigger anything...The only thing i made different was to select gowin usb cable GWU2K beacause the other option (there are only 2 for tang primer 20k i gwess) gave an error. Any idea why this happen? (i have downloaded the 1.9.9.03 version ). I have tried it many times... Seems like the analizer osc. software can not communicate with the board for some reason

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      I never got GAO to work on Linux. I think it is somewhat tied to an older version of Ubuntu than I have. You could use "ldd command" to see what shared libraries "command" will use. There are many shared libraries packaged with the Gowin tools on Linux, but maybe Gowin would be better off offering a Linux container or something. Making a program work on all flavors of Linux can be difficult. I prefer to develop on Linux, but I find that the Gowin tools work more smoothly on Windows.

  • @t1d100
    @t1d100 2 місяці тому

    👍👍👍👍👍

  • @stevenwillis548
    @stevenwillis548 2 місяці тому

    I just found this. Nice work. I think the only way to get better disciplining would be to do it completely in HDL. Now, I need to go back through the other videos leading up to this. Again, well done.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Glad you liked it. My thought is that using software is only adding a little latency to reacting. The time measurement is already pure hardware. Given a 1 second measurement period from the GPS, I think a little added reaction latency will have little impact. It might help to run clk_pps faster to reduce measurement jitter, and using the PicoRV32 core makes that more difficult (at least until I can figure out how to do floor planning with the Gowin tools, perhaps).

    • @danieldsouza3829
      @danieldsouza3829 2 місяці тому

      @@electronics.tinker It might also be interesting to use the GPS PPS to discipline an external TCXO, instead of the onboard oscillator to reduce jitter. There is a project called the time card from the open compute project which does something similar, but IIRC it's implemented entirely in HDL.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      I looked at Time Card. It mentions some interesting parts like a TCXO that has a PPS in signal. It looks like it can adjust itself. Interesting. Thanks for pointing out this project.

  • @stuartmarinus4810
    @stuartmarinus4810 2 місяці тому

    Greg, thank you for this awesome content and all the effort you've obviously put into making these videos. Having done VHDL many years ago you've inspired me l, just ordered a tang nano 9k. Re the accuracy and convergence algorithm, have you considered interating the 1s timestamp delta over time and then making the correction after that period, starting with 1s, 10s, 100s, then 1000s...this should allow your system to become incrementally more accurate to several significant digits.

    • @stuartmarinus4810
      @stuartmarinus4810 2 місяці тому

      Apologies for the typo Grug

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Yes, I can think of many variations to try, but I am not sure the result will be much better (although faster convergence is certainly possible). The big issue is that the GPS PPS signals are not perfect. I have two GPS receivers and I examined their PPS signals at the same time on my scope. The time between their rising edges varied by as much as 100 ns and was not constant. Maybe I should make a short video about this. A spec sheet from U-Blox suggests that the PPS signals might jitter less than 30ns (usually), but I don't know if this is true for what I have. I have no frequency reference adequate to test this. Someone who has one ought to make a video about using it to test cheap GPS modules! Thanks for your comment.

  • @ivolol
    @ivolol 2 місяці тому

    Could one implement this also in the nano 4k or 1k?

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      On the Tang Nano 9K, the project uses 37% of the available logic and 47% of the CLS's-- but a lot of that is the PicoRV32 core. I don't have a Tang Nano 4K (or 1K), but I think the 4K has a Cortex M3 hard core. You would have to use it instead of the PicoRV32 soft core. Then, I think there is a good chance it would work. The 1K is too small for the PicoRV32 core (and I think it has no ARM core). So, the only approach would be to use the 1K in conjunction with an external CPU like a Raspberry Pi, Arduino, or ESP32. You could use i2c to read and write the PPS registers. One other concern is speed. clk_pps should be at least 60 MHz. I am not sure what speeds the 1K and 4K would support. I have noticed that higher resource utilization causes the place and route tool to be less likely to achieve a given clock speed. I have no idea about the 1K and 4K in this regard. I also don't know how to use the floorplanner tool to help the place and route, but that's a topic for another day.

  • @simontillson482
    @simontillson482 2 місяці тому

    Very useful content, thankyou. You have something of a gift for a concise, but interesting way of demonstrating and explaining these concepts.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Thank you for the very kind comment. I enjoy these technologies and make videos in the hope that others will enjoy them also.

  • @ivolol
    @ivolol 2 місяці тому

    People constantly say "but xxx might not work on a breadboard..." because it seems to be common EE mythical lore. No, nothing can possibly work on a breadboard over 1Mhz! You damn fool! Stop trying! It's a breadboard! Manhattan solder your circuit like a real HAM! ...but a hell of a lot of circuits way above 10Mhz seem to work just fine on a breadboard, with a little attention paid. Of course not as good as perfect on a 4 layer PCB... but damn well good enough to demonstrate thousands of examples.

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      It's a fair point. Better to try it than just give up. Certainly, I have had success on breadboards way above 1 MHz.

  • @ivolol
    @ivolol 2 місяці тому

    I saw the tang 4K also comes with an M3 coprocessor, would that be ideal for offloading 'non-critical' general compute tasks to, while the FPGA handles the critical functions of a program?

    • @electronics.tinker
      @electronics.tinker 2 місяці тому

      Having a hard core on an FPGA would certainly be interesting. But the 4K is a fairly small FPGA. A Tang Nano 9K with a PicoRV32 soft core likely will have as many resources left over after including the soft core as the 4K has in the first place. But the m3 will likely be faster. The Tang Nano 20K is also nice. After including a PicoRV32 soft core, it will have more resources left over than even the 9K. I think if you are just learning about FPGAs without a specific project in mind (in particular one that needs a core), then the 9K and 20K are good choices. The prices don't appear to be that different. My Tang 20K was $25 from Amazon. That was a good deal. If I could buy a 4K for, say $10, I'd probably get one just to see exactly how the m3 is integrated, though. Basically, they are all good choices in one way or another. By the way, in case you didn't see them, I have several videos that show the use of the PicoRV32 soft core. I like using the version straight from github rather than using the encrypted IP block available directly in the Gowin IDE.

  • @martinmartinmartin2996
    @martinmartinmartin2996 2 місяці тому

    Analysis of Wen Bridge Osc lamp stability ; difficult math anaysis Oliver, B.M. Ef{ect o£JY - Circuit Nonlinearity on i9~ Amplitude Stab~fity of R.C. Oseillators, Hewlett Packard Journal, April June 1960, Volume 11, pp 1-8.

  • @jamesross3939
    @jamesross3939 2 місяці тому

    Very educational and well done explanation for us newbies. Good work! And thanks for the GitHub code!

  • @ВячеславПопов-ц3ж
    @ВячеславПопов-ц3ж 3 місяці тому

    Hello. Have you tried synthesizing a PicoRV32 microprocessor on a TangNano-20K board according to the Gowin PicoRV32 Quick Design manual Reference Manual IPUG915-1.3 with downloading the program from SPI-Flash?

    • @electronics.tinker
      @electronics.tinker 3 місяці тому

      No. I looked at it but decided that using the picorv32 direct from its author's git (github.com/YosysHQ/picorv32) was so much more transparent. It works the same way on the Tang Nano 20K. See my video on PicoRV32 interrupts. The github for it supports both the 9K and the 20K. Best wishes.

  • @quangthango0o
    @quangthango0o 3 місяці тому

    Thank you very much for sharing. Very appreciated your work.

    • @electronics.tinker
      @electronics.tinker 3 місяці тому

      I am happy to hear that you found the video useful.

  • @durka8892
    @durka8892 3 місяці тому

    Hello, I'm new to the world of FPGAs, and I have a question. The TangNano 9K has a 27 MHz crystal oscillator, but I can generate a higher clock using the PLL. My question is: what is the maximum frequency I can achieve? At 2:05 in the video, a table shows 1200 MHz-is that correct? But at 0:55, it mentions a 200 MHz clock. I'm a bit confused about this part. Thank you for the video.

    • @electronics.tinker
      @electronics.tinker 3 місяці тому

      It's a good question. In general, you have to dig through and understand technical documentation available on the Gowin website to answer this type of question. The FPGA on the 9K is a GW1NR-9 with speed (and temperature) grade C6/I5. I am looking at document "GW1NR series of FPGA Products Data Sheet", version DS117-3.0E. Its Table 3-21 answers the question saying the max valid CLKOUT from rPLL is 600 MHz (and the min is 3.125 MHz). The table also gives limits on intermediate clocks that are involved. A separate document "Gowin Clock User Guide UG286" explains those intermediate clocks and how they form CLKCOUT. It's not easy stuff, and there are many docs to shift though. And then, you need a design that can actually use a 600 MHz clock while still meeting setup and hold times. I doubt there is much you can do on the GW1NR at such a high speed. It's why you have to look at the timing report that the tools generate to see if your design meets timing. There are still many aspects of this that I cannot understand from Gowin's docs. But I know that red text in the timing report means "bad!" Good luck with you FPGA.

  • @michaellablanc6886
    @michaellablanc6886 4 місяці тому

    Great companion video to your earlier coverage of the down converter / receiver circuit! Thanks for sharing this information in such an approachable manner. Is there any chance you have a GitHub location with the schematic or Lspice file? Thanks again for this really outstanding content.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      Glad you enjoyed it and good idea. I created repo called grug_misc_projects on github under user grughuhler. Let's see if UA-cam lets me post a link. github.com/grughuhler/grug_misc_projects

    • @michaellablanc6886
      @michaellablanc6886 4 місяці тому

      Thank you so much for uploading those files. I am working on an order to Digikey so I can attempt to recreate what you demonstrated. Would you please confirm the values of R11-R14 and C6-C9? The schematic says {R} and {C}. Thank you again for providing this content.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      Yes, my mistake. I deleted the LTSpice parameter without adding a note. C=10nF and R=220 Ohms. Those values are interesting to play with. I am unsure how to best select them. I'll fix the picture on the github later.

  • @NackDSP
    @NackDSP 4 місяці тому

    This is exactly what I was looking for. Thanks for posting. I have had a Pi sitting around for a few years. Soon it will be a radio.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      I'm glad you found the video interesting. Best wishes with your experiment.

  • @t1d100
    @t1d100 4 місяці тому

    Great video! Important point for use and coding. Thank you.

  • @phillipneal8194
    @phillipneal8194 4 місяці тому

    Thank you for the video. Can this Tang Nano 20k generate sine waves at HF (20 meter) frequencies ? Just in case I want to build a well filtered beacon...just in case.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      The FPGA on the Tang Nano 20K (and the 9K) is a digital only device so its output pins are either high or low-- so it can produce square waves but not (directly) sine waves. If all you want is a square wave clock generator, check out a part called si5351. John Hawkes made a youtube video about using one of these as an LO sine wave generator by filtering its output. The video is called "SI5351 Clock Gen as Radio Local Oscillator in Old Radios".

    • @phillipneal8194
      @phillipneal8194 4 місяці тому

      @@electronics.tinker Thank you for your reply. I check out Hawkes video. I put a low pass filter into the output from the Si5351a and that knocked everything down a bit. However, the signal was knocked down below 0 db. So now I think I have to amplify and filter the results of the amplifier as well. ... So it goes.

  • @phillipneal8194
    @phillipneal8194 4 місяці тому

    Excellenet presentation/video. Thank you. I gotta think about this. I hate winding coils but I might need to for the filters.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      I agree that winding toroids would be the best way to get and tune inductors for RF filters. I suppose it would be interesting to see how well a breadboard RF filters could work at low frequencies like 1 MHz. One could compare its response to what a filter designer web site predicts. I'm glad you enjoyed the video.

  • @dl8cy
    @dl8cy 4 місяці тому

    Nice explanation and interesting examples, thank you for sharing your knowledge and greetings from Germany, 73 de DL8CY

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      Thank you. It's great to hear from someone in Germany.

  • @JonesMiller45
    @JonesMiller45 4 місяці тому

    Can you make a video on how to create a RISC-V architecture on this FPGA step-by-step? That would be awesome!

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      Do you mean implement a RISC-V soft core from scratch? That would be a big job. And others have already done it. See the litex project or the PicoRV32 core. I made a whole series of videos about using the PicoRV32 RISC-V core to implement a simple SoC. There is a playlist called PicoRV32 on my channel. The videos contain links to github with complete projects including some simple software. There are multiple branches on the github as I added stuff from video to video.

  • @michaellablanc6886
    @michaellablanc6886 4 місяці тому

    This is a great video, thank you for sharing your knowledge with this simple but informative demonstration. How difficult do you think it might be to create a similarly simple circuit to perform quadrature modulation of an input audio signal? Thanks again.

    • @electronics.tinker
      @electronics.tinker 4 місяці тому

      I presume you mean that the stereo audio will carry I and Q data to be upconverted to RF using the Tayloe circuit-- like for a transmitter. I have not tried this, although it would be fun. Dan Tayloe's paper briefly describes how to do it. I put a link to that paper in my first video about the Tayloe mixer "Tayloe RF Mixer Demonstration...". Also, you could check out NA5Y's youtube channel, in particular his video "ESP32 Based SDR Transmitter - Part 2 Tayloe Encoder". He shows a schematic. Cheers,

  • @stevetodd7383
    @stevetodd7383 5 місяців тому

    Erm, what about running the GOWIN code at 50MHz and then using a FIFO to cross clock boundaries to your working clock?

    • @electronics.tinker
      @electronics.tinker 5 місяців тому

      I think the performance of both could be improved by using an additional clock. I was trying to keep it simple. Clock domain crossing is a good topic, though. In the past, I tried to get the Gowin tool chain to complain about bad domain crossing. No luck with that so far.

  • @onurates9311
    @onurates9311 5 місяців тому

    Love it. More videos please

  • @mikebountain
    @mikebountain 5 місяців тому

    Good!

  • @BorealScott
    @BorealScott 5 місяців тому

    Thanks a lot for sharing!