Thanks for your post.
No, not the same.
1) Original (other) thread was to ask if a single resource (ie. GPIO pin) can be accessed by the hard / soft embedded CPU AND also the FPGA fabric.
ie. GPIO[0] is mated with a LED. Can the CPU blink this LED with C code ? Can this same pin be toggled via verilog inside the same project ?
From the toolchain / verilog rules, apparently not as a default. Once the resource is mapped to the CPU by the IP Wizard, it is for exclusive use by the CPU. The opposite is true if the physical pin on the FPGA is not assigned to the CPU side -> then the FPGA fabric can access the pin.
2) This thread is to understand how to exchange data from the CPU to the fabric and vice-versa. Trying to build a bridge that are operating at 2 different speeds. The fabric side needs to operate on data traffic that cannot exceed 20us and is very restrictive on timing. The CPU side will be used at a different speed (ie. UART) but needs to build a buffer and massage the data flow before passing it forward. It will be easier to implement this side of the bridge using block of code in C.
3) The suggestion from the above posts is great and one solution to use the AHB bus is valid. The code example is with VHDL which currently have no knowledge about but trying to just sample this data with an oscilloscope as it is sent out over the CM1 / CM3 IP. Learning about GAO (Gowin Analyzer Oscilloscope) as well.
Use of dual port RAM will also work but have not explored that thought process.
Gowin has mentioned that they do not have a reference design that uses the AHB for custom widgets. The SDK does offer an example with the AHB enabled logic block for the CPU but they do not show the details on how the FPGA fabric side can communicate with the same enabled AHB port.
The above GITHUB example is great to learn from but after downloading the project -> the project fails to compile as posted.
ERROR (EX4232) : Formal port 'master_exresp' has no actual or default value("C:\Users\kumar\Downloads\nano4k_ahb_led-main\nano4k_ahb_led-main\FPGAProject\CM3_AHB_LED\src\soc_top.vhd":138)
ERROR (EX4716) : Unit 'structural' is ignored due to previous errors("C:\Users\kumar\Downloads\nano4k_ahb_led-main\nano4k_ahb_led-main\FPGAProject\CM3_AHB_LED\src\soc_top.vhd":145)