<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>FPGA</title><link>https://community.element14.com/technologies/fpga-group/</link><description>FPGA discusses the latest trends in programmable logic devices, and offers access to education, workshops, webinars on FPGAs, SoCs, and other programmable devices.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-series-and-gowin-fpgas-for-beginners-a-practical-guide-part-1?CommentId=5c645097-0c2b-4eb1-89cb-53b9979fce80</link><pubDate>Mon, 19 Oct 2026 11:59:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5c645097-0c2b-4eb1-89cb-53b9979fce80</guid><dc:creator>shabaz</dc:creator><description>Good idea, that does look a very simiilar size!</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-series-and-gowin-fpgas-for-beginners-a-practical-guide-part-1?CommentId=b9e91f19-8499-4c21-9c1c-43b26ed3817c</link><pubDate>Mon, 19 Oct 2026 05:48:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b9e91f19-8499-4c21-9c1c-43b26ed3817c</guid><dc:creator>Jan Cumps</dc:creator><description>If that contraption doesn&amp;#39;t hold: There is a Schottky on the backside of the board, that seems to fit the footprint of the fuse: It has more space available. You can unsolder it, and place it where the fuse was. You can then scrape the path between the original diode and the capacitor to the right of it. And solder your PMEG2005EGW there. I think it would fit in.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-series-and-gowin-fpgas-for-beginners-a-practical-guide-part-1?CommentId=cc83ec4d-dc07-430c-a152-6a67c95a7fb6</link><pubDate>Sun, 18 Oct 2026 15:06:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc83ec4d-dc07-430c-a152-6a67c95a7fb6</guid><dc:creator>shabaz</dc:creator><description>One thing I don&amp;#39;t like is that there&amp;#39;s no practical way to feed in power to these boards other than via USB-C. For instance on the Tang Nano 20k, VBUS from the USB-C connector goes through an 0805-sized fuse to 5V. That 5V supply rail then goes to a header pin (which I wished to use to feed in power) but the rail is also all over the place on the board (there are a lot of voltage regulators). I decided to see what happens if I remove that fuse on the Tang Nano 20k and change it to a diode. There are some extremely tiny parts nearby (0201 perhaps), so I covered them with Kapton tape: The desoldering still wasn&amp;#39;t easy. The smallest diode I had was PMEG2005EGW (Schottky, 500mA) so I went with that.. not enough space to solder it on both pads so there&amp;#39;s a wire bridge. The leftmost PCB pad needs to go to the anode. Finally a drop of glue using the end of a toothpick to dispense it: It seems to work for now, but I don&amp;#39;t know if it will impact some projects or not.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=61ce8af7-e489-4d44-ac8e-e80da61610e6</link><pubDate>Wed, 14 Oct 2026 15:58:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61ce8af7-e489-4d44-ac8e-e80da61610e6</guid><dc:creator>michaelkellett</dc:creator><description>Page 11 of the It describes how to force things to use Clock or other resources. It might be worth checking why pdm_clk_d has been made - I think there is a schematic viewer in the tools. MK</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=0b0b1165-97ec-47d5-992d-aed8b80a698b</link><pubDate>Wed, 14 Oct 2026 14:28:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:0b0b1165-97ec-47d5-992d-aed8b80a698b</guid><dc:creator>shabaz</dc:creator><description>Hi Michael, Thanks for this! I used the double-register (2-FF) method on the toggle-based handshake signals (in both directions), whereas for the 256-bit registers there is a guaranteed minimum delay between write and read, because they are not used until after the 2-FF handshake. Hm, perhaps because of that, because it is seeing absence of FIFO on those data registers, it&amp;#39;s refusing to use dedicated clock routing for that second clock : ( The reason I&amp;#39;d initially avoided it was because I wanted to test using the BSRAM first separately, since I&amp;#39;d never used it. I&amp;#39;d have benefited from using a FIFO, because I did encounter other problems(not related to such clock-domain-crossing issues, but scenarios where I nevertheless still needed to move from two to three registers though! It was the quite embarrassing obvious conditions of sometimes wanting to only consume only 257, or 513 or 769 bits etc). I&amp;#39;ve learned from this mistake and I&amp;#39;d use a FIFO right from the start in future for such scenarios. EDIT: just figured out how to remove some of the warnings: There is a &amp;quot;clock groups&amp;quot; constraint option, where it was possible to place the two normal clock constraints I&amp;#39;d defined earlier. There&amp;#39;s a &amp;quot;Asynchronous&amp;quot; option there, so I selected that: Also, I couldn&amp;#39;t understand why a signal I had not created was being reported, it was called pdm_clk_d (which I don&amp;#39;t have in my VHDL source nor did I think was generated internally): Turns out I&amp;#39;d not been searching properly, it was right there: By doing those changes in the GUI, the constraints file now contains: create_clock -name clk -period 37.037 -waveform {0 18.518} [get_ports {clk}] create_clock -name pdm_clk -period 166.667 -waveform {0 83.334} [get_ports {pdm_clk}] create_clock -name pdm_clk_d -period 166.667 -waveform {0 83.334} [get_nets {pdm_clk_d}] set_clock_groups -asynchronous -group [get_clocks {clk}] -group [get_clocks {pdm_clk}] I don&amp;#39;t like not understanding this properly, why there are two clock constraints there, one for pdm_clk and one for that internal net pdm_clk_d, so I still need to get to the bottom of that. However just as a quick test, with those changes, I see: So, annoyingly it&amp;#39;s still not using proper clock routing. I&amp;#39;ll keep plugging away. Also, that PSRAM instance CLKOUT.default_gen_clk is something that doesn&amp;#39;t seem to exist in searches in that constraints GUI, but I can&amp;#39;t be the only one to have used the in-built PSRAM in these devices so I&amp;#39;ll search online a bit more. EDIT 2: Finally solved that PSRAM clock warning! Again, a very silly mistake.. I should have searched in &amp;quot;pins&amp;quot; - obvious really, since as far as the FPGA is concerned, that PSRAM chip is attached to real pins, since it&amp;#39;s a separate die. Timing constraints file now: create_clock -name clk -period 37.037 -waveform {0 18.518} [get_ports {clk}] create_clock -name pdm_clk -period 166.667 -waveform {0 83.334} [get_ports {pdm_clk}] create_clock -name pdm_clk_d -period 166.667 -waveform {0 83.334} [get_nets {pdm_clk_d}] create_clock -name psram_clkout -period 24.691 -waveform {0 12.345} [get_pins {psram_instance/clkdiv_s0/CLKOUT}] set_clock_groups -asynchronous -group [get_clocks {clk}] -group [get_clocks {pdm_clk}] I&amp;#39;m down to one remaining warning: WARN (PR1014) : Generic routing resource will be used to clock signal &amp;#39;pdm_clk_d&amp;#39; by the specified constraint. And then it may lead to the excessive delay or skew</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=88e0e483-6246-4281-851e-fc6ee7d8b0e1</link><pubDate>Wed, 14 Oct 2026 08:59:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:88e0e483-6246-4281-851e-fc6ee7d8b0e1</guid><dc:creator>michaelkellett</dc:creator><description>The tool is correctly warning you that the two clocks are not synched. Xilinx Vivado will warn you in the same way even if you have used their synching pragmas to set up domain crossing - to suppress the warnings you have to explicitly set up exceptions for the places where the clocks cross. As you have noticed the design may well work. However, you are (potentially) violating a real problem area: This from Google AI, search was: flip flop for crossing clock domains in fpga Your vector is multi-bit and you might get issues. Although it would involve a lot of re-wiring a nicer way to resolve your problem is to fill a dual clock fifo from the PSRAM (in the 40.5MHz domain) and read from it in the PDM clock domain. The tools have IP to make the FIFO and can use a block RAM. MK</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=b9f5b645-a050-4094-baad-17d91fb2cb5a</link><pubDate>Tue, 13 Oct 2026 17:07:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b9f5b645-a050-4094-baad-17d91fb2cb5a</guid><dc:creator>shabaz</dc:creator><description>Hi Michael, That&amp;#39;s correct, two clocks are being used. I don&amp;#39;t have a FIFO but am using a couple of buffers per audio channel to achieve the same effect. The main 40.5 MHz clock (from the PLL) is used to fetch 256 bits of data from PSRAM and place it in one of four 256-bit registers (two sets of two; two for left audio and two for right). Initially both sets, i.e. all four 256-bit registers, are filled up. As each buffer is filled, its corresponding bit in a 4-bit vector called ready_toggle is toggled to indicate that new data has been placed in that buffer. Initially this results in ready_toggle becoming &amp;quot;1111&amp;quot;. The process then continually looks for buffers that have been consumed by the serial playback side, by comparing ready_toggle with a 2-stage flip-flopped (for crossing the clock domain) 4-bit vector called consumed_toggle initially set to &amp;quot;0000&amp;quot; that is only set by the playback side. When two bits from the toggle vectors match, the corresponding buffer is free and can be refilled from PSRAM. In another entity there are two serial playback processes, one for the left channel and one for the right. These are clocked from the much slower external clock (a few MHz maximum), called pdm_clk . The left process runs on the falling edge of pdm_clk, while the right process runs on the rising edge. Each process takes data from its current 256-bit buffer and serialises it one bit at a time. When it finishes a buffer, it toggles the bit in consumed_toggle and then proceeds to play out the other buffer, which should already be filled by the far quicker PSRAM side process. The architecture uses the following continuous (concurrent) connection to combine the results from the two playback processes, i.e. acting as a multiplexer, so that there is data output on every clock edge: pdm_data &amp;lt;= right_bit when pdm_clk=&amp;#39;1&amp;#39; else left_bit; The timing constraints file contains: create_clock -name clk -period 37.037 -waveform {0 18.518} [get_ports {clk}] create_clock -name pdm_clk -period 166.667 -waveform {0 83.334} [get_ports {pdm_clk}] These are the options in the GUI though: These are the warnings: WARN (TA1132) : &amp;#39;psram_instance/clkdiv_s0/CLKOUT.default_gen_clk&amp;#39; was determined to be a clock but was not created. WARN (TA1117) : Can&amp;#39;t calculate clocks&amp;#39; relationship between: &amp;quot;pdm_clk&amp;quot; and &amp;quot;psram_instance/clkdiv_s0/CLKOUT.default_gen_clk&amp;quot; WARN (TA1117) : Can&amp;#39;t calculate clocks&amp;#39; relationship between: &amp;quot;psram_instance/clkdiv_s0/CLKOUT.default_gen_clk&amp;quot; and &amp;quot;pdm_clk&amp;quot; WARN (PR1014) : Generic routing resource will be used to clock signal &amp;#39;pdm_clk_d&amp;#39; by the specified constraint. And then it may lead to the excessive delay or skew I think this could be a test to see if Gowin support is useful.. I&amp;#39;ll send them this problem, see what they suggest.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=b383bda2-da33-4b3d-b6df-624036272ed2</link><pubDate>Tue, 13 Oct 2026 15:10:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b383bda2-da33-4b3d-b6df-624036272ed2</guid><dc:creator>michaelkellett</dc:creator><description>Am I correct in thinking that your PSRAM clock is 40.5MHz from internal PLL and that there is another clock from the signal generator being used to clock out the bits. If so then at some point data synchronous with the 40.5 MHz clock must become data synchronised with the Owon clock. The usual way to do this would be with a dual clock FIFO. MK.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=ba027bd7-ab00-4f6a-b869-198e30babd8b</link><pubDate>Tue, 13 Oct 2026 14:42:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ba027bd7-ab00-4f6a-b869-198e30babd8b</guid><dc:creator>shabaz</dc:creator><description>One thing I&amp;#39;m having difficulty with; I&amp;#39;ve successfully managed to output from PSRAM to a serial bitstream (green), but this time based on an external clock (yellow). In other words, the serial bitstream rate is dependent on the external clock. However, I want data on _both_ clock edges (as you can see, the green output changes on falling and rising clock edges). That works, but I cannot seem to make the Gowin software treat the yellow signal as a clock, it treats it as a normal logic signal, hence timing could potentially break. The warning I get is &amp;quot;Can&amp;#39;t calculate clock&amp;#39;s relationship&amp;quot; (between the clock being used in the process which is the 40.5MHz clock as mentioned in the blog post, and the external clock shown in yellow in the &amp;#39;scope trace. I have for sure attached that yellow signal to a pin on the FPGA which supports clocks. Testbed photo for those interested.. I was able to get UART working and use that to fill up the PSRAM, and then the PSRAM data is played out as shown in the green trace above. I&amp;#39;m using a low-cost Owon signal generator to create that external clock, and a Kingst logic analyzer to capture the clock and data. I only had 10-way header/socket pins unfortunately. Also, I avoided blocking the TFT connector area in case I ever purchase that.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=5a5d4a95-1c51-466e-812d-f0434efa4146</link><pubDate>Mon, 12 Oct 2026 00:05:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5a5d4a95-1c51-466e-812d-f0434efa4146</guid><dc:creator>shabaz</dc:creator><description>There&amp;#39;s enough to try out if anyone wants to, although it&amp;#39;s still a work-in-progress. I called it OpenGWScope. OpenGWScope installer (Windows only currently). It will prompt the user to copy a folder called Programmer from their existing Gowin app folder, into C:\Program Files\OpenGWScope\runtime\gowin (if that&amp;#39;s where this software was installed). Then use the Gowin FPGA Designer in the usual way, and select the &amp;quot;Lite&amp;quot; version of GAO, and then when the FPGA is running the code, use OpenGWScope. Using the app should be mostly self-explanatory, If it doesn&amp;#39;t connect to the FPGA, it is likely related to the port number. On my PC it was port 289 that worked, and that&amp;#39;s the default in this app. To change it, go to %APPDATA%\OpenGWScope (I have no menu for this, so it needs file explorer) and there is a .json file there, it can be edited. Example screenshot: I won&amp;#39;t work on this for a bit unless anyone hits a serious bug, because this app was originally just supposed to be a quick helper for my actual task (an FPGA-based mic simulator).</description></item><item><title>Blog Post: Tang Nano Series and Gowin FPGAs for Beginners, Part 2: Double Blinky! A VHDL Walk-Through</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-series-and-gowin-fpgas-for-beginners-part-2-double-blinky-a-vhdl-walk-through</link><pubDate>Sun, 11 Oct 2026 16:15:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:850d5de0-5e34-46d6-8487-3a8abc2f9a14</guid><dc:creator>shabaz</dc:creator><description>Table of Contents Introduction Start a Project Library and Package Declarations IO Ports List (Entity and Port Declaration) VHDL Architecture Body Architecture Declaration (Constants and Internal Signals) Architecture Statement Region (Concurrent Statements) VHDL Code Summary Physical Constraints (Pins) Synthesis Assigning Pins Constraints using the FloorPlanner Timing Constraints Place and Route Programming the Bitfile (Bitstream) Instrumenting with GAO: Gowin Analyzer Oscilloscope Summary Click here for Part 1 Introduction The Tang Nano series of boards were introduced in FPGA for Beginners Part 1 , and in particular, it was covered what pins do what, and how the FPGA works at a high level. Now it was time to start coding a simple demo. The demo will just blink a couple of LEDs. I’ll walk through the VHDL code line-by-line, so it’s hopefully clear what is going on. To recap from the previous blog post, ensure you’ve got a good quality USB-A-to-C cable, and register, download and install the Gowin FPGA Designer (also known as Gowin EDA) app; I installed the &amp;quot;Education build&amp;quot;. Start a Project For a first experiment with the Tang Nano, launch the Gowin application, and click File-&amp;gt;New-&amp;gt;Project . A prompt appears for the device; I decided to target the Tang Nano 9k, and selected the GW1NR series (there&amp;#39;s a table in the previous blog post listing which FPGA is in which Tang Nano board). You might need to fill in more parameters until all that’s left is one selection that matches your FPGA, then select it. The IDE is easy to use. Notice the left pane has Design , Process and Hierarchy tabs underneath it. In the Design tab, it is possible to right-click and add existing or new files. In the Process tab, you can perform actions to ultimately transform those source files all the way through to the final bitstream/bitfile that needs to be transferred to the FPGA. I right-clicked, and selected New File , selected VHDL , and gave it a name of double_blinky (a .vhd suffix will get appended). Double-click on that file in the Design tab, and the text editor pane will appear on the right. Here is the HDL code I used (I am not a VHDL engineer, so please don’t assume I’m using best practise!). I’ll go through this line-by-line next, but it&amp;#39;s best to keep a separate window open with that entire code in view, so it&amp;#39;s easier to mentally navigate through it. Library and Package Declarations First off, the following is boilerplate and is generally required for VHDL projects. The 1164 refers to an IEEE standard. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; IO Ports List (Entity and Port Declaration) Like most digital circuits, double_blinky makes use of a clock to progress the circuitry along, and a reset line is very normal too, to make it start in a desired state. Therefore, double_blinky is expected to have four physical connections to the outside world: clock, reset, and two LED signals. The LED signals can be expressed as a two-bit array (called a vector in VHDL). The entity declaration, including its port list, describes these four input or output signals. The reset signal is named reset_n just to make it clear that the signal is expected to go low to perform the reset action. This is commonly called an active-low reset. entity TOP is port ( led : out STD_LOGIC_VECTOR(1 downto 0); clk : in STD_LOGIC; reset_n : in STD_LOGIC ); end TOP; VHDL Architecture Body Here&amp;#39;s where the FPGA developer gets to type out how they wish the circuit to function! The architecture has a name, and in this example I&amp;#39;ve called it RTL . The name can be almost anything you like, but RTL is common. It stands for Register Transfer Level, which basically means describing the circuit in terms of registers and the logic operating between them. This is a very normal way to describe digital circuits intended for implementation in an FPGA. architecture RTL of TOP is The architecture body is split into two sections: the declarative region and the statement region. They will both be described next. Architecture Declaration (Constants and Internal Signals) These are fairly self-explanatory. Since the clock input may be running at a high speed, a counter is needed. The constants here are used to indicate how many clock pulses are needed before the LED state will be changed: -- CONSTANTS constant CLK_FREQ_HZ : integer := 27_000_000; constant MSEC_CONST : integer := CLK_FREQ_HZ / 1000; constant LED_DELAY_CONST : integer := MSEC_CONST * 500; It stands to reason that signals representing the binary count value will be required, and that those signals will probably come from a register, since flip-flops/registers are normally used for anything that needs to remember a state, such as the current counter value. For that reason I called the signal counter_reg , just to make it clear that the value is stored in a register. Although I&amp;#39;ve declared it as an integer, the synthesis tool will work out how many bits are needed to implement it in hardware. Similarly, an internal signal is needed to hold the LED states, so I called it led_reg . This is a two-bit vector, containing the individual bits led_reg(1) and led_reg(0) . -- INTERNAL SIGNALS signal counter_reg : integer range 0 to LED_DELAY_CONST - 1 := 0; -- LEDs are active-low: &amp;#39;1&amp;#39; = off, &amp;#39;0&amp;#39; = on. -- Start with only the rightmost LED on. signal led_reg : STD_LOGIC_VECTOR(1 downto 0) := &amp;quot;10&amp;quot;; Architecture Statement Region (Concurrent Statements) Here is where all the meat of the project resides. Unlike conventional software code, which executes instructions sequentially, a different way of thinking is needed with HDL. All the main statements underneath the following begin keyword are concurrent, meaning they operate alongside one another rather than executing one after the other. When the design is synthesized, these statements describe hardware that operates in parallel within the FPGA. There are two main elements in this example. begin The first element is a concurrent signal assignment, which effectively describes a permanent connection from the internal LED register outputs to the LED output ports declared at the start of the VHDL. -- Continuously connect the internal LED register outputs to the LED signals led Save , to save the changes to that .rao file ( GAO Config File ). After that, I went into the Process pane, did a clean Synthesize, followed by a clean Place &amp;amp; Route, and then programmed the board as before. GAO did not work for me using SRAM load , so I selected Flash when programming the device. The LEDs blinked as before, i.e. the VHDL code was running fine. To connect to the embedded logic analyzer, I went to Tool-&amp;gt;Gowin Analyzer Oscilloscope , and selected the same value channel to connect to as I had used for the programmer, which in my case was numbered 289 . The logic analyzer pane appeared, and there was a blue icon to start a capture, and a ‘continuous capture’ icon next to that. The animated GIF here shows what I saw with the continuous capture. Summary Several of the Tang Nano boards were introduced in the first blog post. This second blog explored the Gowin software which is needed to build projects and transfer them onto the board. For creating projects targeting FPGAs such as those on Tang nano boards, the Gowin FPGA Designer software is quite user-friendly, and straightforward to use. It doesn’t take up much space on the PC either (ballpark 2 GB, which is small in FPGA world! Xilinx software takes up tenfold space). In this blog post, a VHDL project was created from scratch, to make a couple of LEDs perform a double-blinky sequence. The Gowin software was then used to synthesize the design, and graphical tools were used to set the pin and clock constraints, before doing the placement/routing. The programming went fine, but the Tang Nano boards are quirky in that a normal USB-C-to-C cable might not always work, and I don’t think the supplied USB-A-to-C cables are trustworthy either. Best to use your own known working USB-A-to-C cable. Finally, the ability to debug hardware in action, using the Gowin Analyzer Oscilloscope (GAO), was briefly explored. Thanks for reading!</description><category domain="https://community.element14.com/technologies/fpga-group/tags/GW1NR">GW1NR</category><category domain="https://community.element14.com/technologies/fpga-group/tags/tang%2bnano">tang nano</category><category domain="https://community.element14.com/technologies/fpga-group/tags/fpga">fpga</category><category domain="https://community.element14.com/technologies/fpga-group/tags/gowin">gowin</category><category domain="https://community.element14.com/technologies/fpga-group/tags/GW2AR">GW2AR</category><category domain="https://community.element14.com/technologies/fpga-group/tags/GW1NZ">GW1NZ</category><category domain="https://community.element14.com/technologies/fpga-group/tags/GAO">GAO</category><category domain="https://community.element14.com/technologies/fpga-group/tags/fpga%2bbasics">fpga basics</category></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=8d40f052-983e-42a6-9a50-0f8f2369dc12</link><pubDate>Sun, 11 Oct 2026 14:17:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8d40f052-983e-42a6-9a50-0f8f2369dc12</guid><dc:creator>shabaz</dc:creator><description>Hi Michael, I had the identical question to yours, how to adjust any IP that&amp;#39;s already been created! : ) ChatGPT helped (i.e. that there is an icon to click that looks like a folder). That was unintuitive in the Gowin app, but once you know you know as you say. . I&amp;#39;ve not tried the VGA example so far. Regarding AI, I&amp;#39;m using a combination of two, ChatGPT initally usually, since it&amp;#39;s low-cost (I have the &amp;#39;plus&amp;#39; level which is the basic paid one, about $20 per month), and hard to use that up fully although there is a file upload limit I learned a few days ago.. but not too bad, I had to wait an hour, but in the meantime I could simply paste the file contents into the chat. (2) for projects where a lot of coding is needed, Antigravity (but I&amp;#39;ve heard good things about Claude, but not tried it so far). The workflow I&amp;#39;m using is here: (+) Using Antigravity with a Real Project: A Practical Workflow - element14 Community and it&amp;#39;s quite easy to exceed the limit with the $20 account (but it is possible to buy more tokens but I try to avoid that). I&amp;#39;m currently trying to get this app improved, so I tried this long prompt into ChatGPT (and uploaded my entire project source code): (1) If no Tang board is connected, and the user clicks on Single or Run, it&amp;#39;s not possible to stop, and close does display the closing message, but it never closes. I have to Ctrl-C in the Powershell that launched the app, to close it. It probably needs to display a message, or not allow Single or Run to be clicked, if the board is not attached. (2) Does the code indicate to the user if there&amp;#39;s no jtagserver running and no Programmer folder? It should probably prompt the user on startup, to either launch that, or to place that folder. But continue running the program regardless, don&amp;#39;t exit. (3) The app needs an icon, currently it has the default Flutter icon. Please create an appropriate one. I have attached a possible example. (4) Change the minimum vertical height of the app to be about 50% of whatever the current allowable vertical height is, so we can check out the behaviour when the number of signals are too many to fit on the screen simultaneously. (5) What happens if there are more signals than will fit in the view vertically? My feeling is that when the RAO file is opened, show the signal names and sizes in the Signals column. I suspect the signals and waveform viewer will need to be scrollable vertically (but don&amp;#39;t waste space on a vertical scrollbar) but only if performance is not impacted. (6) Implement a per-project config file, that automatically gets saved in the .rao folder, with the same name as the .rao file (minus the .rao suffix), but with _opengwscope_config.json (or .xml) appended. That file ought to contain a checksum of the .rao file, so that if the .rao file ever changes, we know about it. (7) When stopped/not running, it should be possible to click on the text &amp;quot;Signals&amp;quot; (don&amp;#39;t make it look like a button, that&amp;#39;s clutter) and a popup should show a scrollable table, and allow the user to choose which signals to show or hide, using check-boxes (and have a select all/select none), and also have up/down buttons to choose the order, and also a reset button. When the user navigates away, then these settings should be stored in that config file mentioned in point 6 above, and that file can be loaded automatically if present, when the .rao file is loaded. I think that will be quite clean behaviour, but if this config file does not match the .rao file then the ordering/enablement that is saved in the config file can be deleted and ignored, since it doesn&amp;#39;t match the .rao file, and the user will need to do that from scratch. (8) When not running, for all signals with width 2 or more, in the Signals list, there should be a way to choose the presentation. For example, allow hex, decimal, signed decimal (where it uses the most significant bit as the sign), ASCII (if the number of bits are 7 or 8), I think that is sufficient, but if you think there are other low-hanging fruit presentation options that should be present, then add them, provided they don&amp;#39;t impact performance to any noticeable extent. At some point state names would be extremely useful (they could get stored in the same config file) so design such that this is not ruled out, so it can be done in a later phase. It has returned me a modified bundle, so I&amp;#39;m about to test now, I&amp;#39;m sure there will be bugs but I want to get it to something stable and then I&amp;#39;ll switch to AntiGravity for the rest of the features (e.g. Find, save in a format that can be used with other apps, etc).</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=95d61b35-df94-48f7-a084-04df43d552ed</link><pubDate>Sun, 11 Oct 2026 13:51:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:95d61b35-df94-48f7-a084-04df43d552ed</guid><dc:creator>michaelkellett</dc:creator><description>Very good - which AI are you using ? I&amp;#39;ve never liked the built in logic analyser things in Lattice Diamond or Xilinx Vivado (found they often messed up the design and made timing closure fail). I prefer to use simulation to the max and add my own instrumentation if required. I&amp;#39;ve been immersed in Aldec and Viavado for the last three and abit weeks so thought I&amp;#39;d take a little break an look at the Gowin toolsand maybe get my Tang Primer 25K going. Now that you are established as the E14 GoTo for Gowin: - it needed three bites for Claude to help work out how to tweak the IP in the Gowin Fifo example. (Open the IP generator and then open the .ipc file for the IP.) It&amp;#39;s not that terrible if you know how but there doesn&amp;#39;t seem to be any help in the IDE. Is there a better way ? And what does the vga text example actually do ???? MK</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=157367f3-7384-4d03-bfb4-55013385afde</link><pubDate>Sun, 11 Oct 2026 06:00:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:157367f3-7384-4d03-bfb4-55013385afde</guid><dc:creator>shabaz</dc:creator><description>There&amp;#39;s an &amp;quot;oscilloscope&amp;quot; feature with the Gowin software, for live troubleshooting. It instruments the project with attachments to all the signals of interest, so that when the FPGA runs, it sends those signals to the PC. While their app works, their display update rate was quite low, so I spent some time with the AI reverse-engineering the protocol, and came up with a nicer-looking app, although not as feature-rich as as the Gowin one.. but a lot faster though. I&amp;#39;ll create a GitHub repo for this when it&amp;#39;s got a few more features (like markers for instance). I copied some ideas from Rohde&amp;amp;Schwarz &amp;#39;scope displays, and have a similar history playback feature. This is the Gowin software (this is in a &amp;quot;Lite&amp;quot; setting, there is another mode with a lot more features like triggered captures, but I&amp;#39;ve not tried that:</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=05da6449-dafd-4ffb-acb0-33148c831b46</link><pubDate>Fri, 09 Oct 2026 13:33:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:05da6449-dafd-4ffb-acb0-33148c831b46</guid><dc:creator>michaelkellett</dc:creator><description>Hello Shabaz, That&amp;#39;s pretty good. Most of the vendor tools can produce some kind of block diagram output from the VHDL/Verilog but they are often hard to decipher. AMD/Xilinx have their block diagram design tool but it requires the use of the complicated AXI bus and is fine for linking up big dollops of pre-built IP. I use the block diagram editor in Aldec Active HDL which I find helps a great deal but it is very expensive. The upside of the Aldec tool is that the blocks generate code and the simulator annotates the blocks when it runs. Your approach requires more work from the operator but has the advantage of being free ! I use a different PCB CAD (easy PC) for drawing general purpose block diagrams and timing diagrams. MK</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=c459ac3a-ab46-4176-aa05-d6fa5fda93f0</link><pubDate>Fri, 09 Oct 2026 13:03:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c459ac3a-ab46-4176-aa05-d6fa5fda93f0</guid><dc:creator>shabaz</dc:creator><description>Hi Michael, Thanks! I used KiCad, it&amp;#39;s not designed for it but I have a program (happy to share that but it&amp;#39;s very crude, I have not tested on complex VHDL source files) that will generate a symbol for all entities and components, and it will dump them, plus all signal and constant names, onto the schematic screen, without trying to make sense of what connects where. For instance I was trying it with a basic blinky project, where there&amp;#39;s just a top entity and a few signals/constants, and it looks like this initially: Then I manually dragged them around and drew connections, and copy-pasted the signal names wherever they were needed. It&amp;#39;s not great but I figured it&amp;#39;s adequate for a high-level explanation rather than strictly accurate documentation. I made up a convention, and will need to change it when I encounter more complex scenarios.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=765ab19e-c086-41cf-afca-a25c1d8bf82f</link><pubDate>Fri, 09 Oct 2026 08:54:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:765ab19e-c086-41cf-afca-a25c1d8bf82f</guid><dc:creator>michaelkellett</dc:creator><description>Great blog Shabaz. I&amp;#39;ve installed but not used the latest Gowin tools so nice to see what they do. Where are you getting the block diagrams - is that an output from the Gowin tools ? MK</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=795617bc-5d35-426c-927f-4f8f06c120c3</link><pubDate>Fri, 09 Oct 2026 01:58:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:795617bc-5d35-426c-927f-4f8f06c120c3</guid><dc:creator>shabaz</dc:creator><description>Hi! Yes it looks great. Very straightforward to use. I&amp;#39;m using the Education Edition software, I cannot find a simulator built-in, but there are other options I&amp;#39;m exploring for that. Overall, I&amp;#39;m really happy with this software. It has command-line capability too, at least it was possible to synthesise and place&amp;amp;route (also transferring the bitfile over USB via CLI is possible but I didn&amp;#39;t try that). Since I&amp;#39;m not doing this on a daily basis! I too would rather use the graphical software.</description></item><item><title /><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas?CommentId=9947966f-255e-4c53-b6dc-82710928f88e</link><pubDate>Thu, 08 Oct 2026 23:58:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9947966f-255e-4c53-b6dc-82710928f88e</guid><dc:creator>dang74</dc:creator><description>Thanks shabaz the Gowin Designer software looks pretty good. I am glad that the design process isn&amp;#39;t limited to command line.</description></item><item><title>Blog Post: Tang Nano 9k: Using Internal PSRAM in Gowin FPGAs</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/tang-nano-9k-using-internal-psram-in-gowin-fpgas</link><pubDate>Thu, 08 Oct 2026 20:58:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:777db40d-df82-4686-8796-456a9951fa69</guid><dc:creator>shabaz</dc:creator><description>Table of Contents Introduction PSRAM Overview Adding Gowin IP VHDL Walk-Through Entity: Ports to the Outside World PLL Component PSRAM Component Process: Asynchronous Reset Function Process: Registered Portion Read Operation Underway Calibration and PSRAM Write PSRAM Read during the Verification Phase PSRAM Read: Playback Building It Does it Work? Summary Introduction Some Gowin FPGA parts contain not only the FPGA itself, but inside the package the manufacturer has fitted a PSRAM chip too! That’s really convenient if you need more RAM space than block RAM may ordinarily provide, but don’t want the overhead of designing in another chip onto the circuit board. PSRAM is easier to use than SDRAM, but that can be simplified further by making use of Gowin’s ready-made “API” or library, better known in FPGA-world as IP. This blog post walks through an example project that makes use of the PSRAM, not for any real purpose, but it exercises it by first writing data and filling up the entire PSRAM, and then checking the PSRAM contains what is expected, and then finally playing out each bit sequentially, using a couple of outputs on the FPGA, all ready to be observed with an oscilloscope. I used a Tang Nano 9k board, which contains the Gowin LittleBee series GW1NR part (the full part code is GW1NR-LV9QN88PC6/I5). If you&amp;#39;re new to Tang Nano boards, this blog post provides an introduction: (+) Tang Nano Series and Gowin FPGAs for Beginners: A Practical Guide, Part 1 - element14 Community Disclaimer: I used AI significantly to help me with the HDL code. This article however was written by myself, and I checked the VHDL code pretty much line-by-line to ensure it does what I expected it to do. PSRAM Overview PSRAM is cheaper than SRAM, because it doesn’t dedicate as many transistors per memory cell, and easier to use than SDRAM, because the refresh circuitry is on-chip. The PSRAM inside the GW1NR part has 64 Mbits of space, and those bits can be organized in a number of ways; In the screenshot further below it can be seen that I configured two channels of 32 Mbits each. The data bus is 32-bit wide (let’s call it a 32-bit “word”) and I chose to read/write in blocks of 8 words (this can be considered a “burst” of 32 bytes, but it’s easier for the rest of the blog post to express it as 8 words). Since 8 words will be read or written, this means 8 clock pulses will be used to transfer the data in or out (plus however many pulses are needed beforehand to send the read or write command, and delay until the data is available). The PSRAM requires a clock to operate, and it needs to be between 50 and 160 MHz. I went with 81 MHz, which isn’t completely arbitrary, because 81 MHz happens to be three times 27 MHz, which is the frequency of the crystal on the Tang Nano 9k board. An integer multiple like 3 is an easy thing for a phase-locked-loop (PLL) to achieve. Using the PLL entails using PLL IP incidentally, so now that’s two sets of IP that need to be included in the project, not a problem of course, that’s what the manufacturer’s IP library is there for. Adding Gowin IP After you’ve clicked on File-&amp;gt;New and created a new project, you might create a first VHDL file called (say) top.vhd (this is assuming the VHDL language is being used for this project). Next, click on Tools-&amp;gt;IP Core Generator , and then navigate to the PSRAM Memory Interface HS selection as shown here and double-click to launch it. Incidentally, if you want to ever review the configuration at a later date, go to Tools-&amp;gt;IP Core Generator again, but this time look for a little folder icon above the IP list (the icon is shown boxed in orange in the screenshot above) and then navigate to a file with suffix .ipc which will contain your IP settings. The screenshot shows the adjustments I made, and then I clicked on the Options tab. Within the Options tab, I set the Burst Mode to 32 bytes (i.e. 8 words). When you click OK, a few things happen. Firstly, the IP is generated and your project folder will now contain a src/psram_memory_interface_hs folder (or similar), and secondly the generator will dump some temporary content into the code pane. That temporary code contains a component definition and instantiation, both of which need to be copy-pasted into your main VHDL code somewhere. You can see where it needs to go by looking at my example top.vhd source file in the Github repo. Adding the PLL IP is just as easy: As before, a temporary file will appear and the VHDL there can be copy-pasted into your code. VHDL Walk-Through The VHDL code (the word code is being used colloquially, the term HDL source is often used) is far easier to understand by looking at a block diagram, split up to follow it better. The project implements within the FPGA three main phases of operations: (1) Fill the entire PSRAM memory with a test pattern (the second channel uses an inverted version of the test pattern) (2) Read the entire PSRAM contents, comparing each word with the test pattern (3) Repeatedly read the entire PSRAM contents, outputting each bit serially onto a pin to observe with an oscilloscope; this is done for both channels, so a 2-channel ‘scope should show one signal inverted compared to the other. The full block diagram is viewable here (open it in a separate window, and then you can pinch-to-zoom or whatever, while following the explanation in the rest of this blog post), and click here to see the top.vhd code . Entity: Ports to the Outside World The salmon-colored part, the entity called TOP , defines the external-facing ports for the hardware, in other words, the names of the signals that will make their way out to physical wires on the FPGA. You can see on the right side that led[1..0] refers to an array of two signals, so those obviously will be attached to two LEDs (these happen to be already soldered on the Tang Nano 9k board). The out_ch1 and out_ch2 will go to pins that can attach to an oscilloscope to see the bit pattern that is played out from the PSRAM. All the ports labelled O_psram or IO_psram are actually not connected to physical pins on the Gowin part, but rather are connections from the FPGA chip inside, wired to the PSRAM chip next to it inside the package. PLL Component The two blue-colored items are known as components in VHDL, and one is the PLL, and the other is the PSRAM component. The PLL one is very simple externally, all it needs is a clock input (shown on the left side; I’m using the convention that all left side signals are inputs, and the right side signals are outputs). The PLL will multiply that clock input by three (provided it is configured for that in the IP configuration window, which I’ll get to). There is a PLL lock output, which is pretty important because it’s not a good idea to attempt memory writes with unstable clocking. PSRAM Component The PSRAM component looks complex, but (a) no code needed to be typed to create that component instance, since that was auto-generated as part of using that IP, and (b) if you look closely, a lot of the signals are doubled-up simply because the memory is being used in two channels. All the signals are simple enough to follow. You can see from the diagram that the 81 MHz clock output from the PLL is wired to the memory_clk input to the PSRAM component. Many of the other signals are self-explanatory, for instance, you can see from the thick pink/magenta lines that there are two 21-bit address buses called addr0[20..0] and addr1[20..0] , for the two channels. The VHDL code happens to connect them together, i.e. I intend to treat these two channels in a similar way (an example would be for left and right audio data) so I can access memory locations across the two channels in parallel. The 32-bit data buses are shown with thick orange and light-blue connections attached. The orange ones are inputs to the PSRAM component for writing data, and the light-blue ones are outputs. The init_calib0/1 signals go high when the PSRAM has initialized, and so the VHDL code will need to wait for that (and wait for the PLL lock) before performing read/write operations. Also, the PSRAM component provides a clock output that is a divided-by-two version of its input clock, therefore it will be 40.5 MHz in my case. That clock is expected to be used as the clock for the rest of the user VHDL code (at least, that is what Gowin intends the user to do according to their documentation, so that’s what I did). The remaining input signals cmd0 , cmd1 , cmd_en0 , cmd_en1 are 1-bit signals that are used to control whether the memory is being read or written. The cmd0/1 signal needs to be high to perform writes, and low to read. The cmd_en0/1 signal needs to go high (i.e. asserted) for one clock cycle, to instruct the PSRAM component to accept the command. I&amp;#39;ve now covered a fair portion of the project, and really very little VHDL needed to be written to achieve that, since those particular component declarations were created by the Gowin IP generator feature. It’s time to look at another part of the VHDL code. Process: Asynchronous Reset A VHDL process is a way of grouping up things that run sequentially. You can have many processes, they all operate concurrently with each other, but sequentially internally. The great thing about processes is that they allow the developer to implement registers that can store results, i.e. retain state, from one clock cycle, to be used in the next. This is super-important because without a clock, there could be glitches and you wouldn’t know precisely when results are valid, due to small delays in signals arriving at different inputs of logic gates. With clocked logic such delays do not matter, since there is time for logic outputs to settle, provided that happens faster than the controlled clock speed. Registers are automatically inferred into a design, whenever the developer uses a pattern in their VHDL code that looks like this: process(clk_out, reset_n) begin if reset_n = &amp;#39;0&amp;#39; then -- reset code sits here cmd0 ‘0’); is a way of setting a signal array all to zero but there are other ways too; you could write databyte Create Clock . Give it any name, and then importantly change the Collection to pins as shown in the screenshot below, and then you&amp;#39;ll be able to search for that clock name (capitalization is important) as shown here. After it is added and you click OK, set the frequency to 40.5 MHz for that constraint. Does it Work? Yes : ) After building it (i.e. in the Process pane, double-click on the Synthesis tab, and then double-click on Place&amp;amp;Route , and hope they both change to green-circled check-marks) the Gowin Programmer was used to transfer it into the Tang Nano 9k. If you’ve not used the Programmer before, be aware that the Tang Nano boards seem to require a USB-A-to-C cable (despite USB-C-to-C appearing to initially work), the supplied cable may be faulty (mine was), and when launched, the Programmer chooses one of two communication channels; I had to swap to the second channel for successful programming). Anyway, once it was programmed, all LEDs were off, which at least meant there was a chance the code was successfully running! I attached the oscilloscope probes (not very well) and you can see the two outputs are complementary and at the expected data rate. I didn’t try to capture with a logic analyzer and decode it back to the original data. Summary Some of the Gowin parts feature built-in PSRAM. The Tang Nano uses a GW1NR device with 64 Mbits of PSRAM, and it is quite easy to use by adding Gowin IP to the project. PLL IP was also used, to multiply the crystal clock source to a usable frequency. The PSRAM was configured to operate with 32-bit wide data buses, in two 32 Mbit channels. The VHDL code implemented a state machine that waited for the PSRAM to be ready/calibrated, and then the entire two channels were filled with test pattern data, in bursts of 8 words. The state then transitioned to allow reading of the memory to confirm it was correctly filled, and then the memory could be repeatedly read out at a slower rate for serializing the data out of a couple of FPGA pins. Obviously, this project on its own doesn’t serve a useful purpose, but hopefully with the VHDL description and diagrams, it is now easier to use the PSRAM in other projects. Thanks for reading!</description><category domain="https://community.element14.com/technologies/fpga-group/tags/ram">ram</category><category domain="https://community.element14.com/technologies/fpga-group/tags/PSRAM">PSRAM</category><category domain="https://community.element14.com/technologies/fpga-group/tags/GW1NR">GW1NR</category><category domain="https://community.element14.com/technologies/fpga-group/tags/tang%2bnano">tang nano</category><category domain="https://community.element14.com/technologies/fpga-group/tags/fpga">fpga</category><category domain="https://community.element14.com/technologies/fpga-group/tags/gowin">gowin</category><category domain="https://community.element14.com/technologies/fpga-group/tags/fpga%2bbasics">fpga basics</category></item></channel></rss>